Skip to content

Commit

Permalink
Merge branch 'master' into idna-1.0
Browse files Browse the repository at this point in the history
* master:
  ci: split ci check step `build` into `build` + `test`. Add `msrv` job
  • Loading branch information
pfernie committed Nov 9, 2024
2 parents 7babde5 + 08560c2 commit edf6359
Showing 1 changed file with 65 additions and 4 deletions.
69 changes: 65 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,49 @@ env:
CARGO_TERM_COLOR: always

jobs:
ci-pass:
name: CI is green
runs-on: ubuntu-latest
needs:
- msrv
- build
- test
steps:
- run: exit 0

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

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get MSRV package metadata
id: metadata
run: cargo metadata --no-deps --format-version 1 | jq -r '"msrv=" + .packages[0].rust_version' >> $GITHUB_OUTPUT

- name: Install rust (${{ steps.metadata.outputs.msrv }})
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.metadata.outputs.msrv }}

- name: Pin time and idna_adapter versions
run: |
cargo update
cargo update -p time --precise 0.3.20
cargo update -p idna_adapter --precise 1.1.0
- uses: Swatinem/rust-cache@v2

- name: Check
run: cargo check

build:
name: ${{ matrix.name }}

runs-on: ${{ matrix.os || 'ubuntu-latest' }}

strategy:
matrix:
name:
Expand All @@ -25,20 +63,43 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust || 'stable' }}
profile: minimal
override: true

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --all-features


test:
name: ${{ matrix.name }}

runs-on: ${{ matrix.os || 'ubuntu-latest' }}

strategy:
matrix:
name:
- linux / stable
include:
- name: linux / stable

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust || 'stable' }}
profile: minimal
override: true

- name: Run tests
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit edf6359

Please sign in to comment.