forked from openmls/openmls
-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (57 loc) · 1.76 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
name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
tests:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
mode:
# - debug
- release
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: i686-pc-windows-msvc, i686-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- name: Toggle rustc mode
if: matrix.os != 'windows-latest'
run: |
if [ ${{ matrix.mode }} == debug ]; then
echo "TEST_MODE=" >> $GITHUB_ENV
else
echo "TEST_MODE=--release" >> $GITHUB_ENV
fi
- name: Tests
if: matrix.os != 'windows-latest'
run: cargo test $TEST_MODE -p openmls --verbose
# Test 32 bit builds on windows
- name: Tests 32bit windows debug
if: matrix.mode == 'debug' && matrix.os == 'windows-latest'
run: cargo test -p openmls --verbose --target i686-pc-windows-msvc
- name: Tests 32bit windows release
if: matrix.mode == 'release' && matrix.os == 'windows-latest'
run: cargo test --release -p openmls --verbose --target i686-pc-windows-msvc
# Test 32 bit builds on linux
- name: Tests 32bit linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update && sudo apt install gcc-multilib
cargo test $TEST_MODE -p openmls --verbose --target i686-unknown-linux-gnu