Skip to content

Commit

Permalink
update github action for torsten unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
yizhang-yiz committed Oct 26, 2023
1 parent f6be783 commit 9565f4c
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions .github/workflows/torsten_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ on:
- 'LICENSE.md'
- 'README.md'
- 'RELEASE-NOTES.txt'
workflow_dispatch:
inputs:
branch:
description: 'The branch to build'
required: true

jobs:
nix:
name: ubuntu/macos tests
Expand All @@ -22,17 +28,17 @@ jobs:
os: [ubuntu-latest, macos-latest]

steps:
- uses: n1hility/cancel-previous-runs@v2
- 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@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '2.x'
python-version: '3.x'
- name: Print g++ & make version and path
shell: bash
run: |
Expand Down Expand Up @@ -64,31 +70,37 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '2.x'
- name: Set up R 4.0
uses: r-lib/actions/setup-r@v1
python-version: '3.x'
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.0.0'
- name: Print g++ info
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
- name: Print mingw32-make info
shell: powershell
run: |
mingw32-make --version
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
shell: powershell

- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs
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 -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
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
Expand Down

0 comments on commit 9565f4c

Please sign in to comment.