-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 1.91 KB
/
multi-test.yml
File metadata and controls
78 lines (67 loc) · 1.91 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
name: Global Test Automation
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
test:
name: Test ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-14
target: aarch64-apple-darwin
- os: macos-14
target: x86_64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust Cache
uses: swatinem/rust-cache@v2
- name: Run Tests
working-directory: rust
run: cargo test --target ${{ matrix.target }}
env:
PYO3_PYTHON: python
- name: Install Python Dependencies
shell: bash
run: pip install zstandard
- name: Build Release CLI
working-directory: rust
shell: bash
run: cargo build --release -p cortex-cli --target ${{ matrix.target }}
env:
PYO3_PYTHON: python
- name: Run Python Adversarial Tests
working-directory: rust
shell: bash
run: |
mkdir -p target/release
if [ "${{ runner.os }}" == "Windows" ]; then
cp target/${{ matrix.target }}/release/cortex.exe target/release/cortex.exe
else
cp target/${{ matrix.target }}/release/cortex target/release/cortex
fi
python tests/adversarial_arena.py
- name: Run E2E Execution Test
shell: bash
run: bash rust/tests/cross_os_e2e.sh