ci: remove Cargo.lock
-s in examples to avoid releaze-plz ci fail
#2411
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
name: Test Examples | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
RUSTFLAGS: -D warnings | |
jobs: | |
test: | |
runs-on: ${{ matrix.platform }} | |
name: "${{ matrix.example }} - ${{ matrix.platform }}" | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
# after fix of https://github.com/near/nearcore/pull/9140#issuecomment-1576655073, it should be [stable] | |
toolchain: [1.69.0] | |
example: [cross-contract-calls, fungible-token] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "${{ matrix.toolchain }} with and wasm32" | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
target: wasm32-unknown-unknown | |
- uses: Swatinem/rust-cache@v1 | |
with: | |
working-directory: ./examples/${{ matrix.example }} | |
- name: Build | |
env: | |
RUSTFLAGS: '-C link-arg=-s' | |
run: cargo +${{ matrix.toolchain }} build --manifest-path=./examples/${{matrix.example}}/Cargo.toml --target wasm32-unknown-unknown --release --all && cp ./examples/${{matrix.example}}/target/wasm32-unknown-unknown/release/*.wasm ./examples/${{matrix.example}}/res/ | |
- name: Test | |
run: cargo +${{ matrix.toolchain }} test --manifest-path=./examples/${{ matrix.example }}/Cargo.toml --all |