Skip to content

Use docs hub in favor of book (#255) #802

Use docs hub in favor of book (#255)

Use docs hub in favor of book (#255) #802

Workflow file for this run

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:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
RUST_VERSION: 1.77.0
FORC_VERSION: 0.60.0
CORE_VERSION: 0.26.0
jobs:
build-sway-lib:
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: rustfmt
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Check Sway formatting
run: forc fmt --path libs --check
- name: Check Rust formatting
run: cargo fmt --manifest-path tests/Cargo.toml --verbose --check
- name: Build All Libs
run: forc build --path libs --release --locked
- name: Build All Tests
run: forc build --path tests --release --locked
- name: Cargo Test sway-lib
run: |
cargo test --manifest-path tests/Cargo.toml
forc-inline-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 }}
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Run Libs Tests
run: forc build --path libs --release --locked && forc test --path libs --locked
- name: Run Tests Tests
run: forc build --path tests --release --locked && forc test --path tests --locked
contributing-book:
runs-on: ubuntu-latest
strategy:
matrix:
project: ["docs/contributing-book/src/code"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Check Sway formatting
run: forc fmt --path ${{ matrix.project }} --check
- name: Build Sway
run: forc build --path ${{ matrix.project }} --release
build-forc-doc-sway-libs:
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 }}
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Build sway-libs docs
run: |
forc doc --manifest-path libs
build-examples:
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: rustfmt
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Check Sway formatting
run: forc fmt --path examples --check
- name: Check Rust formatting
run: cargo fmt --manifest-path examples/Cargo.toml --verbose --check
- name: Build All Examples
run: forc build --path examples --release --locked
- name: Cargo Test Examples
run: |
cargo test --manifest-path examples/Cargo.toml