-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (88 loc) · 2.63 KB
/
build-libraries.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: 'Build libraries'
on:
push:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'cmake/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- '**/CMakeLists.txt'
- '**/*.pro'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'cmake/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- '**/CMakeLists.txt'
- '**/*.pro'
defaults:
run:
shell: pwsh
jobs:
build-libraries:
name: 'Build libraries'
strategy:
matrix:
include:
- { system: windows-latest, config: Debug, cc: cl, cpp: cl }
- { system: windows-latest, config: Release, cc: cl, cpp: cl }
- { system: windows-latest, config: Debug, cc: gcc, cpp: g++ }
- { system: windows-latest, config: Release, cc: gcc, cpp: g++ }
- { system: ubuntu-latest, config: Debug, cc: gcc-11, cpp: g++-11 }
- { system: ubuntu-latest, config: Release, cc: gcc-11, cpp: g++-11}
- { system: ubuntu-latest, config: Debug, cc: clang-14, cpp: clang++-14 }
- { system: ubuntu-latest, config: Release, cc: clang-14, cpp: clang++-14 }
fail-fast: false
runs-on: ${{ matrix.system }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Visual Studio Build Tools
uses: ilammy/msvc-dev-cmd@v1
if: ${{ runner.os == 'Windows' && matrix.cc == 'cl' }}
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
if: ${{ runner.os == 'Windows' && matrix.cc == 'gcc' }}
with:
msystem: UCRT64
update: true
install: mingw-w64-ucrt-x86_64-gcc
- name: Setup GCC and Clang
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update && `
sudo apt install -y `
gcc-11 `
g++-11 `
clang-14
- name: Setup Ninja
uses: imesense/[email protected]
- name: Configure project
run: |
cmake `
-S . `
-B build `
-G "Ninja" `
-DCMAKE_C_COMPILER=${{ matrix.cc }} `
-DCMAKE_CXX_COMPILER=${{ matrix.cpp }} `
-DFLAME_CONAN_SUPPORT=OFF `
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
- name: Build project
run: |
cmake `
--build build `
--config ${{ matrix.config }}
- name: Run tests
run: |
cmake `
--build build `
--target test