Skip to content

Commit

Permalink
Run lints job on GitHub's runners
Browse files Browse the repository at this point in the history
We are spending a lot of time restoring our cache on our self-hosted
runners.  So let's try offloading some of the CI work back to GitHub.

Also upgrade our actions.
  • Loading branch information
matthiasgoergens committed Dec 13, 2024
1 parent af836bf commit 2ee5993
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
runs-on: [self-hosted, Linux, X64]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cargo cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,21 @@ on:
- master

jobs:
skip_check:
runs-on: [self-hosted, Linux, X64]
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'true'
concurrent_skipping: 'same_content_newer'
paths_ignore: '["**/README.md"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule", "merge_group"]'

lints:
needs: [skip_check]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: Various lints
timeout-minutes: 30
runs-on: [self-hosted, Linux, X64]
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt, clippy
targets: riscv32im-unknown-none-elf
# TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically?
toolchain: nightly-2024-12-06
- name: Cargo cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -51,6 +33,7 @@ jobs:
target/
guest/target/
key: lint-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: lint-${{ runner.os }}-cargo-

- name: Install cargo make
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
runs-on: [self-hosted, Linux, X64]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
targets: riscv32im-unknown-none-elf
# TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically?
toolchain: nightly-2024-12-06
- name: Cargo cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down

0 comments on commit 2ee5993

Please sign in to comment.