This commit is contained in:
+33
-31
@@ -1,32 +1,34 @@
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
name: Continuous Integration
|
name: Continuous Integration
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fw-ci:
|
fw-ci:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: ./src/spice2x
|
working-directory: ./src/spice2x
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- name: Set ccache environment variables
|
- name: Calculate commit SHA
|
||||||
run: |
|
id: vars
|
||||||
echo "CCACHE_DIR=${{ github.workspace }}/src/spice2x/.ccache" >> $GITHUB_ENV
|
run: |
|
||||||
- name: Install ccache
|
calculatedSha=$(git rev-parse --short ${{ github.sha }})
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.23
|
echo "sha=$calculatedSha" >> "$GITHUB_OUTPUT"
|
||||||
- name: Calculate commit SHA
|
echo "bin=${{ github.workspace }}/src/spice2x/bin" >> "$GITHUB_OUTPUT"
|
||||||
id: vars
|
- name: Compile
|
||||||
run: |
|
run: |
|
||||||
calculatedSha=$(git rev-parse --short ${{ github.sha }})
|
docker build --pull "$PWD/external/docker" -t spicetools/deps --platform linux/x86_64
|
||||||
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
|
docker build --build-context gitroot="$PWD/../../.git" . -t spicetools/spice:latest
|
||||||
- name: Compile
|
docker run --name spice-build spicetools/spice:latest
|
||||||
run: ./build_docker.sh
|
mkdir -p "$PWD/bin"
|
||||||
- uses: actions/upload-artifact@v6
|
docker cp spice-build:/src/src/spice2x/bin/. "$PWD/bin"
|
||||||
with:
|
docker rm spice-build
|
||||||
name: spice2x-ci-${{ env.COMMIT_SHORT_SHA }}
|
- uses: actions/upload-artifact@v3
|
||||||
path: src/spice2x/bin
|
with:
|
||||||
|
name: spice2x-ci-${{ steps.vars.outputs.sha }}
|
||||||
|
path: ${{ steps.vars.outputs.bin }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@@ -40,6 +40,7 @@ done
|
|||||||
|
|
||||||
# settings
|
# settings
|
||||||
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "none")
|
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")
|
GIT_HEAD=$(git rev-parse HEAD || echo "none")
|
||||||
TOOLCHAIN_32="${TOOLCHAIN_32:-"/usr/share/mingw/toolchain-i686-w64-mingw32.cmake"}"
|
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"}"
|
TOOLCHAIN_64="${TOOLCHAIN_64:-"/usr/share/mingw/toolchain-x86_64-w64-mingw32.cmake"}"
|
||||||
|
|||||||
Reference in New Issue
Block a user