sketch: read blocks on demand #428
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: | |
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/[email protected] | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --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/[email protected] | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
verify-msrv: | |
runs-on: ubuntu-latest | |
name: verify minimum supported rust version (ubuntu) | |
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 without cache (takes longer, but caching produces unexpected behaviour) | |
run: cargo install cargo-msrv | |
- name: Verify the Rustc version declared in `cargo.toml` without cache (takes longer, but caching produces unexpected behaviour) | |
run: | | |
rm -f Cargo.lock | |
cargo update | |
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-20.04 | |
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/[email protected] | |
- name: Start Docker | |
run: sudo systemctl start docker | |
- name: Cross-Compile project to powerpc-unknown-linux-gnu | |
run: cross build --target powerpc-unknown-linux-gnu --verbose | |
# https://github.com/cross-rs/cross#supported-targets | |
- name: Cross-Run Tests in powerpc-unknown-linux-gnu using Qemu | |
run: cross test --target powerpc-unknown-linux-gnu --verbose | |
wasm32: | |
runs-on: ubuntu-latest | |
name: test on wasm32 | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache Cargo Dependencies | |
uses: Swatinem/[email protected] | |
- 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 | |