Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedup CI #805

Merged
merged 1 commit into from
May 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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