-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (43 loc) · 1.56 KB
/
Linux-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
name: 'Linux GCC'
env:
CMAKE_VERSION: '3.16.x'
CMAKE_BUILD_TYPE: 'Release'
CMAKE_BUILD_PREFIX: './build'
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { icon: '🟨', cc: gcc-9, cxx: g++-9, name: 'GCC 9' }
- { icon: '🟦', cc: gcc-10, cxx: g++-10, name: 'GCC 10' }
name: '🚧 ${{ matrix.icon }} ${{ matrix.name }}'
steps:
- name: '🧰 Checkout'
uses: actions/[email protected]
- name: '${{ matrix.icon }} Setup CMake'
uses: jwlawson/[email protected]
with:
cmake-version: '${{env.CMAKE_VERSION}}'
github-api-token: ${{ secrets.GITHUB_TOKEN }}
- name: '${{ matrix.icon }} Install packages'
run: sudo apt-get install libxpm-dev freeglut3-dev libmariadb-dev firebird-dev mysql-client unixodbc-dev postgresql sqlite3 libpq-dev
- name: '${{ matrix.icon }} Cache ROOT'
uses: actions/[email protected]
with:
path: '${{ env.CMAKE_BUILD_PREFIX }}/_deps/root-build'
key: root-${{ matrix.cc }}
- name: '🔧 Configure'
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
run: cmake -S . -B ${{ env.CMAKE_BUILD_PREFIX }} -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
- name: '⚙️ Build'
run: cmake --build ${{ env.CMAKE_BUILD_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel 2
- name: '🧪 Run tests'
working-directory: ${{ env.CMAKE_BUILD_PREFIX }}
run: ctest -C ${{ env.CMAKE_BUILD_TYPE }} -j2 -VV --output-on-failure