Bumped version to 0.1.6 #46
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: | |
# see https://matklad.github.io/2021/09/04/fast-rust-builds.html | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
CI: 1 | |
RUST_BACKTRACE: short | |
RUSTFLAGS: "-W rust-2021-compatibility" | |
RUSTUP_MAX_RETRIES: 10 | |
jobs: | |
fmt: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
# Required for some of the arguments | |
toolchain: nightly | |
components: rustfmt,clippy | |
- name: rustfmt | |
run: cargo fmt --all -- --check | |
- name: clippy | |
run: cargo clippy --all-targets --all-features | |
tests: | |
runs-on: windows-latest | |
needs: fmt | |
strategy: | |
matrix: | |
features: ["", "-F dynamic-import"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Show version | |
run: | | |
rustup show | |
cargo --version | |
rustc --version | |
- name: Build | |
run: cargo build ${{ matrix.features }} --all-targets | |
- name: Test | |
run: cargo test ${{ matrix.features }} -- --nocapture | |
env: | |
RUST_LOG: trace | |
# Running multiple instances in parallel might cause | |
# a crash for low end environments. | |
RUST_TEST_THREADS: 1 | |
deploy: | |
runs-on: windows-latest | |
needs: tests | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: katyo/publish-crates@v2 | |
with: | |
path: "./windows-projfs/" | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
dry-run: ${{ github.ref != 'refs/heads/master' }} |