Skip to content

Commit

Permalink
Merge pull request #805 from NobodyXu/speedup-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor authored May 14, 2023
2 parents 5dc2c3d + ced2360 commit f65aab4
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI
on: [push, pull_request]

env:
CARGO_INCREMENTAL: 0
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

jobs:
test:
name: Test
Expand Down Expand Up @@ -64,15 +68,13 @@ jobs:
rust: stable-x86_64
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@master
- name: Update Rustup (temporary workaround)
run: rustup self update
shell: bash
if: startsWith(matrix.os, 'windows')
- uses: actions/checkout@v3
- name: Install Rust (rustup)
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
run: |
set -euxo pipefail
rustup toolchain install ${{ matrix.rust }} --no-self-update --profile minimal --target ${{ matrix.target }}
rustup default ${{ matrix.rust }}
shell: bash
- run: rustup target add ${{ matrix.target }}
- name: Install g++-multilib
run: |
set -e
Expand All @@ -84,7 +86,6 @@ jobs:
sudo apt-get update
sudo apt-get install g++-multilib
if: matrix.build == 'linux32'
- run: cargo build
- run: cargo test ${{ matrix.no_run }}
- run: cargo test ${{ matrix.no_run }} --features parallel
- run: cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }}
Expand All @@ -95,7 +96,7 @@ jobs:
name: Test CUDA support
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Install cuda-minimal-build-11-8
shell: bash
run: |
Expand All @@ -106,7 +107,8 @@ jobs:
sudo apt-get -y install cuda-minimal-build-11-8
- name: Test 'cudart' feature
shell: bash
run: env PATH=/usr/local/cuda/bin:$PATH cargo test --manifest-path cc-test/Cargo.toml --features test_cuda
run: |
PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path cc-test/Cargo.toml --features test_cuda
msrv:
name: MSRV
Expand All @@ -115,17 +117,22 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update 1.46.0 --no-self-update && rustup default 1.46.0
run: |
rustup toolchain install 1.46.0 --no-self-update --profile minimal
rustup default 1.46.0
shell: bash
- run: cargo build
- run: cargo check --lib

rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
run: |
rustup toolchain install stable --no-self-update --profile minimal --component rustfmt
rustup default stable
shell: bash
- run: cargo fmt -- --check

0 comments on commit f65aab4

Please sign in to comment.