Skip to content

Commit

Permalink
CI: Install wasm-pack
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-bourne committed Oct 20, 2023
1 parent bf70864 commit e1ec551
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions packages/xtask/src/main.rs
Original file line number Diff line number Diff line change
@@ -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")
}

0 comments on commit e1ec551

Please sign in to comment.