Skip to content

Commit

Permalink
Conserve CI minutes via cache, skip macOS+Windows MSRV builds (rojo-r…
Browse files Browse the repository at this point in the history
…bx#827)

Windows and macOS runners consume GitHub Actions minutes at [2x and 10x
the rate of Linux runners,
respectively](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#minute-multipliers).
This is a bit concerning now that there are two Windows jobs and two
macOS jobs, introduced in rojo-rbx#825.

This PR aims to reduce the cost by:
* Adding [rust-cache](https://github.com/Swatinem/rust-cache/) to reduce
the amount of time spent. I'm aware there were some concerns raised
about CI caches in general in rojo-rbx#496 - are they still a blocker?
* Removing the unnecessary Windows and macOS MSRV build jobs. If an MSRV
build fails on one platform due to usage of new language features, then
it will fail on all of them.

@Kampfkarren may have to change this repository's required status checks
before this PR can be merged
  • Loading branch information
kennethloeffler authored Jan 2, 2024
1 parent fd8bc8a commit 6adc5eb
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:

strategy:
matrix:
rust_version: [stable, 1.70.0]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand All @@ -27,10 +26,13 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
toolchain: stable
override: true
profile: minimal

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Setup Aftman
uses: ok-nick/[email protected]
with:
Expand All @@ -42,6 +44,33 @@ jobs:
- name: Test
run: cargo test --locked --verbose

msrv:
name: Check MSRV
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
override: true
profile: minimal

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Setup Aftman
uses: ok-nick/[email protected]
with:
version: 'v0.2.7'

- name: Build
run: cargo build --locked --verbose

lint:
name: Rustfmt, Clippy, & Stylua
runs-on: ubuntu-latest
Expand All @@ -58,6 +87,9 @@ jobs:
override: true
components: rustfmt, clippy

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Setup Aftman
uses: ok-nick/[email protected]
with:
Expand Down

0 comments on commit 6adc5eb

Please sign in to comment.