-
-
Notifications
You must be signed in to change notification settings - Fork 217
91 lines (85 loc) · 2.51 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux-min:
name: Linux Min Config
runs-on: ubuntu-20.04
strategy:
matrix:
compiler: [clang++-6.0, g++-10]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Install Dependencies
# Boost must be installed only because the CMake version (3.12) can't
# detect the installed Boost version (1.69)
run: sudo apt-get update && sudo apt-get -y install ninja-build libboost-date-time-dev clang-6.0 g++-10 g++-multilib
- name: Run tests with common Catch
run: |
cmake -G Ninja .
cmake --build . -- test_hello-world
cmake --build .
env:
CXX: ${{ matrix.compiler }}
linux-latest:
name: Linux Latest Config
needs: [linux-min]
runs-on: ubuntu-22.04
strategy:
matrix:
compiler: [clang++, g++]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Install Dependencies
# Boost must be installed only because the CMake version (3.12) can't
# detect the installed Boost version (1.69)
run: sudo apt-get update && sudo apt-get -y install ninja-build libboost-date-time-dev
- name: Run tests with common Catch
if: matrix.compiler == 'g++'
run: |
cmake -G Ninja .
cmake --build . -- test_hello-world
cmake --build .
env:
CXX: ${{ matrix.compiler }}
- name: Run tests without common Catch
if: matrix.compiler == 'clang++'
run: |
cmake -G Ninja -DEXERCISM_COMMON_CATCH=OFF .
cmake --build . -- test_hello-world
cmake --build .
env:
CXX: ${{ matrix.compiler }}
windows:
name: Windows
needs: [linux-min]
runs-on: windows-2022
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Run Tests
shell: powershell
# Delete the exercises that require Boost to avoid issues with Windows setup.
run: |
rm exercises/practice/gigasecond -r
rm exercises/practice/meetup -r
cmake .
cmake --build . -- test_hello-world
cmake --build .
mac:
name: MacOS
needs: [linux-min]
runs-on: macOS-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Install Boost
run: brew install boost
- name: Run Tests
run: |
cmake .
cmake --build . -- test_hello-world
cmake --build .