-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (44 loc) · 1.11 KB
/
main.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
name: CI
on:
push:
branches: [ main, devel/cmake ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
name: [ production, debug ]
name: ${{ matrix.os }}:${{ matrix.name }}
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Packages
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libgmp-dev
- name: Install Packages (MacOS)
if: runner.os == 'macOS'
run: |
brew install \
gmp
- name: Setup Build Dir
run: mkdir build
- name: Configure
if: matrix.name == 'production'
run: cmake -DCMAKE_BUILD_TYPE=Release ..
working-directory: build
- name: Configure
if: matrix.name == 'debug'
run: cmake -DCMAKE_BUILD_TYPE=Debug ..
working-directory: build
- name: Build
run: make -j2
working-directory: build
- name: Test
run: ctest --output-on-failure
working-directory: build