-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (70 loc) · 2.24 KB
/
build.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
name: CI
on:
push:
pull_request:
branches: [main]
jobs:
build-and-test:
name: ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain:
- linux-gcc
- macos-clang
#- windows-msvc
configuration:
- debug
include:
- toolchain: linux-gcc
os: ubuntu-latest
compiler: gcc
- toolchain: macos-clang
os: macos-latest
compiler: clang
#- toolchain: windows-msvc
# os: windows-latest
# compiler: msvc
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: true
- name: Install boost & curl (linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libboost-all-dev libcurl4-openssl-dev -y
- name: Install boost (osx)
if: matrix.os == 'macos-latest'
run: brew install boost
#- name: Install boost (windows)
# if: matrix.os == 'windows-latest'
# id: install-boost
# uses: MarkusJx/[email protected]
# with:
# boost_version: 1.71.0
# toolset: msvc14.2
#- name: Install curl (windows)
# if: matrix.os == 'windows-latest'
# run: |
# choco install -y cygwin
# choco install -y cyg-get
# cyg-get curl libcurl-devel
#- name: Configure (windows)
# if: matrix.os == 'windows-latest'
# env:
# BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}}
# CURL_INCLUDE_DIR: ${{steps.install-curl.outputs.CURL_INCLUDE_DIR}}
# run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCURL_INCLUDE_DIR=$CURL_INCLUDE_DIR
- name: Configure (*nix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
- name: Build with ${{ matrix.compiler }}
run: cmake --build build
- name: Unit Tests
working-directory: build
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest -C ${{ matrix.configuration }}
- name: Run Tests
working-directory: bin
run: ./artic-tools -v