Test 19 #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
if: ${{ ! startsWith(matrix.build, 'anaconda') }} | |
run: python3 -m pip install -U matplotlib | |
- name: Setup Miniconda | |
if: startsWith(matrix.build, 'anaconda macos') | |
uses: conda-incubator/[email protected] | |
- name: Install Matplotlib (Anaconda) | |
if: startsWith(matrix.build, 'anaconda') | |
run: $CONDA/bin/conda install conda-forge::matplotlib | |
- name: Install Rust (rustup) | |
run: | | |
rustup update --no-self-update | |
rustup default ${{ matrix.rust }} | |
if: ${{ ! startsWith(matrix.build, 'anaconda') }} | |
- run: cargo build -v | |
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 on Linux | |
if: startsWith(matrix.build, 'anaconda linux') | |
run: | | |
eval "$($CONDA/bin/conda shell.bash activate)" | |
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib | |
cargo run --example a_simple_example | |
- name: Run example with Anaconda on MacOS | |
continue-on-error: true | |
if: startsWith(matrix.build, 'anaconda macos') | |
shell: bash | |
run: | | |
eval "$($CONDA/bin/conda shell.bash activate)" | |
export DYLD_LIBRARY_PATH=$CONDA_PREFIX/lib | |
echo "** Install Rust" | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o install_rust | |
chmod +x install_rust | |
./install_rust -y | |
echo "** rustup update" | |
rustup update --no-self-update | |
rustup default ${{ matrix.rust }} | |
cargo run --example a_simple_example | |
cargo run --example flower |