-
-
Notifications
You must be signed in to change notification settings - Fork 4
115 lines (105 loc) · 3.31 KB
/
torsten_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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Torsten Math tests
on:
pull_request:
branches: [ torsten-develop, torsten-master ]
push:
branches: [ torsten-develop, torsten-master, torsten-workflow ]
paths-ignore:
- 'doygen/**'
- 'hooks/**'
- 'licenses/**'
- 'LICENSE.md'
- 'README.md'
- 'RELEASE-NOTES.txt'
workflow_dispatch:
inputs:
branch:
description: 'The branch to build'
required: true
jobs:
nix:
name: ubuntu/macos tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/torsten-master' && github.ref != 'refs/heads/torsten-develop'"
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Print g++ & make version and path
shell: bash
run: |
g++ --version
make --version
- name: Build Math libs
shell: bash
run: make -j2 -f make/standalone math-libs
- name: Add TBB to PATH
shell: bash
run: echo "./lib/tbb" >> $GITHUB_PATH
- name: Add Torsten to PATH
shell: bash
run: echo "./stan/math/torsten" >> $GITHUB_PATH
- name: Run Torsten unit test
shell: bash
run: |
python runTests.py -j2 stan/math/torsten/test/unit
- name: Upload gtest_output xml
uses: actions/upload-artifact@v2
if: failure()
with:
name: gtest_outputs_xml
path: 'stan/math/torsten/**/*_test.xml'
win:
name: windows tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.1.3
- name: Set path for Rtools40
if: runner.os == 'Windows'
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install mingw32-make and check toolchain path
if: runner.os == 'Windows'
run: |
pacman -Syu mingw-w64-x86_64-make --noconfirm
g++ --version
Get-Command g++ | Select-Object -ExpandProperty Definition
mingw32-make --version
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
shell: powershell
- name: Build Math libs
shell: powershell
run: |
Add-Content make\local "O=1`n"
mingw32-make -f make/standalone math-libs -j2
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Add Torsten to PATH
shell: powershell
run: echo "D:/a/math/math/stan/math/torsten" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run Torsten unit test
shell: powershell
run: python runTests.py -j2 stan/math/torsten/test/unit -f stan/math/torsten/test/unit
- name: Upload gtest_output xml
uses: actions/upload-artifact@v2
if: failure()
with:
name: gtest_outputs_xml
path: 'stan/math/torsten/**/*_test.xml'