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

ci: cargo test speedups #3843

Merged
merged 10 commits into from
Feb 17, 2022
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
90 changes: 27 additions & 63 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- name: caching
uses: actions/cache@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-clippy-
${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-
toolchain: ${{ env.toolchain }}
components: clippy, rustfmt
override: true
- uses: Swatinem/rust-cache@v1
- name: ubuntu dependencies
run: |
sudo apt-get update && \
Expand Down Expand Up @@ -63,12 +59,6 @@ jobs:
cd applications/launchpad/gui-vue
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.toolchain }}
components: clippy, rustfmt
override: true
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
Expand All @@ -85,17 +75,13 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- name: caching
uses: actions/cache@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-build-
${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-
toolchain: ${{ env.toolchain }}
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- name: ubuntu dependencies
run: |
sudo apt-get update && \
Expand All @@ -116,12 +102,6 @@ jobs:
cd applications/launchpad/gui-vue
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.toolchain }}
components: clippy, rustfmt
override: true
- name: cargo check
uses: actions-rs/cargo@v1
with:
Expand All @@ -133,17 +113,13 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- name: caching
uses: actions/cache@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.cpu-model }}-stable-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.cpu-model }}-stable-build-
${{ runner.os }}-${{ runner.cpu-model }}-stable-
toolchain: stable
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- name: ubuntu dependencies
run: |
sudo apt-get update && \
Expand All @@ -164,12 +140,6 @@ jobs:
cd applications/launchpad/gui-vue
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: rustup show
run: |
rustup show
Expand All @@ -180,22 +150,16 @@ jobs:
args: --release --all-targets
test:
name: test
needs: build
# needs: build
runs-on: ubuntu-18.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: caching
uses: actions/cache@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-test-
${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-
toolchain: ${{ env.toolchain }}
- uses: Swatinem/rust-cache@v1
- name: ubuntu dependencies
run: |
sudo apt-get update && \
Expand All @@ -216,12 +180,12 @@ jobs:
cd applications/launchpad/gui-vue
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
- name: cargo test compile
uses: actions-rs/cargo@v1
with:
toolchain: ${{ env.toolchain }}
command: test
args: --no-run --locked
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all-targets