Don't fail on Node.js #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
clippy-rustdoc: | |
name: | |
Clippy & Rustdoc ${{ matrix.target.description }} ${{ matrix.rust.description }} ${{ | |
matrix.features.description }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- { target: wasm32-unknown-unknown, description: Web } | |
rust: | |
- { version: stable } | |
- { | |
version: nightly, | |
description: with Atomics, | |
component: ",rust-src", | |
flags: "-Ctarget-feature=+atomics,+bulk-memory", | |
args: "-Zbuild-std=panic_abort,std", | |
} | |
features: | |
- { features: "" } | |
- { features: --features audio-worklet, description: (`audio-worklet`) } | |
- { features: --features message, description: (`message`) } | |
- { | |
features: --features message, | |
description: (`message` + `web_sys_unstable_apis`), | |
flags: --cfg=web_sys_unstable_apis, | |
} | |
- { features: --all-features, description: (all features) } | |
- { | |
features: --all-features, | |
description: (all features + `web_sys_unstable_apis`), | |
flags: --cfg=web_sys_unstable_apis, | |
} | |
include: | |
- target: { target: x86_64-unknown-linux-gnu, description: Native } | |
rust: { version: stable } | |
features: { features: "" } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
rustup toolchain install ${{ matrix.rust.version }} --profile minimal --component clippy${{ matrix.rust.component }} --allow-downgrade --target ${{ matrix.target.target }} | |
rustup default ${{ matrix.rust.version }} | |
- name: Run Clippy | |
env: | |
RUSTFLAGS: ${{ matrix.rust.flags }} ${{ matrix.features.flags }} | |
run: | | |
cargo clippy --all-targets ${{ matrix.features.features }} --target ${{ matrix.target.target }} ${{ matrix.rust.args }} -- -D warnings | |
- name: Run Rustdoc | |
env: | |
RUSTDOCFLAGS: -D warnings ${{ matrix.rust.flags }} ${{ matrix.features.flags }} | |
RUSTFLAGS: ${{ matrix.rust.flags }} ${{ matrix.features.flags }} | |
run: | | |
cargo doc --no-deps --document-private-items --lib --examples ${{ matrix.features.features }} --target ${{ matrix.target.target }} ${{ matrix.rust.args }} | |
rustdoc-docsrs: | |
name: | |
Rustdoc (docsrs) ${{ matrix.target.description }} ${{ matrix.rust.description }} ${{ | |
matrix.features.description }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- { target: x86_64-unknown-linux-gnu, description: Native } | |
- { target: wasm32-unknown-unknown, description: Web } | |
rust: | |
- { version: nightly } | |
- { | |
version: nightly, | |
description: with Atomics, | |
component: --component rust-src, | |
flags: "-Ctarget-feature=+atomics,+bulk-memory", | |
args: "-Zbuild-std=panic_abort,std", | |
} | |
features: | |
- { features: "" } | |
- { features: --features audio-worklet, description: (`audio-worklet`) } | |
- { features: --features message, description: (`message`) } | |
- { | |
features: --features message, | |
description: (`message` + `web_sys_unstable_apis`), | |
flags: --cfg=web_sys_unstable_apis, | |
} | |
- { features: --all-features, description: (all features) } | |
- { | |
features: --all-features, | |
description: (all features + `web_sys_unstable_apis`), | |
flags: --cfg=web_sys_unstable_apis, | |
} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
rustup toolchain install ${{ matrix.rust.version }} --profile minimal ${{ matrix.rust.component }} --allow-downgrade --target ${{ matrix.target.target }} | |
rustup default ${{ matrix.rust.version }} | |
- name: Run Rustdoc | |
env: | |
RUSTDOCFLAGS: | |
-D warnings --cfg=docsrs ${{ matrix.rust.flags }} ${{ matrix.features.flags }} | |
RUSTFLAGS: ${{ matrix.rust.flags }} ${{ matrix.features.flags }} | |
run: | | |
cargo doc --no-deps --document-private-items --lib --examples ${{ matrix.features.features }} --target ${{ matrix.target.target }} ${{ matrix.rust.args }} | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./src/thread/atomics/script | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup NPM | |
run: npm install | |
- name: Run ESLint | |
run: npx eslint |