diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index ba046d2..14f8e86 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -7,15 +7,18 @@ on: jobs: udeps: name: Check for unused dependencies - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 + - run: | + echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV + echo "RUST_TOOLCHAIN_NIGHTLY=$(cat ./rust-toolchain-nightly)" >> $GITHUB_ENV + - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2022-09-22 - override: true - - run: cargo install cargo-udeps - - uses: Swatinem/rust-cache@v1 + toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }} + - name: Cargo Install + run: cargo install cargo-udeps + - uses: Swatinem/rust-cache@v2 with: - sharedKey: debug-build-nightly + shared-key: debug-build-nightly - run: make udeps diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 15e3e61..4212978 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,37 +1,39 @@ -name: PR +name: pr -on: - pull_request: - branches: ['*'] +on: [pull_request] jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 + - run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV + - uses: dtolnay/rust-toolchain@master with: - override: true + toolchain: ${{ env.RUST_TOOLCHAIN }} components: rustfmt, clippy - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: - sharedKey: debug-build - - run: make test + shared-key: debug-build + - name: Make test + run: make test lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 + - run: | + echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV + echo "RUST_TOOLCHAIN_NIGHTLY=$(cat ./rust-toolchain-nightly)" >> $GITHUB_ENV + - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-01-26 - override: true + toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }} components: rustfmt - - uses: actions-rs/toolchain@v1.0.7 + - uses: dtolnay/rust-toolchain@master with: - override: true + toolchain: ${{ env.RUST_TOOLCHAIN }} components: rustfmt, clippy - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: - sharedKey: debug-build-nightly - - run: make lint - + shared-key: debug-build-nightly + - name: Make lint + run: make lint diff --git a/Makefile b/Makefile index 105fb20..ed58cc3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -RUST_NIGHTLY_VERSION := nightly-2023-01-26 +RUST_NIGHTLY_VERSION := $(shell cat rust-toolchain-nightly) GRCOV_VERSION := 0.8.13 install-nightly: diff --git a/rust-toolchain-nightly b/rust-toolchain-nightly new file mode 100644 index 0000000..ed91fac --- /dev/null +++ b/rust-toolchain-nightly @@ -0,0 +1 @@ +nightly-2023-02-16