-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (42 loc) · 1.18 KB
/
runTests.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
name: Run Unit Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
platform: [Windows, Linux, macOS]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout RAT
uses: actions/checkout@v3
- name: Build Mex
uses: matlab-actions/run-command@v1
with:
command: buildScript
- name: Run tests
uses: matlab-actions/run-command@v1
with:
command: testScript
- name: Create build archive (Windows and macOS)
if: runner.os != 'Linux'
run: tar --exclude="**/-lang:c++.zip" -acvf ${{ runner.os }}.zip compile
- name: Create build archive (Linux)
if: runner.os == 'Linux'
run: zip -r ${{ runner.os }}.zip compile -x "**/-lang:c++.zip"
- name: Upload release
if: github.ref == 'refs/heads/master'
uses: svenstaro/upload-release-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: nightly
overwrite: true
file: '${{ runner.os }}.zip'
asset_name: '${{ runner.os }}.zip'