ci: fix rustc version to 1.69.0 #651
Workflow file for this run
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
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml | |
name: Test and Lint CW contracts | |
on: | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- "contracts/cosmwasm-vm/**" | |
- "libraries/common/rust/**" | |
- ".github/workflows/basic-rust.yml" | |
push: | |
branches: | |
- main | |
env: | |
RUSTC_VERSION: '1.69.0' | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup install "$RUSTC_VERSION" | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run unit tests | |
run: | | |
RUST_BACKTRACE=1 cargo unit-test --locked | |
- name: Install wasm32 | |
run: | | |
rustup target add wasm32-unknown-unknown | |
- name: Compile WASM contract | |
run: | | |
RUSTFLAGS='-C link-arg=-s' cargo wasm --locked | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: contracts/cosmwasm-vm | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Uninstall Rust | |
run: | | |
rustup self uninstall | |
# Uninstall all Cargo packages | |
cargo uninstall --all | |
- name: Install Rust | |
run: | | |
rustup install "$RUSTC_VERSION" | |
rustup component add clippy | |
- name: check clippy version | |
run: | | |
cargo clippy -V | |
rustup show | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run cargo fmt | |
run: | | |
cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: | | |
cargo clippy | |
- name: Generate schema | |
run: | | |
../../scripts/run_in_subprojects.sh cw-ibc-core cw-icon-light-client cw-xcall-ibc-connection | |
- name: Verify schema | |
uses: tj-actions/verify-changed-files@v14 | |
id: verify-schema | |
with: | |
files: | | |
contracts/cosmwasm-vm/*/schema/** | |
- name: Display changed schemas | |
if: steps.verify-schema.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files: ${{ steps.verify-schema.outputs.changed_files }}" |