Skip to content

Add more CI stuff.

Add more CI stuff. #6

Workflow file for this run

name: Build Wirdigen
on: [ push, pull_request ]
env:
CARGO_TERM_COLOR: always
jobs:
formatting:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Check formatting Wirdigen
uses: actions-rust-lang/rustfmt@v1
with:
manifest-path: './Cargo.toml'
- name: Check formatting Wirdigen WASM
uses: actions-rust-lang/rustfmt@v1
with:
manifest-path: './wasm/Cargo.toml'
build_cli:
name: Build Wirdigen CLI
needs: formatting
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build sources
run: cargo check --release
test_cli:
name: Test Wirdigen CLI
needs: build_cli
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Run tests
run: cargo test --release
build_wasm:
name: Build Wirdigen WASM
needs: formatting
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build sources
run:
cd wasm
wasm-pack build -t nodejs --out-name wirdigen --release
test_wasm:
name: Test Wirdigen WASM
needs: build_wasm
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Run tests
run:
cd wasm
wasm-pack test --node