Skip to content

Bump boundless-market to v0.10 #48

Bump boundless-market to v0.10

Bump boundless-market to v0.10 #48

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUST_BACKTRACE: "1"
jobs:
# see: https://github.com/orgs/community/discussions/26822
main-status-check:
if: always()
needs:
- test
- lint
runs-on: ubuntu-latest
steps:
- name: Check all job status
# see https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context
# see https://stackoverflow.com/a/67532120/4907315
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
test:
runs-on: ubuntu-latest
steps:
# This is a workaround from: https://github.com/actions/checkout/issues/590#issuecomment-970586842
- name: checkout dummy commit (submodule bug workaround)
run: "git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :"
- name: checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
- name: install cargo risczero
uses: ./.github/actions/bininstall-risc0
with:
risczero-version: '2.1.0'
toolchain-version: '1.85.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: cargo build
run: cargo build
- name: forge build
run: forge build
- name: cargo test
run: cargo test
- name: forge test
run: forge test -vvv
env:
RISC0_DEV_MODE: "true"
lint:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
- name: install rust
uses: risc0/risc0/.github/actions/rustup@release-2.1
with:
toolchain: '1.85'
- name: install cargo-sort
uses: baptiste0928/cargo-install@904927dbe77864e0f2281519fe9d5bd097a220b3
with:
crate: cargo-sort
version: "=1.0.9"
locked: true
- name: cargo Sort
run: cargo sort --workspace --check
- name: cargo format
run: cargo fmt --all -- --check
- name: lint guest rust code
working-directory: guests/is-even
run: cargo fmt --all --check
- name: cargo clippy
run: cargo clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -Dwarnings
RISC0_SKIP_BUILD: true
RISC0_SKIP_BUILD_KERNEL: true,
- name: forge fmt
run: forge fmt --check