f8733f59c5
* Remove unused Makefile target * Split out ci-contracts-upload-binaries * Remove the contracts from the main workflow * Rename build-and-upload-binaries-ci * Rename network-explorer name * Rename network-explorer filename and check-merge-conflicts * Rename three more workflows * Rename sdk-publish * Remove deprecated clippy-all * Rename matrix includes json and delete one that is unused * Typo in filename * Delete nym-wallet-release.yml
68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
name: ci-contracts
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'contracts/**'
|
|
- 'common/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'contracts/**'
|
|
- 'common/**'
|
|
|
|
jobs:
|
|
matrix_prep:
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
# creates the matrix strategy from ci-contracts-matrix-includes.json
|
|
- uses: actions/checkout@v2
|
|
- id: set-matrix
|
|
uses: JoshuaTheMiller/conditional-build-matrix@main
|
|
with:
|
|
inputFile: '.github/workflows/ci-contracts-matrix-includes.json'
|
|
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
|
build:
|
|
# since it's going to be compiled into wasm, there's absolutely
|
|
# no point in running CI on different OS-es
|
|
runs-on: ubuntu-20.04
|
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
|
needs: matrix_prep
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
target: wasm32-unknown-unknown
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
env:
|
|
RUSTFLAGS: '-C link-arg=-s'
|
|
with:
|
|
command: build
|
|
args: --manifest-path contracts/Cargo.toml --workspace --lib --target wasm32-unknown-unknown
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --lib --manifest-path contracts/Cargo.toml
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --manifest-path contracts/Cargo.toml --all -- --check
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.rust != 'nightly' }}
|
|
with:
|
|
command: clippy
|
|
args: --lib --manifest-path contracts/Cargo.toml --workspace --all-targets -- -D warnings
|