-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.52 KB
/
Copy pathci.yml
File metadata and controls
61 lines (49 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# SPDX-FileCopyrightText: 2026 Blackcat Informatics® Inc. <paudley@blackcatinformatics.ca>
# SPDX-License-Identifier: MIT OR Apache-2.0
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
rust:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: clippy, rustfmt
targets: wasm32-unknown-unknown
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Format
if: runner.os == 'Linux'
run: cargo fmt --check
- name: Clippy
if: runner.os == 'Linux'
run: cargo clippy --all-targets -- -D warnings
- name: Rustdoc
if: runner.os == 'Linux'
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps
- name: Test
run: cargo test --locked
- name: Wasm library build
if: runner.os == 'Linux'
run: cargo build --lib --target wasm32-unknown-unknown
- name: Package dry-run
if: runner.os == 'Linux'
run: cargo publish --locked --dry-run