From d286f47972b8f36a06a86cad131d9314355197e6 Mon Sep 17 00:00:00 2001 From: REDCODE Date: Fri, 7 Aug 2026 01:23:10 +0200 Subject: [PATCH] Update CI setup again (I hate this so much) --- .github/workflows/ci.yml | 22 +++++++++++----------- src/spice2x/build_all.sh | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b190d9..a537886 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,22 +13,22 @@ jobs: working-directory: ./src/spice2x steps: - uses: actions/checkout@v5 - - name: Set ccache environment variables - run: | - echo "CCACHE_DIR=${{ github.workspace }}/src/spice2x/.ccache" >> $GITHUB_ENV - - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.23 - with: - update-package-index: true - name: Calculate commit SHA id: vars run: | calculatedSha=$(git rev-parse --short ${{ github.sha }}) - echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV + echo "sha=$calculatedSha" >> "$GITHUB_OUTPUT" + echo "bin=${{ github.workspace }}/src/spice2x/bin" >> "$GITHUB_OUTPUT" - name: Compile - run: ./build_docker.sh + run: | + docker build --pull "$PWD/external/docker" -t spicetools/deps --platform linux/x86_64 + docker build --build-context gitroot="$PWD/../../.git" . -t spicetools/spice:latest + docker run --name spice-build spicetools/spice:latest + mkdir -p "$PWD/bin" + docker cp spice-build:/src/src/spice2x/bin/. "$PWD/bin" + docker rm spice-build - uses: actions/upload-artifact@v6 with: - name: spice2x-ci-${{ env.COMMIT_SHORT_SHA }} - path: ${{ github.workspace }}/src/spice2x/bin + name: spice2x-ci-${{ steps.vars.outputs.sha }} + path: ${{ steps.vars.outputs.bin }} if-no-files-found: error \ No newline at end of file diff --git a/src/spice2x/build_all.sh b/src/spice2x/build_all.sh index d269b89..ba9c9d8 100755 --- a/src/spice2x/build_all.sh +++ b/src/spice2x/build_all.sh @@ -40,6 +40,7 @@ done # settings GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "none") +GIT_BRANCH="${GIT_BRANCH//\//-}" GIT_HEAD=$(git rev-parse HEAD || echo "none") TOOLCHAIN_32="${TOOLCHAIN_32:-"/usr/share/mingw/toolchain-i686-w64-mingw32.cmake"}" TOOLCHAIN_64="${TOOLCHAIN_64:-"/usr/share/mingw/toolchain-x86_64-w64-mingw32.cmake"}"