fix: Fix SIMD imports to work with latest nightly. #397
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: Rust (Linux) | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build (stable) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install latest mdbook | |
run: | | |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') | |
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | |
mkdir bin | |
curl -sSL $url | tar -xz --directory=bin | |
echo "$(pwd)/bin" >> $GITHUB_PATH | |
- name: Build | |
run: cargo build --verbose --features highs | |
- name: Run tests | |
run: cargo test --features highs | |
- name: Run mdbook tests | |
run: mdbook test ./pywr-book | |
build_schema_only: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build | |
run: cargo build --verbose --no-default-features --package [email protected] | |
- name: Run tests | |
run: cargo test --verbose --no-default-features --package [email protected] | |
build_nightly: | |
name: Build (nightly) w/ SIMD and OpenCL | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@nightly | |
- name: Install Intel OpenCL | |
run: sudo apt-get install -y intel-opencl-icd ocl-icd-opencl-dev | |
- name: Build | |
run: cargo +nightly build --verbose --no-default-features --features ipm-simd,ipm-ocl | |
- name: Run tests (SIMD only) | |
# Run tests with SIMD only to avoid OpenCL runtime requirement on Github actions. | |
run: cargo +nightly test --no-default-features --features ipm-simd |