Skip to content

Commit b93bca1

Browse files
authored
Merge pull request #151 from tgross35/fix-ci
Check only (no longer test) at the MSRV
2 parents 49ee1e9 + 1dff477 commit b93bca1

File tree

2 files changed

+47
-16
lines changed

2 files changed

+47
-16
lines changed

.github/workflows/rust.yml

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous integration
1+
name: CI
22

33
on:
44
pull_request:
@@ -7,29 +7,59 @@ on:
77
- master
88

99
jobs:
10-
os_tests:
11-
name: "Tests / OS: ${{ matrix.os }} - ${{ matrix.channel }}"
10+
test:
11+
name: Tests
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
1515
channel:
16-
- stable
17-
- beta
18-
- nightly
19-
- 1.23.0
16+
- stable
17+
- nightly
18+
- 1.63.0 # MSRV of test dependencies
2019
os:
21-
# FIXME: compiling with 1.23 on macOS 12 fails to linL
22-
# archive member 'rust.metadata.bin' with length 40821 is not mach-o or llvm bitcode file
23-
- macos-11
24-
- windows-2022
25-
- ubuntu-22.04
20+
- macos-13 # x86 MacOS
21+
- macos-15 # Arm MacOS
22+
- windows-2025
23+
- ubuntu-24.04
24+
include:
25+
- channel: beta
26+
os: ubuntu-24.04
2627

2728
steps:
2829
- name: Checkout repository
2930
uses: actions/checkout@v4
3031

3132
- name: Update rust
32-
run: rustup update ${{ matrix.channel }} --no-self-update
33+
run: |
34+
rustup default ${{ matrix.channel }}
35+
rustup update --no-self-update
3336
34-
- name: Tests
35-
run: cargo +${{ matrix.channel }} test --all
37+
- run: cargo test --all
38+
39+
msrv:
40+
name: Check building with the MSRV
41+
runs-on: ubuntu-24.04
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Update rust
47+
run: |
48+
rustup default 1.23.0
49+
rustup update --no-self-update
50+
51+
- run: cargo build
52+
53+
success:
54+
needs:
55+
- test
56+
- msrv
57+
runs-on: ubuntu-latest
58+
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
59+
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
60+
# dependencies fails.
61+
if: always() # make sure this is never "skipped"
62+
steps:
63+
# Manually check the status of all dependencies. `if: failure()` does not work.
64+
- name: check if any dependency failed
65+
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ description = """
1111
Support for matching file paths against Unix shell style patterns.
1212
"""
1313
categories = ["filesystem"]
14+
rust-version = "1.23.0"
1415

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

0 commit comments

Comments
 (0)