-
Notifications
You must be signed in to change notification settings - Fork 13
79 lines (63 loc) · 1.8 KB
/
examples.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
name: examples
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
skip_duplicate:
name: 'Skip Job?'
continue-on-error: true
runs-on: ubuntu-latest
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["src/adiar/**", "example/**"]'
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
run-example:
name: 'Example: ${{ matrix.name }}'
runs-on: ubuntu-latest
needs: skip_duplicate
if: ${{ needs.skip_duplicate.outputs.should_skip != 'true' }}
strategy:
fail-fast: false
matrix:
include:
- name: 'Queens'
exec: queens
N: '1 2 3 4 5 6 7 8 9 10 11 12 13 14'
- name: 'Knights Tour'
exec: knights_tour
N: '1 2 3 4 5'
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Apt | install boost
run: |
sudo apt update
sudo apt install libboost-all-dev
- name: CMake | build
run: |
cmake -E make_directory ${{runner.workspace}}/build
cd ${{runner.workspace}}/build
cmake $GITHUB_WORKSPACE -D CMAKE_BUILD_TYPE=Release && cmake --build . --target ${{ matrix.exec }}
- name: Run example
working-directory: ${{runner.workspace}}/build
run: for n in ${{ matrix.N }}; do ./example/${{ matrix.exec }} -N $n -M 1024; done
run-dummy:
name: 'Example: ${{ matrix.name }}'
runs-on: ubuntu-latest
needs: skip_duplicate
if: ${{ needs.skip_duplicate.outputs.should_skip == 'true' }}
strategy:
matrix:
include:
- name: 'Queens'
- name: 'Knights Tour'
steps:
- name: Echo skip
run: |
echo "Running examples is skipped"