chore: update ckb-ics repo (#39) #256
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: CI | |
on: | |
push: | |
branches: [ master, develop, release/* ] | |
pull_request: | |
branches: [ master, release/* ] | |
defaults: | |
run: | |
shell: bash | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -D warnings -C target-feature=-a | |
RUST_BACKTRACE: full | |
RUST_TOOLCHAIN: 1.68.2 | |
jobs: | |
# | |
# Contracts | |
# | |
format-contracts: | |
name: Checks / Format (contracts) | |
runs-on: ubuntu-latest | |
container: | |
image: yangby0cryptape/ibc-ckb-contracts-build-env:0.2.0-alpha.0 | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Run the Checker | |
run: make format-all-contracts | |
lint-contracts: | |
name: Checks / Lint (contracts) | |
runs-on: ubuntu-latest | |
container: | |
image: yangby0cryptape/ibc-ckb-contracts-build-env:0.2.0-alpha.0 | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Run the Checker | |
run: make lint-all-contracts | |
build-contracts: | |
name: Build / Debug (contracts) | |
needs: [ format-contracts, lint-contracts ] | |
runs-on: ubuntu-latest | |
container: | |
image: yangby0cryptape/ibc-ckb-contracts-build-env:0.2.0-alpha.0 | |
env: | |
CARGO_BUILD_ARGS: --features debugging | |
CARGO_PROFILE_RELEASE_DEBUG: true | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Build Contracts in Debug Mode | |
run: make all-contracts | |
- name: Upload Contracts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: all-contracts-in-debug-mode | |
path: build | |
# | |
# Test Utils | |
# | |
format-test-utils: | |
name: Checks / Format (test-utils) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Set Rust Toolchain | |
run: | | |
rustup toolchain install --profile minimal ${{ env.RUST_TOOLCHAIN }} | |
rustup default ${{ env.RUST_TOOLCHAIN }} | |
rustup component add rustfmt | |
- name: Run the Checker | |
run: make format-test-utils | |
lint-test-utils: | |
name: Checks / Lint (test-utils) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Set Rust Toolchain | |
run: | | |
rustup toolchain install --profile minimal ${{ env.RUST_TOOLCHAIN }} | |
rustup default ${{ env.RUST_TOOLCHAIN }} | |
rustup component add clippy | |
- name: Run the Checker | |
run: make lint-test-utils | |
# | |
# Run Tests | |
# | |
run-tests: | |
name: Tests / Build & Test | |
needs: [ build-contracts, format-test-utils, lint-test-utils ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Set Rust Toolchain | |
run: | | |
rustup toolchain install --profile minimal ${{ env.RUST_TOOLCHAIN }} | |
rustup default ${{ env.RUST_TOOLCHAIN }} | |
- name: Download Contracts | |
uses: actions/download-artifact@v3 | |
with: | |
name: all-contracts-in-debug-mode | |
path: build | |
- name: Run the Tests | |
run: make test | |
# | |
# Build Contracts in Release Mode | |
# | |
release-contracts: | |
name: Build / Release (contracts) | |
needs: [ run-tests ] | |
runs-on: ubuntu-latest | |
container: | |
image: yangby0cryptape/ibc-ckb-contracts-build-env:0.2.0-alpha.0 | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Build Contracts in Release Mode | |
run: make all-contracts | |
- name: Upload Contracts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: all-contracts | |
path: build |