mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 09:25:44 +01:00
store vcpkg in cache to reduce runtime performance hit
This commit is contained in:
37
.github/workflows/ci.yaml
vendored
37
.github/workflows/ci.yaml
vendored
@@ -14,14 +14,25 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
container: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
||||||
steps:
|
steps:
|
||||||
- run: git clone https://github.com/microsoft/vcpkg.git "${{env.VCPKG_ROOT}}"
|
- uses: actions/cache@v4
|
||||||
- run: ${{env.VCPKG_ROOT}}/bootstrap-vcpkg.sh
|
id: vcpkg-cache
|
||||||
- name: install vcpkg packages
|
|
||||||
run: ${{env.VCPKG_ROOT}}/vcpkg install glfw3:x64-linux-dynamic glfw3:x64-mingw-static;
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: vcpkg
|
|
||||||
path: ${{env.VCPKG_ROOT}}
|
path: ${{env.VCPKG_ROOT}}
|
||||||
|
key: vcpkg-${{runner.os}}
|
||||||
|
restore-keys: vcpkg-${{runner.os}}
|
||||||
|
- if: steps.vcpkg-cache.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg.git "$VCPKG_ROOT"
|
||||||
|
$VCPKG_ROOT/bootstrap-vcpkg.sh
|
||||||
|
- if: steps.vcpkg-cache.outputs.cache-hit == 'true'
|
||||||
|
run: |
|
||||||
|
cd "$VCPKG_ROOT"
|
||||||
|
git fetch
|
||||||
|
git checkout master
|
||||||
|
git reset --hard origin/master
|
||||||
|
./bootstrap-vcpkg.sh
|
||||||
|
- name: install vcpkg packages
|
||||||
|
run: $VCPKG_ROOT/vcpkg install glfw3:x64-linux-dynamic glfw3:x64-mingw-static;
|
||||||
compile:
|
compile:
|
||||||
needs: setup-vcpkg
|
needs: setup-vcpkg
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -36,11 +47,11 @@ jobs:
|
|||||||
march: x86_64
|
march: x86_64
|
||||||
cc: x86_64-w64-mingw32-gcc
|
cc: x86_64-w64-mingw32-gcc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/cache@v4
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: vcpkg
|
|
||||||
path: ${{env.VCPKG_ROOT}}
|
path: ${{env.VCPKG_ROOT}}
|
||||||
|
key: vcpkg-${{runner.os}}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
# compile
|
# compile
|
||||||
- name: compile ${{matrix.march}}-${{matrix.kernel}}
|
- name: compile ${{matrix.march}}-${{matrix.kernel}}
|
||||||
run: make compile MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
run: make compile MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
||||||
@@ -60,14 +71,14 @@ jobs:
|
|||||||
cc: x86_64-linux-gnu-gcc
|
cc: x86_64-linux-gnu-gcc
|
||||||
# WARN: not testing win-x86_64... Probably a good idea to do that
|
# WARN: not testing win-x86_64... Probably a good idea to do that
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{env.VCPKG_ROOT}}
|
||||||
|
key: vcpkg-${{runner.os}}
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{matrix.march}}-${{matrix.kernel}}-rel
|
name: ${{matrix.march}}-${{matrix.kernel}}-rel
|
||||||
path: obj/
|
path: obj/
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: vcpkg
|
|
||||||
path: ${{env.VCPKG_ROOT}}
|
|
||||||
- name: execute tests for ${{matrix.march}}-${{matrix.kernel}}
|
- name: execute tests for ${{matrix.march}}-${{matrix.kernel}}
|
||||||
run: make DEBUG=test run MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
run: make DEBUG=test run MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
||||||
|
|||||||
Reference in New Issue
Block a user