[changelog] contract v2.1.0 released #462
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: Cargo lint and test | |
on: | |
push: | |
branches: [ main ] | |
# pull_request: | |
# branches: [ main ] | |
env: | |
# Not needed in CI, should make things a bit faster | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
# Remove unnecessary WASM build artifacts | |
WASM_BUILD_CLEAN_TARGET: 1 | |
# Stripping symbols and optimizing for binary size | |
RUSTFLAGS: -C strip=symbols -C opt-level=s | |
RUSTC_WRAPPER: sccache | |
SCCACHE_GHA_ENABLED: true | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 50 | |
steps: | |
- name: ππΌ Maximize build space | |
uses: AdityaGarg8/remove-unwanted-software@v3 | |
with: | |
remove-android: 'true' | |
remove-dotnet: 'true' | |
remove-haskell: 'true' | |
remove-codeql: 'true' | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: βοΈ Install rust compilation dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install libudev-dev | |
- name: π¨βπ§ Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: π©βπ§ Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: π¦Ώ Install Rust tookchain | |
uses: dtolnay/[email protected] | |
with: | |
components: rustfmt, clippy | |
- name: π« Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- run: pnpm install | |
- run: pnpm lint | |
- run: cargo test --release -- --nocapture |