diff --git a/.github/workflows/release-rust.yaml b/.github/workflows/release-rust.yaml index d6e8528..f8d79c5 100644 --- a/.github/workflows/release-rust.yaml +++ b/.github/workflows/release-rust.yaml @@ -53,25 +53,12 @@ jobs: TARGET_FLAGS: "" steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: dtolnay/rust-toolchain@nightly - with: - targets: ${{matrix.target}} - + - uses: actions/checkout@v4 + - run: rustup default nightly && rustup target add ${{ matrix.target }} + - uses: Swatinem/rust-cache@v2 - name: Configure cross if: matrix.cargo == 'cross' - run: | - cargo install cross - + uses: taiki-e/install-action@cross - name: Show commands run: | echo pwd: @@ -81,7 +68,6 @@ jobs: echo "cargo command is: ${{ matrix.cargo }}" echo "target flags are: ${{ env.TARGET_FLAGS }}" echo "target dir is: ${{ env.TARGET_DIR }}" - # Perform build - name: Build binary run: ${{ matrix.cargo }} build --release --verbose --target ${{ matrix.target }} diff --git a/.github/workflows/validation-rust.yaml b/.github/workflows/validation-rust.yaml index d99d798..71e751d 100644 --- a/.github/workflows/validation-rust.yaml +++ b/.github/workflows/validation-rust.yaml @@ -50,19 +50,9 @@ jobs: env: MAKE_DIST: "1" steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: dtolnay/rust-toolchain@stable - with: - targets: ${{matrix.target}} + - uses: actions/checkout@v4 + - run: rustup default 1.70 && rustup component add clippy + - uses: Swatinem/rust-cache@v2 - name: Run clippy run: cargo clippy --all-features --all-targets --target ${{ matrix.target }} -- -D warnings - name: Run tests @@ -153,36 +143,18 @@ jobs: name: "Format (cargo fmt)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: dtolnay/rust-toolchain@nightly - with: - components: rustfmt + - uses: actions/checkout@v4 + - run: rustup default nightly && rustup component add rustfmt + - uses: Swatinem/rust-cache@v2 - run: cargo fmt --all -- --check doc: name: "Docs (cargo doc)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: dtolnay/rust-toolchain@nightly + - uses: actions/checkout@v4 + - run: rustup default nightly + - uses: Swatinem/rust-cache@v2 - run: cargo doc --document-private-items outdated: @@ -190,6 +162,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 45 steps: - - uses: actions/checkout@v3 - - uses: dtolnay/install@cargo-outdated + - uses: actions/checkout@v4 + - uses: taiki-e/install-action@cargo-outdated - run: cargo outdated --workspace --exit-code 1