-
-
Notifications
You must be signed in to change notification settings - Fork 69
93 lines (90 loc) · 3.07 KB
/
test.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
name: test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-build
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-shell --run 'mkdir build-mac'
- name: configure cmake
run: |
nix-shell --run "
cd build-mac && cmake .. \
-DCMAKE_BUILD_TYPE=Debug
"
- run: nix-shell --run "cd build-mac && make check -j`nproc`"
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-shell --run "mkdir build"
- run: nix-shell --run "cd build && cmake .."
- run: nix-shell --run "cd build && make docs"
- uses: shimataro/ssh-key-action@v2
if: github.repository_owner == 'arximboldi' && github.ref == 'refs/heads/master'
with:
key: ${{ secrets.SINUSOIDES_SSH_KEY }}
known_hosts: ${{ secrets.SINUSOIDES_KNOWN_HOSTS }}
- run: nix-shell --run "cd build && make upload-docs"
if: github.repository_owner == 'arximboldi' && github.ref == 'refs/heads/master'
check:
strategy:
matrix:
type: [Debug, Release]
compiler: [gcc]
opts: [[]]
include:
- type: Debug
compiler: gcc
opts: ['coverage']
- type: Debug
compiler: clang
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "mkdir build"
- name: configure cmake
run: |
nix-shell --argstr compiler ${{ matrix.compiler }} --run "
cd build && cmake -GNinja .. \
-DCMAKE_BUILD_TYPE=${{ matrix.type }} \
-DENABLE_COVERAGE=${{ contains(matrix.opts, 'coverage') }}
"
- run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "cd build && ninja check"
- run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "bash <(curl -s https://codecov.io/bash)"
if: ${{ contains(matrix.opts, 'coverage') }}