-
Notifications
You must be signed in to change notification settings - Fork 14
98 lines (81 loc) · 2.29 KB
/
tests.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
94
95
96
97
98
name: Tests
on:
pull_request:
push:
branches:
- main
paths-ignore:
- ".github/**"
- "docs/**"
- "README.rst"
jobs:
test-ubuntu:
name: Build (C++) on Ubuntu
runs-on: ubuntu-20.04
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Install dependencies
run: sudo apt install -y libomp-dev libopenblas-dev
- name: Checkout code
uses: actions/checkout@v2
- name: Initialize build directory
run: |
mkdir build
cd build
cmake -DENABLE_OPENMP=ON -DBUILD_TESTS=ON ../
- name: Build Jet
run: |
cd build
make -j`nproc`
- name: Run tests
run: |
cd build
mkdir test/results
./test/runner --order lex --reporter junit --out test/results/report.xml
- name: Upload test results
uses: actions/upload-artifact@v2
if: always()
with:
name: ubuntu-test-report
path: build/test/results/report.xml
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
check_name: Test Report (C++) on Ubuntu
files: build/test/results/report.xml
test-macos:
name: Build (C++) on MacOS
runs-on: macos-10.15
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Install dependencies
run: brew install libomp
- name: Checkout code
uses: actions/checkout@v2
- name: Initialize build directory
run: |
mkdir build
cd build
cmake -DENABLE_OPENMP=ON -DBUILD_TESTS=ON ../
- name: Build Jet
run: |
cd build
make -j`sysctl -n hw.physicalcpu`
- name: Run tests
run: |
cd build
mkdir test/results
./test/runner --order lex --reporter junit --out test/results/report.xml
- name: Upload test results
uses: actions/upload-artifact@v2
if: always()
with:
name: macos-test-report
path: build/test/results/report.xml