optimise CI pipeline by removing vcpkg building from the dockerfile.

This commit is contained in:
2025-05-23 22:03:29 +02:00
parent 95b590e815
commit 38afc94d4f
2 changed files with 26 additions and 10 deletions

View File

@@ -6,8 +6,25 @@ on:
pull_request:
branches:
- '**'
env:
VCPKG_DISABLE_METRICS: 1
VCPKG_ROOT: /opt/vcpkg
jobs:
setup-vcpkg:
runs-on: ubuntu-latest
container:
image: ghcr.io/thepigeongenerator/mcaselector-lite:latest
steps:
- run: git clone https://github.com/microsoft/vcpkg.git "${{env.VCPKG_ROOT}}"
- run: ${{env.VCPKG_ROOT}}/bootstrap-vcpkg.sh
- name: install vcpkg packages
run: ${{env.VCPKG_ROOT}}/vcpkg install glfw3:x64-linux-dynamic glfw3:x64-mingw-static;
- uses: actions/upload-artifact@v4
with:
name: vcpkg
path: ${{env.VCPKG_ROOT}}
compile:
needs: setup-vcpkg
runs-on: ubuntu-latest
container:
image: ghcr.io/thepigeongenerator/mcaselector-lite:latest
@@ -22,6 +39,11 @@ jobs:
cc: x86_64-w64-mingw32-gcc
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vcpkg
path: ${{env.VCPKG_ROOT}}
# compile
- name: compile ${{matrix.march}}-${{matrix.kernel}}
run: make compile MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
- uses: actions/upload-artifact@v4
@@ -46,5 +68,9 @@ jobs:
with:
name: ${{matrix.march}}-${{matrix.kernel}}-rel
path: obj/
- uses: actions/download-artifact@v4
with:
name: vcpkg
path: ${{env.VCPKG_ROOT}}
- name: execute tests for ${{matrix.march}}-${{matrix.kernel}}
run: make DEBUG=test run MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j