Skip to content

Commit

Permalink
Add Github Actions for Windows RTools 3.5 tests (#1898)
Browse files Browse the repository at this point in the history
* testing github actions

* add ignore paths, add g++/ming32-make path checks

* fix syntax

* fix syntax

* run all tests together

* upload gtest output on failure

* intentional error

* syntax fix

* test name fix

* decrease n in stack_alloc_speed_test

* Revert "intentional error"

This reverts commit ab763b8.

# Conflicts:
#	.github/workflows/main.yml

* only run on pushes to develop
  • Loading branch information
rok-cesnovar authored May 26, 2020
1 parent d584931 commit 6699861
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Windows RTools 3.5

on:
push:
branches: [ develop ]
paths-ignore:
- 'doygen/**'
- 'hooks/**'
- 'licenses/**'
- 'LICENSE.md'
- 'README.md'
- 'RELEASE-NOTES.txt'
jobs:
full:
name: Full unit tests
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '2.x'
- name: Download RTools
run: Invoke-WebRequest -Uri https://cran.rstudio.com/bin/windows/Rtools/Rtools35.exe -OutFile ./R35.exe
- name: Install RTools
shell: powershell
run: Start-Process -FilePath ./R35.exe -ArgumentList /VERYSILENT -NoNewWindow -Wait
- name: PATH Setup
shell: powershell
run: echo "::add-path::C:/Rtools/bin"
- name: PATH Setup
shell: powershell
run: echo "::add-path::C:/Rtools/mingw_64/bin"
- name: Print g++ version
shell: powershell
run: g++ --version
- name: Print g++ path
shell: powershell
run: Get-Command g++ | Select-Object -ExpandProperty Definition
- name: Print mingw32-make version
shell: powershell
run: mingw32-make --version
- name: Print mingw32-make path
shell: powershell
run: Get-Command mingw32-make | Select-Object -ExpandProperty Definition
- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs
- name: Add TBB to PATH
shell: powershell
run: echo "::add-path::D:/a/math/math/lib/tbb"
- name: Run full unit tests
shell: powershell
run: python.exe runTests.py -j2 test/unit -f test/unit/
- name: Upload gtest_output xml
uses: actions/upload-artifact@v2
if: failure()
with:
name: gtest_outputs_xml
path: '**/*_test.xml'
2 changes: 1 addition & 1 deletion test/unit/math/memory/stack_alloc_speed_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
TEST(stack_alloc, speed_of_allocator) {
stan::math::stack_alloc allocator;
for (size_t m = 0; m < 10000; m++) {
for (size_t n = 1; n <= 100000; ++n) {
for (size_t n = 1; n <= 60000; ++n) {
allocator.alloc(n);
}
allocator.recover_all();
Expand Down

0 comments on commit 6699861

Please sign in to comment.