Rust #23
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 | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: 5 16 * * 3 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: ["1.48.0", "stable", "beta", "nightly"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install toolchains | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Build | |
run: cargo +${{ matrix.toolchain }} build --verbose | |
- name: Pin plotters | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p plotters --precise 0.3.1 | |
- name: Pin once_cell | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p once_cell --precise 1.14.0 | |
- name: Pin rayon | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p rayon --precise 1.5.3 | |
- name: Pin rayon-core | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p rayon-core --precise 1.9.3 | |
- name: Pin backtrace | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p backtrace --precise 0.3.66 | |
- name: Pin object | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p object --precise 0.29.0 | |
- name: Run tests | |
run: cargo +${{ matrix.toolchain }} test --all-features --verbose -- --skip _runsinglethread | |
- name: Run tests (single-threaded tests) | |
run: cargo +${{ matrix.toolchain }} test --all-features --verbose -- _runsinglethread --test-threads 1 | |
- name: Build docs (all features) | |
run: cargo +${{ matrix.toolchain }} doc --all-features | |
- name: Build docs | |
run: cargo +${{ matrix.toolchain }} doc | |
check: | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: ["1.48.0", "stable", "beta", "nightly"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install toolchains (aarch64) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
target: aarch64-linux-android | |
- name: Install toolchains (i686) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
target: i686-unknown-linux-gnu | |
- name: Pin once_cell | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p once_cell --precise 1.14.0 | |
- name: Pin backtrace | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p backtrace --precise 0.3.66 | |
- name: Pin object | |
if: matrix.toolchain == '1.48.0' | |
run: cargo update -p object --precise 0.29.0 | |
- name: cargo check (aarch64) | |
run: cargo +${{ matrix.toolchain }} check --target aarch64-linux-android --all-features | |
- name: cargo check (i686) | |
run: cargo +${{ matrix.toolchain }} check --target i686-unknown-linux-gnu --all-features | |