Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contract build with lint option to CI #1496

Merged
merged 11 commits into from
Feb 14, 2024
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,32 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install stable toolchain
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-12-28

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
target: wasm32-unknown-unknown
components: rust-src, clippy
components: rust-src

- name: Cache
uses: Swatinem/rust-cache@v2

- name: Check Template
run: >-
# The linter requires two crates
cargo install cargo-dylint dylint-link
cargo -vV &&
cargo run --profile debug-ci -- contract --version &&
cargo run --profile debug-ci -- contract new --target-dir ${{ runner.temp }} foobar &&
# Disable linting due to issue with stdsimd
#cargo run --profile debug-ci -- contract build --lint --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract check --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml --release
Loading