Skip to content

Check only (no longer test) at the MSRV #151

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

Merged
merged 4 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
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
60 changes: 45 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous integration
name: CI

on:
pull_request:
Expand All @@ -7,29 +7,59 @@ on:
- master

jobs:
os_tests:
name: "Tests / OS: ${{ matrix.os }} - ${{ matrix.channel }}"
test:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
channel:
- stable
- beta
- nightly
- 1.23.0
- stable
- nightly
- 1.63.0 # MSRV of test dependencies
os:
# FIXME: compiling with 1.23 on macOS 12 fails to linL
# archive member 'rust.metadata.bin' with length 40821 is not mach-o or llvm bitcode file
- macos-11
- windows-2022
- ubuntu-22.04
- macos-13 # x86 MacOS
- macos-15 # Arm MacOS
- windows-2025
- ubuntu-24.04
include:
- channel: beta
os: ubuntu-24.04

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

- name: Update rust
run: rustup update ${{ matrix.channel }} --no-self-update
run: |
rustup default ${{ matrix.channel }}
rustup update --no-self-update

- name: Tests
run: cargo +${{ matrix.channel }} test --all
- run: cargo test --all

msrv:
name: Check building with the MSRV
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Update rust
run: |
rustup default 1.23.0
rustup update --no-self-update

- run: cargo build

success:
needs:
- test
- msrv
runs-on: ubuntu-latest
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ description = """
Support for matching file paths against Unix shell style patterns.
"""
categories = ["filesystem"]
rust-version = "1.23.0"

[dev-dependencies]
# FIXME: Replace it with `tempfile` once we bump up MSRV.
# FIXME: This should be replaced by `tempfile`
tempdir = "0.3"
doc-comment = "0.3"
Loading