update ci.yaml to work better with the new makefile

This commit is contained in:
2025-08-11 14:21:02 +02:00
parent 6c9eec8346
commit 6dea03ee2e

View File

@@ -9,9 +9,6 @@ on:
branches:
- '**'
env:
VCPKG_DISABLE_METRICS: 1
VCPKG_ROOT: ${{github.workspace}}/.vcpkg
DEPS_VCPKG: glfw3:x64-linux-dynamic glfw3:x64-mingw-static libarchive:x64-linux-dynamic libarchive:x64-mingw-static
WINEPREFIX: /tmp/wineprefix
jobs:
#
@@ -19,37 +16,37 @@ jobs:
#
exec-ci-tasks:
runs-on: ubuntu-latest
container: ghcr.io/thepigeongenerator/mcaselector-lite:latest
steps:
#
# general setup
#
- uses: actions/checkout@v4
#
# VCPKG setup
#
- id: gen-keys
run: echo "HASH_VCPKG=vcpkg-$(echo "$DEPS_VCPKG" | sha256sum | cut -d ' ' -f1)" >>"$GITHUB_OUTPUT"
# load the vcpkg cache
- uses: actions/cache@v4
id: vcpkg-cache
with:
path: ${{env.VCPKG_ROOT}}
key: ${{steps.gen-keys.outputs.HASH_VCPKG}}
restore-keys: vcpkg-
# setup vcpkg if the cache didn't hit
- if: steps.vcpkg-cache.outputs.cache-hit != 'true'
submodules: "recursive"
- name: get workflow data
id: libdat
run: |
if [ -d "$VCPKG_ROOT" ]; then
cd "$VCPKG_ROOT"
git pull -f
cd -
else
git clone https://github.com/microsoft/vcpkg.git "$VCPKG_ROOT"
fi
"$VCPKG_ROOT/bootstrap-vcpkg.sh"
"$VCPKG_ROOT/vcpkg" install $DEPS_VCPKG
- name: compilation (using bulk compilation)
run: make all CALL=compile -j
- name: unit tests (using bulk flags)
run: make all CALL=run DEBUG=test -j
echo "LIBS_PATH=$(git submodule foreach -q 'echo $sm_path' | sed '$!N; s/\n/ /')" >>"$GITHUB_OUTPUT"
echo "LIBS_HASH=libs-$(git submodule foreach -q 'echo $sha1' | sha256sum | cut -d ' ' -f1)" >>"$GITHUB_OUTPUT"
# restore the cache
- uses: actions/cache@v4
id: lib-cache
with:
path: ${{steps.libdat.outputs.LIBS_PATH}} lib/glad/gl.o
key: ${{steps.libdat.outputs.LIBS_HASH}}
restore-keys: libs-
- name: compile libraries on cache miss
if: steps.lib-cache.outputs.cache-hit != 'true'
run: |
while read mod; do {
cd "$mod"
git pull -f
cd -
}; done <<<"${{steps.libdat.outputs.LIBS_PATH}}"
make libs
# perform continuous integrations actions
- run: make x86_64-linux-gnu-gcc CALL=compile -j
- run: make x86_64-w64-mingw32-gcc CALL=compile -j
- run: make x86_64-linux-gnu-gcc CALL=run DEBUG=test -j
- run: make x86_64-w64-mingw32-gcc CALL=run DEBUG=test -j