mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-18 20:35:45 +01:00
update ci.yaml to work better with the new makefile
This commit is contained in:
57
.github/workflows/ci.yaml
vendored
57
.github/workflows/ci.yaml
vendored
@@ -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"
|
||||
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 -
|
||||
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
|
||||
}; 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
|
||||
|
||||
Reference in New Issue
Block a user