Skip to content

Commit

Permalink
Merge branch 'main' into yj/pnp-support
Browse files Browse the repository at this point in the history
  • Loading branch information
hardfist authored Jan 6, 2025
2 parents f84c808 + f81f1c7 commit faf91ce
Show file tree
Hide file tree
Showing 126 changed files with 1,581 additions and 1,604 deletions.
9 changes: 8 additions & 1 deletion .github/actions/pnpm-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ runs:
with:
node-version: ${{ inputs.node-version }}

- name: Enable corepack
if: ${{ inputs.node-version != '16' }}
shell: bash
run: |
corepack enable
# https://pnpm.io/continuous-integration#github-actions
# Uses `packageManagement` field from package.json
- name: Install pnpm
uses: pnpm/action-setup@v4
if: ${{ inputs.node-version == '16' }}
with:
dest: ${{ runner.tool_cache }}/pnpm
# Use `@pnpm/exe` for Node 16
standalone: ${{ inputs.node-version == '16' }}
standalone: true

- name: Get pnpm store directory
id: pnpm-cache
Expand Down
59 changes: 3 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.28.4
- uses: crate-ci/typos@v1.29.0
with:
files: .

Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
- uses: ./.github/actions/rustup
with:
shared-key: check
- uses: cargo-bins/[email protected].17
- uses: cargo-bins/[email protected].18
- run: cargo binstall --no-confirm cargo-shear
- run: cargo shear

Expand Down Expand Up @@ -359,63 +359,10 @@ jobs:
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200
run: cargo miri test --workspace --exclude rspack_node -- --nocapture

run_benchmark:
name: Run benchmark
runs-on: ubuntu-latest
# TODO: enable it after security tokens are added
# if: github.ref_name == 'main' && github.repository_owner == 'web-infra-dev'
if: false
steps:
- name: Run Benchmark
uses: convictional/[email protected]
with:
owner: ${{ github.repository_owner }}
repo: "rspack-ecosystem-benchmark"
workflow_file_name: "bench_rspack_commit.yml"
github_token: ${{ secrets.RSPACK_ACCESS_TOKEN }}
ref: "main"
client_payload: '{"commit_sha":"${{ github.sha }}"}'

run_ecosystem_ci:
name: Run Ecosystem CI
runs-on: ubuntu-latest
# TODO: enable it after security tokens are added
# if: github.ref_name == 'main' && github.repository_owner == 'web-infra-dev'
if: false
steps:
- name: Run Ecosystem CI
id: eco_ci
continue-on-error: true
uses: convictional/[email protected]
with:
owner: "rspack-contrib"
repo: "rspack-ecosystem-ci"
workflow_file_name: "ecosystem-ci-from-commit.yml"
github_token: ${{ secrets.RSPACK_ACCESS_TOKEN }}
ref: "main"
client_payload: '{"commitSHA":"${{ github.sha }}","repo":"web-infra-dev/rspack","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}'

- if: steps.eco_ci.outcome == 'failure'
uses: actions/checkout@v4
- if: steps.eco_ci.outcome == 'failure'
uses: actions/setup-node@v4
with:
node-version: 20
- name: Send Failure Notification
if: steps.eco_ci.outcome == 'failure'
shell: bash
run: ./scripts/alert/lark.js
env:
TITLE: Ecosystem CI failed on main branch
DESCRIPTION: |
commitID: [${{github.sha}}](${{github.server_url}}/${{github.repository}}/commit/${{github.sha}})
URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
LARK_WEBHOOK_URL: ${{secrets.LARK_WEBHOOK_URL}}

failure_notification:
name: Failure Notification
needs:
[test-linux, test-windows, test-mac, rust_check, rust_test, run_benchmark]
[test-linux, test-windows, test-mac, rust_check, rust_test]
if: ${{ failure() && !cancelled() && github.ref_name == 'main' && github.repository_owner == 'web-infra-dev' }}
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ecosystem-benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ecosystem-benchmark
name: Ecosystem Benchmark

on:
workflow_dispatch:
Expand Down Expand Up @@ -29,7 +29,7 @@ jobs:
target: x86_64-unknown-linux-gnu
native: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS == '"ubuntu-22.04"' }}
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }}
ref: ${{ github.event_name == 'workflow_dispatch' && format('pull/{0}/head', inputs.pr) || github.sha }}
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/pull/{0}/head', inputs.pr) || github.sha }}
test: false
bench: false

Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('pull/{0}/head', inputs.pr) || github.sha }}
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/pull/{0}/head', inputs.pr) || github.sha }}

- name: Clean
uses: ./.github/actions/clean
Expand Down
102 changes: 0 additions & 102 deletions .github/workflows/ecosystem-ci-trigger.yml

This file was deleted.

Loading

0 comments on commit faf91ce

Please sign in to comment.