-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.69 KB
/
linux.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
name: Build Linux
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-linux:
name: Building for x86_64-pc-linux-gnu (${{ matrix.build_type }}) with ${{ matrix.compiler.c }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
compiler:
- c: gcc-11
cxx: g++-11
- c: clang-14
cxx: clang++-14
build_type:
- Release
- Debug
defaults:
run:
shell: bash
env:
CC: ${{ matrix.compiler.c }}
CXX: ${{ matrix.compiler.cxx }}
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update && sudo apt-get -y install ${{ matrix.compiler.c }}
if: startsWith(matrix.compiler.c, 'clang')
- run: sudo apt-get update && sudo apt-get -y install ${{ matrix.compiler.c }} ${{ matrix.compiler.cxx }}
if: startsWith(matrix.compiler.c, 'gcc')
- run: exec pip install --upgrade conan
- name: cache conan packages
uses: actions/cache@v2
with:
path: ~/.conan2/p
key: x86_64-linux-gnu:${{ matrix.compiler.c }}:${{ matrix.build_type }}:conan
- name: cache ccache
uses: actions/cache@v2
with:
path: ~/.cache/ccache
key: x86_64-linux-gnu:${{ matrix.compiler.c }}:${{ matrix.build_type }}:ccache
- run: exec conan profile detect
- run: exec conan install -u . --version "scm.$GITHUB_SHA" -u -b missing -s compiler.cppstd=20 -s build_type=${{ matrix.build_type }} -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
- run: exec conan build . --version "scm.$GITHUB_SHA" -s compiler.cppstd=20 -s build_type=${{ matrix.build_type }}