34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
on: [push, pull_request]
|
|
name: Continuous Integration
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
fw-ci:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./src/spice2x
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Calculate commit SHA
|
|
id: vars
|
|
run: |
|
|
calculatedSha=$(git rev-parse --short ${{ github.sha }})
|
|
echo "sha=$calculatedSha" >> "$GITHUB_OUTPUT"
|
|
echo "bin=${{ github.workspace }}/src/spice2x/bin" >> "$GITHUB_OUTPUT"
|
|
- name: Compile
|
|
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@v3
|
|
with:
|
|
name: spice2x-ci-${{ steps.vars.outputs.sha }}
|
|
path: ${{ steps.vars.outputs.bin }}
|
|
if-no-files-found: error |