Skip to content

Merge upstream (Aug 19th, 2024) #128

Merge upstream (Aug 19th, 2024)

Merge upstream (Aug 19th, 2024) #128

Workflow file for this run

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@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: i686-pc-windows-msvc, i686-unknown-linux-gnu, wasm32-unknown-unknown
- 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: Test with libcrux provider
if: matrix.os == 'ubuntu-latest'
run: |
cargo install wasm-bindgen-cli
cargo test $TEST_MODE -p openmls -vv -F libcrux-provider
- name: Tests Wasm32 on linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update && sudo apt install nodejs
cargo install wasm-bindgen-cli
export CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=$HOME/.cargo/bin/wasm-bindgen-test-runner
cargo test $TEST_MODE -p openmls -vv --target wasm32-unknown-unknown -F js
- 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