From e1ec55153f1e619db8fbc957b2789a78b148f64f Mon Sep 17 00:00:00 2001 From: Simon Bourne Date: Fri, 20 Oct 2023 19:25:38 +0100 Subject: [PATCH] CI: Install wasm-pack --- .github/workflows/ci-tests.yml | 6 ++++++ Cargo.lock | 2 +- packages/xtask/src/main.rs | 28 ++++++++++++++++++++++------ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 8e50825..c2b19a3 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -13,7 +13,9 @@ jobs: profile: minimal default: true components: clippy + targets: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 + - run: cargo install wasm-pack --locked --version 0.12.1 - run: cargo xtask codegen --check - run: cargo clippy --all-targets -- -D warnings -D clippy::all - run: cargo test @@ -29,7 +31,9 @@ jobs: profile: minimal default: true components: clippy + targets: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 + - run: cargo install wasm-pack --locked --version 0.12.1 - run: cargo xtask codegen --check - run: cargo clippy --all-targets -- -D warnings -D clippy::all - run: cargo test @@ -45,7 +49,9 @@ jobs: profile: minimal default: true components: clippy + targets: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 + - run: cargo install wasm-pack --locked --version 0.12.1 - run: cargo xtask codegen --check - run: cargo clippy --all-targets -- -D warnings -D clippy::all - run: cargo test diff --git a/Cargo.lock b/Cargo.lock index 9a875fb..51985b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3365,7 +3365,7 @@ dependencies = [ [[package]] name = "xtask-base" version = "0.1.0" -source = "git+https://github.com/simon-bourne/rust-xtask-base#3145ce02fb9f77336750e7d5a392d3d399d64e42" +source = "git+https://github.com/simon-bourne/rust-xtask-base#0bdc4e42bd4549e63a62dd9a70248e3054f30bde" dependencies = [ "cargo_metadata", "chrono", diff --git a/packages/xtask/src/main.rs b/packages/xtask/src/main.rs index 8d22e9e..c0ee7ef 100644 --- a/packages/xtask/src/main.rs +++ b/packages/xtask/src/main.rs @@ -1,12 +1,28 @@ -use xtask_base::{ci::CI, generate_open_source_files, CommonCmds}; +use xtask_base::{ + ci::{Tasks, CI}, + generate_open_source_files, + github::actions::{install, rust_toolchain, Platform}, + CommonCmds, +}; fn main() { - // TODO: Use `CI::standard_workflow()` once release mode tests are working. - CommonCmds::run(ci(), |check| generate_open_source_files(2021, check)) + let codegen = |check| generate_open_source_files(2021, check); + CommonCmds::run(ci(), codegen) } fn ci() -> CI { - CI::new() - .standard_tests("1.73") - .standard_lints("nightly-2023-10-14", "0.1.43") + let mut workflow = CI::new(); + for platform in Platform::latest() { + workflow.add_job( + Tasks::new( + "tests", + platform, + rust_toolchain("1.73").minimal().default().clippy().wasm(), + ) + .step(install("wasm-pack", "0.12.1")) + .tests(), + ); + } + + workflow.standard_lints("nightly-2023-10-14", "0.1.43") }