-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (72 loc) · 2.42 KB
/
rust.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
65
66
67
68
69
70
71
72
73
name: Cargo Build & Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [stable, beta, nightly, anaconda linux, macos, anaconda macos, macos-aarch64, anaconda macos-aarch64, win64]
include:
- build: stable
os: ubuntu-latest
rust: stable
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
- build: anaconda linux
os: ubuntu-latest
rust: stable
- build: macos
os: macos-latest
rust: stable
- build: anaconda macos
os: macos-latest
rust: nightly
- build: macos-aarch64
# Must install app https://github.com/apps/flyci-prod
os: flyci-macos-large-latest-m1
rust: stable
- build: anaconda macos-aarch64
os: flyci-macos-large-latest-m1
rust: stable
- build: win64
os: windows-latest
rust: stable
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v5
with:
python-version: '3.12'
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
- name: Install Matplotlib (pip)
run: python3 -m pip install -U matplotlib
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
- name: Setup Miniconda
uses: conda-incubator/[email protected]
if: startsWith(matrix.build, 'anaconda macos')
- name: Install Matplotlib (Anaconda)
run: $CONDA/bin/conda install conda-forge::matplotlib
if: startsWith(matrix.build, 'anaconda')
- name: Install Rust ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- run: cargo build
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
- run: cargo test
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
- run: cargo run --example a_simple_example
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
- name: Run example with Anaconda
if: startsWith(matrix.build, 'anaconda')
shell: bash
run: |
eval "$($CONDA/bin/conda shell.bash activate)"
mkdir -p target/debug/deps
ln -s $CONDA_PREFIX/lib/libpython* target/debug/deps
cargo run --example a_simple_example