Porting code #21
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
release: | |
types: [published] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
RUST_VERSION: 1.75.0 | |
jobs: | |
lint-toml-files: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
- name: Install Cargo.toml linter | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-toml-lint | |
version: '0.1.1' | |
- name: Run Cargo.toml linter | |
run: git ls-files | grep Cargo.toml$ | xargs --verbose -n 1 cargo-toml-lint | |
orderbook-contract: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- name: Init cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Fuel toolchain | |
uses: FuelLabs/[email protected] | |
with: | |
toolchain: nightly | |
date: 2024-02-07 | |
- name: Check Sway formatting | |
run: forc fmt --check --path contract | |
- name: Build Sway | |
run: | | |
cd "contract" | |
forc build --locked | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- name: Init cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Fuel toolchain | |
uses: FuelLabs/[email protected] | |
with: | |
toolchain: nightly | |
date: 2024-02-07 | |
- name: Build Sway | |
run: | | |
cd "contract" | |
forc build --locked | |
- name: Check Rust formatting | |
run: cargo fmt --verbose --check --manifest-path tests/Cargo.toml | |
- name: Check Clippy Linter | |
run: cargo clippy --manifest-path tests/Cargo.toml --all-features --all-targets -- -D warnings | |
- name: Run Rust tests | |
run: cargo test --locked --manifest-path tests/Cargo.toml | |
SDK: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- name: Init cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Fuel toolchain | |
uses: FuelLabs/[email protected] | |
with: | |
toolchain: nightly | |
date: 2024-02-07 | |
- name: Build Sway | |
run: | | |
cd "contract" | |
forc build --locked | |
- name: Build Rust files | |
run: cargo build --locked --manifest-path spark-market-sdk/Cargo.toml | |
- name: Check Clippy Linter | |
run: cargo clippy --manifest-path spark-market-sdk/Cargo.toml --all-features --all-targets -- -D warnings | |
utils: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- name: Init cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build Rust files | |
run: cargo build --locked --manifest-path utils/Cargo.toml | |
- name: Check Clippy Linter | |
run: cargo clippy --manifest-path utils/Cargo.toml --all-features --all-targets -- -D warnings | |
scripts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- name: Init cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Fuel toolchain | |
uses: FuelLabs/[email protected] | |
with: | |
toolchain: nightly | |
date: 2024-02-07 | |
- name: Build Sway | |
run: | | |
cd "contract" | |
forc build --locked | |
- name: Build Rust files | |
run: cargo build --locked --manifest-path scripts/Cargo.toml | |
- name: Check Clippy Linter | |
run: cargo clippy --manifest-path scripts/Cargo.toml --all-features --all-targets -- -D warnings |