-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (45 loc) · 1.32 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build
run-name: Build and test of commit "${{ github.event.head_commit.message }}"
on:
push:
branches:
- "*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [
"gcc:10-bullseye",
"gcc:11-bullseye",
"gcc:12-bullseye",
"gcc:13-bookworm",
"silkeh/clang:13-bullseye",
"silkeh/clang:14-bullseye",
"silkeh/clang:15-bullseye",
"silkeh/clang:16-bullseye"
]
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
IMAGE_NAME=$(echo "${{ matrix.compiler }}" | sed 's/silkeh\///g')
echo "IMAGE_NAME=gafro-$IMAGE_NAME" >> "$GITHUB_OUTPUT"
- name: Build the Docker image
run: |
docker build . --build-arg BASE_IMAGE="${{ matrix.compiler }}" --file .github/docker/Dockerfile --tag ${{ steps.strings.outputs.IMAGE_NAME }}
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: ${{ steps.strings.outputs.IMAGE_NAME }}
options: -v ${{ github.workspace }}:/opt/gafro
run: |
cd /opt/gafro
mkdir build
cd build
cmake ..
make install