-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (57 loc) · 1.67 KB
/
build-gcc.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build Multi-GCC
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-gcc:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
gcc_version: [ 'latest', '12', '11', '10', '9', '8', '7', '6', '5' ]
build_type: [ Release ]
name: "In Container GCC ${{matrix.gcc_version}} ${{matrix.build_type}}"
container:
image: gcc:${{matrix.gcc_version}}
options: -v /usr/local:/host_usr_local
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: friendlyanon/fetch-core-count@v1
if: >-
matrix.gcc_version != '6' &&
matrix.gcc_version != '5'
id: cores
- name: Set output
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Mount CMake
run: echo "/host_usr_local/bin" >> $GITHUB_PATH
- name: CMake & GCC Information
run: |
cmake --version
gcc --version
g++ --version
- name: Configure
run: >-
cmake -B build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S .
- name: Build
run: >-
cmake --build build
--config ${{ matrix.build_type }}
-- -j ${{steps.cores.outputs.count}}
- name: Test
working-directory: build
run: ctest --output-on-failure --build-config ${{ matrix.build_type }}