diff options
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r-- | .github/workflows/ci.yaml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3e12c46..2bed333 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,8 +5,25 @@ on: branches: - main jobs: + get-msrv: + name: Get declared MSRV from Cargo.toml + runs-on: ubuntu-latest + outputs: + msrv: ${{ steps.get_msrv.outputs.msrv }} + steps: + - name: Install ripgrep + run: sudo apt-get install -y ripgrep + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Get MSRV + id: get_msrv + run: rg '^\s*rust-version\s*=\s*"(\d+(\.\d+){0,2})"' --replace 'msrv=$1' Cargo.toml >> "$GITHUB_OUTPUT" + test: name: test + needs: get-msrv env: # Emit backtraces on panics. RUST_BACKTRACE: 1 @@ -16,7 +33,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] rust: - - 1.70.0 # MSRV + - ${{ needs.get-msrv.outputs.msrv }} - stable - nightly steps: |