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:
61
.github/workflows/ci.yaml
vendored
61
.github/workflows/ci.yaml
vendored
@@ -9,9 +9,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
env:
|
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
|
WINEPREFIX: /tmp/wineprefix
|
||||||
jobs:
|
jobs:
|
||||||
#
|
#
|
||||||
@@ -19,37 +16,37 @@ jobs:
|
|||||||
#
|
#
|
||||||
exec-ci-tasks:
|
exec-ci-tasks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
|
||||||
steps:
|
steps:
|
||||||
#
|
|
||||||
# general setup
|
# general setup
|
||||||
#
|
|
||||||
- uses: actions/checkout@v4
|
- 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:
|
with:
|
||||||
path: ${{env.VCPKG_ROOT}}
|
submodules: "recursive"
|
||||||
key: ${{steps.gen-keys.outputs.HASH_VCPKG}}
|
|
||||||
restore-keys: vcpkg-
|
- name: get workflow data
|
||||||
# setup vcpkg if the cache didn't hit
|
id: libdat
|
||||||
- if: steps.vcpkg-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
if [ -d "$VCPKG_ROOT" ]; then
|
echo "LIBS_PATH=$(git submodule foreach -q 'echo $sm_path' | sed '$!N; s/\n/ /')" >>"$GITHUB_OUTPUT"
|
||||||
cd "$VCPKG_ROOT"
|
echo "LIBS_HASH=libs-$(git submodule foreach -q 'echo $sha1' | sha256sum | cut -d ' ' -f1)" >>"$GITHUB_OUTPUT"
|
||||||
git pull -f
|
|
||||||
cd -
|
# restore the cache
|
||||||
else
|
- uses: actions/cache@v4
|
||||||
git clone https://github.com/microsoft/vcpkg.git "$VCPKG_ROOT"
|
id: lib-cache
|
||||||
fi
|
with:
|
||||||
"$VCPKG_ROOT/bootstrap-vcpkg.sh"
|
path: ${{steps.libdat.outputs.LIBS_PATH}} lib/glad/gl.o
|
||||||
"$VCPKG_ROOT/vcpkg" install $DEPS_VCPKG
|
key: ${{steps.libdat.outputs.LIBS_HASH}}
|
||||||
- name: compilation (using bulk compilation)
|
restore-keys: libs-
|
||||||
run: make all CALL=compile -j
|
- name: compile libraries on cache miss
|
||||||
- name: unit tests (using bulk flags)
|
if: steps.lib-cache.outputs.cache-hit != 'true'
|
||||||
run: make all CALL=run DEBUG=test -j
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user