From 7fd5718ec03fc05fa223059863864922c39d1687 Mon Sep 17 00:00:00 2001 From: Cong-Cong Date: Thu, 4 Jul 2024 11:55:03 +0800 Subject: [PATCH] Revert "feat: for artifact-name (#43)" This reverts commit b61ddbac90f467a64ab37b5fd333c646c56bb2f7. --- .github/actions/build-rspack/action.yaml | 6 ++--- .../actions/check-latest-commit/action.yaml | 26 ------------------- .../prepare-rspack-binding/action.yaml | 2 -- .github/workflows/bench_rspack_commit.yml | 8 ------ .github/workflows/ci.yml | 1 - 5 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 .github/actions/check-latest-commit/action.yaml diff --git a/.github/actions/build-rspack/action.yaml b/.github/actions/build-rspack/action.yaml index f01ff164..551faa0d 100644 --- a/.github/actions/build-rspack/action.yaml +++ b/.github/actions/build-rspack/action.yaml @@ -18,10 +18,10 @@ inputs: description: "The version of Node.js to set up" required: true default: "18" + +outputs: artifact-name: description: "The name of the uploaded artifact" - required: true - default: "binding-linux-x64-gnu" runs: using: composite @@ -45,7 +45,7 @@ runs: --js true - uses: actions/download-artifact@v4 with: - name: ${{ inputs.artifact-name }} + name: binding-linux-x64-gnu path: ${{ inputs.path }}/crates/node_binding - name: Show restored binding shell: bash diff --git a/.github/actions/check-latest-commit/action.yaml b/.github/actions/check-latest-commit/action.yaml deleted file mode 100644 index 17b5158f..00000000 --- a/.github/actions/check-latest-commit/action.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: "Check if the latest commit is on the main branch" -description: "Checks if the current commit is the latest commit on the main branch." - -inputs: - path: - description: "Destination path to the repository" - required: true - -outputs: - result: - description: "Boolean indicating if the current commit is the latest commit on the main branch." - -runs: - using: composite - steps: - - shell: bash - run: | - git fetch origin/main - LATEST_COMMIT=$(git rev-parse origin/main) - CURRENT_COMMIT=$(git rev-parse HEAD) - if [ "$LATEST_COMMIT" = "$CURRENT_COMMIT" ]; then - echo "result=true" >> $GITHUB_OUTPUT - else - echo "result=false" >> $GITHUB_OUTPUT - fi - working-directory: ${{ inputs.path }} diff --git a/.github/actions/prepare-rspack-binding/action.yaml b/.github/actions/prepare-rspack-binding/action.yaml index 1361050d..6eea579a 100644 --- a/.github/actions/prepare-rspack-binding/action.yaml +++ b/.github/actions/prepare-rspack-binding/action.yaml @@ -39,5 +39,3 @@ runs: name: binding-linux-x64-gnu path: ${{ inputs.path }}/crates/node_binding/*.node compression-level: 9 - - shell: bash - run: echo "artifact-name=binding-linux-x64-gnu" >> $GITHUB_OUTPUT diff --git a/.github/workflows/bench_rspack_commit.yml b/.github/workflows/bench_rspack_commit.yml index 0ff78666..d4f10fab 100644 --- a/.github/workflows/bench_rspack_commit.yml +++ b/.github/workflows/bench_rspack_commit.yml @@ -58,14 +58,6 @@ jobs: pattern: benchmark-artifacts-* path: output merge-multiple: true - - id: check-latest-commit - name: Check latest commit - uses: ./.github/actions/check-latest-commit - with: - path: ${{ env.RSPACK_DIR }} - - name: Upload result - if: ${{ steps.check-latest-commit.outputs.result == 'true' }} - run: node bin/upload.js ${{ secrets.GITHUB_TOKEN }} - id: print-results name: Print results run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc7d28ba..094e5b90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,6 @@ jobs: - uses: ./.github/actions/build-rspack with: path: ${{ env.RSPACK_DIR }} - artifact-name: ${{ needs.prepare-binding.outputs.artifact-name }} - name: Run benchmark run: node bin/cli.js bench --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} - id: print-compare-results