-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (69 loc) · 2.38 KB
/
test.yml
File metadata and controls
80 lines (69 loc) · 2.38 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: "Run Tests"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Run Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-latest
platform: linux
arch: x64
- os: windows-11-arm
platform: windows
arch: arm64
- os: windows-latest
platform: windows
arch: x64
- os: macos-latest
platform: macos
arch: arm64
steps:
- name: Checkout sources
uses: actions/checkout@v4
# Set up Python. We only do this on Github hosted runners since it
# won't work on our self hosted macOS runner.
- name: Set up Python
uses: actions/setup-python@v5
if: matrix.platform == 'linux' || matrix.platform == 'windows'
with:
python-version: '3.11'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install ipykernel
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies (Linux)
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libsodium-dev libzmq3-dev
- name: Install dependencies (Windows)
if: matrix.platform == 'windows'
run: |
vcpkg install zeromq:${{ matrix.arch }}-windows
shell: cmd
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests
run: cargo test --verbose --all
env:
RUST_BACKTRACE: 1