-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.88 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
54
55
---
name: linux
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: CMake v3.${{ matrix.cmake_version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
cmake_version: [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]
steps:
- name: 📥 Checkout
uses: actions/checkout@v3
- name: 📂 Load .env file
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows
- name: ⬇️ Setup CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ~3.${{ matrix.cmake_version }}
ninjaVersion: ^1.11.1
- name: 🔧 Generate with v3.${{ matrix.cmake_version }}
if: ${{ matrix.cmake_version < 13 }}
run: cmake -E make_directory ${{ env.CMAKE_BINARY_PREFIX }}; cmake -E chdir ${{ env.CMAKE_BINARY_PREFIX }} cmake -G "Ninja" -Werror=dev -Werror=deprecated -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} ${{ github.workspace }}/${{ env.CMAKE_SOURCE_PREFIX
}}
- name: 🔧 Generate with v3.${{ matrix.cmake_version }}
if: ${{ matrix.cmake_version >= 13 && matrix.cmake_version < 17 }}
run: cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BINARY_PREFIX }} -G "Ninja" -Werror=dev -Werror=deprecated -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
- name: 🔧 Generate with v3.${{ matrix.cmake_version }}
if: ${{ matrix.cmake_version >= 17 }}
run: cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BINARY_PREFIX }} -G "Ninja Multi-Config" -Werror=dev -Werror=deprecated
- name: 🧪 Test
run: ctest -C ${{ env.CMAKE_BUILD_TYPE }} --output-on-failure
working-directory: ${{ env.CMAKE_BINARY_PREFIX }}