Skip to content

Commit

Permalink
Merge pull request #30 from charles-r-earp/ci-rework
Browse files Browse the repository at this point in the history
ci rework
  • Loading branch information
charles-r-earp authored Mar 23, 2024
2 parents c448560 + cbf0d00 commit db8efcf
Showing 1 changed file with 28 additions and 50 deletions.
78 changes: 28 additions & 50 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,23 @@ jobs:
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v4
- name: install toolchains
run: |
rustup update
rustup toolchain install nightly
rustup component add miri --toolchain nightly
rustup toolchain install nightly-2023-05-27
rustup component add rust-src rustc-dev llvm-tools-preview --toolchain nightly-2023-05-27
- name: build
if: ${{ !cancelled() }}
run: cargo build --workspace --features serde --all-targets -v
- name: test
if: ${{ !cancelled() }}
run: cargo test --workspace --no-default-features --features serde --all-targets -v
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: miri
- name: miri test
run: cargo +nightly miri test --no-default-features --features serde -v
wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install wasm-pack
run: cargo install wasm-pack -vv
- name: wasm test
run: wasm-pack test --headless --firefox -- --no-default-features -vv
run: wasm-pack test --headless --firefox -- --no-default-features --features serde -vv
env:
RUSTFLAGS: --cfg run_in_browser
krnlc:
Expand All @@ -82,6 +75,12 @@ jobs:
# spirv tools install copied from https://github.com/EmbarkStudios/rust-gpu/blob/main/.github/workflows/ci.yaml
steps:
- uses: actions/checkout@v4
- name: install toolchains
run: |
rustup update
rustup toolchain install nightly
rustup toolchain install nightly-2023-05-27
rustup component add rust-src rustc-dev llvm-tools-preview --toolchain nightly-2023-05-27
- if: ${{ runner.os == 'Linux' }}
name: Linux - Install native dependencies and spirv-tools
run: |
Expand Down Expand Up @@ -109,60 +108,39 @@ jobs:
run: echo "$HOME/spirv-tools/install/bin" >> $env:GITHUB_PATH
# end install spirv-tools
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-05-27
components: rust-src, rustc-dev, llvm-tools-preview
- name: check krnlc
if: ${{ !cancelled() }}
run: cargo +nightly-2023-05-27 -Zunstable-options -C=krnlc check --locked --no-default-features --features use-installed-tools -vv
- name: install krnlc
if: ${{ !cancelled() }}
run: cargo +nightly-2023-05-27 install --path krnlc --root . --locked --no-default-features --features use-installed-tools -vv --debug
- name: krnlc check
if: ${{ !cancelled() }}
run: ./bin/krnlc --check -p krnl -p krnlc-tests -p compute-benchmarks -v
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-05-27
components: rustfmt, clippy, rust-src, rustc-dev, llvm-tools-preview
- name: install toolchains
run: |
rustup update
rustup component add rustfmt clippy
rustup toolchain install nightly
rustup toolchain install nightly-2023-05-27
rustup component add rustfmt clippy rust-src rustc-dev llvm-tools-preview --toolchain nightly-2023-05-27
rustup toolchain install 1.70.0
- name: fmt
if: ${{ !cancelled() }}
run: cargo fmt --check
- name: install cargo-hack
if: ${{ !cancelled() }}
run: cargo install cargo-hack -v
- name: clippy
if: ${{ !cancelled() }}
run: cargo hack --feature-powerset --workspace --exclude-features "cuda ocl" --keep-going clippy --all-targets -- -D warnings
- name: krnlc fmt
if: ${{ !cancelled() }}
run: cargo +nightly-2023-05-27 fmt --check --manifest-path krnlc/Cargo.toml
- name: install cargo-hack
run: cargo install cargo-hack
- name: clippy
env:
CARGO_ALIAS_CLIPPYALL: clippy --workspace
run: cargo hack --feature-powerset --skip default clippyall --all-targets -v -- -D warnings
- name: krnlc clippy
if: ${{ !cancelled() }}
run: cargo +nightly-2023-05-27 clippy --manifest-path krnlc/Cargo.toml --no-default-features --features use-installed-tools -v -- -D warnings
- name: rustdoc
if: ${{ !cancelled() }}
run: cargo rustdoc --all-features -- --D warnings
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
- name: msrv
if: ${{ !cancelled() }}
run: |
cargo +nightly generate-lockfile -Zmsrv-policy
cat Cargo.lock
Expand Down

0 comments on commit db8efcf

Please sign in to comment.