Skip to content

Commit 7c40381

Browse files
committed
chore: add rsdoctor diff action
chore: add rsdoctor diff action chore: add rsdoctor diff action chore: add rsdoctor diff action chore: add rsdoctor diff action chore: add rsdoctor diff action in main branch chore: add rsdoctor diff action in main branch chore: add rsdoctor diff action in main branch chore: ignore rspack-diff-minimal directory and remove from git tracking chore: add rsdoctor demo for rspack diff action chore: add rsdoctor demo for rspack diff action chore: add rsdoctor demo for rspack diff action chore: add rsdoctor demo for rspack diff action chore: add rsdoctor demo for rspack diff action chore: add rsdoctor demo for rspack diff action
1 parent fc7cb9e commit 7c40381

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

.github/workflows/ci-diff.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI Diff
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, closed]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
# Allow commenting on issues for `reusable-build.yml`
13+
issues: write
14+
# Allow commenting on pull requests
15+
pull-requests: write
16+
17+
jobs:
18+
build:
19+
name: Build Bindings
20+
uses: ./.github/workflows/reusable-build.yml
21+
with:
22+
target: x86_64-unknown-linux-gnu
23+
runner: ${{ vars.LINUX_SELF_HOSTED_RUNNER_LABELS || '"ubuntu-22.04"' }}
24+
test: false
25+
bench: false
26+
prefer_docker: false
27+
ref: ${{ github.event.pull_request.head.sha }}
28+
29+
demo-test:
30+
name: Demo Test
31+
needs: build
32+
runs-on: ${{ fromJSON(vars.LINUX_SELF_HOSTED_RUNNER_LABELS || '"ubuntu-22.04"') }}
33+
defaults:
34+
run:
35+
shell: bash
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
39+
with:
40+
ref: ${{ github.event.pull_request.head.sha }}
41+
clean: ${{ runner.environment == 'github-hosted' }}
42+
43+
- name: Download bindings
44+
uses: ./.github/actions/artifact/download
45+
with:
46+
name: bindings-x86_64-unknown-linux-gnu
47+
path: crates/node_binding/
48+
49+
- name: Setup Pnpm
50+
timeout-minutes: 5
51+
uses: ./.github/actions/pnpm/setup
52+
with:
53+
node-version: 22
54+
55+
- name: Pnpm Install
56+
uses: ./.github/actions/pnpm/install-dependencies
57+
58+
- name: Build JS
59+
run: pnpm run build:js
60+
61+
- name: Clone rstack-examples
62+
run: |
63+
cd ..
64+
git clone -b chore/add-rsdoctor-demo https://github.com/rspack-contrib/rstack-examples.git
65+
66+
- name: Link packages and install dependencies
67+
working-directory: ../rstack-examples/rsdoctor/rspack
68+
run: |
69+
npm pkg set "devDependencies.@rspack/binding=link:../../../rspack/crates/node_binding"
70+
npm pkg set "devDependencies.@rspack/core=link:../../../rspack/packages/rspack"
71+
npm pkg set "devDependencies.@rspack/cli=link:../../../rspack/packages/rspack-cli"
72+
# Use --no-frozen-lockfile to allow updating lockfile after modifying package.json
73+
pnpm install --no-frozen-lockfile
74+
75+
- name: Build demo project
76+
working-directory: ../rstack-examples/rsdoctor/rspack
77+
run: RSDOCTOR=true pnpm run build
78+
79+
- name: Report Compressed Size
80+
uses: web-infra-dev/rsdoctor-action@main
81+
with:
82+
github_token: ${{ secrets.GITHUB_TOKEN }}
83+
file_path: "../rstack-examples/rsdoctor/rspack/dist/rsdoctor-data.json"
84+
target_branch: "main"

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,7 @@ trace.json
184184

185185
# Claude
186186
CLAUDE.local.md
187+
188+
# Demo projects cloned during CI
189+
rspack-diff-minimal/
190+
rstack-examples/

0 commit comments

Comments
 (0)