Skip to content

Commit 2b80a0b

Browse files
committed
Add CI job to verify minimal dependency versions
1 parent dbafae1 commit 2b80a0b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/composite/rust/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
required: false
1212
description: "Components array"
1313
default: ''
14+
cache-key:
15+
required: false
16+
description: "Extra key to resolve cache"
17+
default: ''
1418

1519
runs:
1620
using: "composite"
@@ -24,3 +28,5 @@ runs:
2428

2529
# For notes about the cache, see 'Full CI' workflow
2630
- uses: Swatinem/rust-cache@v1
31+
with:
32+
sharedKey: ${{ inputs.cache-key }}

.github/workflows/full-ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,27 @@ jobs:
123123
- os: { id: ubuntu-latest, name: linux }
124124
rust: { toolchain: '1.51', postfix: ' (msrv 1.51)' }
125125
testflags: '-- --skip ui_tests'
126+
- os: { id: ubuntu-latest, name: linux }
127+
rust: { toolchain: 'stable', postfix: ' (minimal-deps)', special: 'minimal-deps' }
126128
runs-on: ${{ matrix.os.id }}
127129
steps:
128130
- uses: actions/checkout@v2
131+
- name: "Install nightly Rust (minimal-deps only)"
132+
uses: actions-rs/toolchain@v1
133+
with:
134+
profile: minimal
135+
toolchain: nightly
136+
override: false # use selected toolchain for remainder of this step
137+
components: cargo
138+
if: ${{ matrix.rust.special == 'minimal-deps' }}
139+
- name: "Install minimal dependency versions from Cargo"
140+
run: cargo +nightly update -Z minimal-versions
141+
if: ${{ matrix.rust.special == 'minimal-deps' }}
129142
- name: "Install Rust"
130143
uses: ./.github/composite/rust
131144
with:
132145
rust: ${{ matrix.rust.toolchain }}
146+
cache-key: ${{ matrix.rust.special }} # 'minimal-deps' or empty/not defined
133147
- name: "Install LLVM"
134148
uses: ./.github/composite/llvm
135149
if: ${{ matrix.os.id == 'windows-latest' }}

0 commit comments

Comments
 (0)