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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
name: Rust
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
ubuntu:
runs-on: ubuntu-latest
name: test on ubuntu
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache Cargo Dependencies
uses: Swatinem/rust-cache@v1.3.0
- name: Build without default features
run: cargo build --no-default-features --verbose
- name: Run tests without default features
run: cargo test --no-default-features --verbose
- name: Build with rayon feature
run: cargo build --features rayon --verbose
- name: Run tests with rayon feature
run: cargo test --features rayon --verbose
macos:
runs-on: macos-latest
name: test on mac os
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache Cargo Dependencies
uses: Swatinem/rust-cache@v1.3.0
- name: Build without default features
run: cargo build --no-default-features --verbose
- name: Run tests without default features
run: cargo test --no-default-features --verbose
- name: Build with rayon feature
run: cargo build --features rayon --verbose
- name: Run tests with rayon feature
run: cargo test --features rayon --verbose
verify-msrv:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
name: verify minimum supported rust version without cache (takes longer, but caching produces unexpected behaviour)
timeout-minutes: 30
# we are using the `cargo-msrv` app
# https://github.com/foresterre/cargo-msrv
steps:
- uses: actions/checkout@v2
- name: Install foresterre/cargo-msrv
run: cargo install cargo-msrv
- uses: dtolnay/rust-toolchain@nightly
- name: Generate Cargo.lock with minimal-version dependencies
run: cargo -Zminimal-versions generate-lockfile
- name: Verify the Rustc version declared in `Cargo.toml` with `minimal-versions`
run: cargo-msrv verify
# github actions does not support big endian systems directly, but it does support QEMU.
# so we use cross-rs, which uses QEMU internally.
big-endian:
runs-on: ubuntu-latest
name: test on emulated big endian system
timeout-minutes: 90 # todo just make tests faster wtf
# we are using the cross project for cross compilation:
# https://github.com/cross-rs/cross
steps:
- uses: actions/checkout@v2
- name: Install or use cached cross-rs/cross
uses: baptiste0928/cargo-install@v1
with:
crate: cross
- name: Cache Cargo Dependencies
uses: Swatinem/rust-cache@v1.3.0
- name: Start Docker
run: sudo systemctl start docker
# https://github.com/cross-rs/cross#supported-targets
- name: Cross-Compile project to powerpc-unknown-linux-gnu without rayon feature
run: cross build --target powerpc-unknown-linux-gnu --no-default-features --verbose
- name: Cross-Run Tests in powerpc-unknown-linux-gnu without rayon feature
run: cross test --target powerpc-unknown-linux-gnu --no-default-features --verbose
- name: Cross-Compile project to powerpc-unknown-linux-gnu with rayon feature
run: cross build --target powerpc-unknown-linux-gnu --features rayon --verbose
- name: Cross-Run Tests in powerpc-unknown-linux-gnu with rayon feature
run: cross test --target powerpc-unknown-linux-gnu --features rayon --verbose
wasm32:
runs-on: ubuntu-latest
name: test on wasm32
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- name: Cache Cargo Dependencies
uses: Swatinem/rust-cache@v1.3.0
- name: Add wasm32 Target
run: rustup target add wasm32-unknown-unknown
- name: Build without default features
run: cargo build --verbose --no-default-features --target wasm32-unknown-unknown
- name: Run tests without default features
run: cargo test --verbose --no-default-features
|