From b8488a59e56d8a106324fabef03b1a22239e27d6 Mon Sep 17 00:00:00 2001 From: hardfist Date: Fri, 14 Feb 2025 18:04:33 +0800 Subject: [PATCH] chore: continue clean up workflow (#9308) --- .github/actions/rustup/action.yml | 3 +- .github/workflows/ci.yml | 54 ---------------------------- .github/workflows/reusable-build.yml | 5 ++- 3 files changed, 5 insertions(+), 57 deletions(-) diff --git a/.github/actions/rustup/action.yml b/.github/actions/rustup/action.yml index 01550e9e5cd8..0f6ad80a4a0c 100644 --- a/.github/actions/rustup/action.yml +++ b/.github/actions/rustup/action.yml @@ -88,5 +88,4 @@ runs: uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2 if: ${{ startsWith(runner.name, 'GitHub Actions') }} with: - shared-key: ${{ inputs.shared-key }} - save-if: ${{ inputs.save-cache == 'true' }} + shared-key: ${{ inputs.shared-key }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71263352a9b7..502780515be0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,11 +21,6 @@ on: tags-ignore: - "**" -env: - # Since CI builds are more akin to from-scratch builds, incremental compilation adds unnecessary dependency-tracking and IO overhead, reducing caching effectiveness. - # https://github.com/rust-lang/rust-analyzer/blob/25368d24308d6a94ffe8b99f0122bcf5a2175322/.github/workflows/ci.yaml#L11 - CARGO_INCREMENTAL: 0 - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: ${{ github.ref_name != 'main' }} @@ -74,23 +69,6 @@ jobs: skipable: ${{ needs.check-changed.outputs.changed != 'true' }} bench: true - test-release-linux: - name: Test Release Linux - needs: [get-runner-labels] - if: contains(github.event.pull_request.title, '!linux') - uses: ./.github/workflows/reusable-build.yml - strategy: - fail-fast: false # Build and test everything so we can look at all the errors - matrix: - array: - - target: x86_64-unknown-linux-gnu - - target: aarch64-unknown-linux-gnu - - target: x86_64-unknown-linux-musl - - target: aarch64-unknown-linux-musl - with: - target: ${{ matrix.array.target }} - runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} - test-windows: name: Test Windows needs: [get-runner-labels, check-changed] @@ -100,23 +78,6 @@ jobs: profile: "dev" runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} skipable: ${{ needs.check-changed.outputs.changed != 'true' }} - - test-release-windows: - name: Test Release Windows - needs: [get-runner-labels] - if: contains(github.event.pull_request.title, '!windows') - uses: ./.github/workflows/reusable-build.yml - strategy: - fail-fast: false # Build and test everything so we can look at all the errors - matrix: - array: - - target: i686-pc-windows-msvc - - target: x86_64-pc-windows-msvc - - target: aarch64-pc-windows-msvc - with: - target: ${{ matrix.array.target }} - runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} - test-mac: name: Test Mac needs: [get-runner-labels, check-changed] @@ -128,21 +89,6 @@ jobs: runner: ${{ needs.get-runner-labels.outputs.MACOS_RUNNER_LABELS }} skipable: ${{ needs.check-changed.outputs.changed != 'true' }} - test-release-mac: - name: Test Release Mac - needs: [get-runner-labels] - if: contains(github.event.pull_request.title, '!macos') - uses: ./.github/workflows/reusable-build.yml - strategy: - fail-fast: false # Build and test everything so we can look at all the errors - matrix: - array: - - target: x86_64-apple-darwin - - target: aarch64-apple-darwin - with: - target: ${{ matrix.array.target }} - runner: ${{ needs.get-runner-labels.outputs.MACOS_RUNNER_LABELS }} - cargo-deny: name: Check license of dependencies runs-on: ubuntu-latest diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 664c1a724e25..07bdf5aff454 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -28,6 +28,10 @@ on: ref: # Git reference to checkout required: false type: string +env: + # Since CI builds are more akin to from-scratch builds, incremental compilation adds unnecessary dependency-tracking and IO overhead, reducing caching effectiveness. + # https://github.com/rust-lang/rust-analyzer/blob/25368d24308d6a94ffe8b99f0122bcf5a2175322/.github/workflows/ci.yaml#L11 + CARGO_INCREMENTAL: 0 permissions: # Allow commenting on issues @@ -66,7 +70,6 @@ jobs: if: ${{ !inputs.skipable }} uses: ./.github/actions/rustup with: - save-cache: ${{ github.ref_name == 'main' }} # This should be safe because we have nightly building the cache every day shared-key: build-${{ inputs.target }}-${{ inputs.profile }} - name: Trim paths