2525 # - aarch64-pc-windows-msvc
2626 steps :
2727 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28- with :
29- persist-credentials : false
30- submodules : true
31-
28+ - uses : ./.github/actions/clone
29+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
3230 - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.2
3331 with :
3432 save-cache : ${{ github.ref_name == 'main' }}
3735 - name : Rustup Adds Target
3836 run : rustup target add ${{ matrix.settings.target }}
3937
38+ - name : Rustup Adds Target for rolldown
39+ working-directory : rolldown
40+ run : rustup target add ${{ matrix.settings.target }}
41+
4042 - name : Add musl target (x86_64)
4143 if : ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
4244 run : rustup target add x86_64-unknown-linux-musl
@@ -45,38 +47,45 @@ jobs:
4547 if : ${{ matrix.settings.target == 'aarch64-unknown-linux-gnu' }}
4648 run : rustup target add aarch64-unknown-linux-musl
4749
50+ - name : Add rolldown host target
51+ if : ${{ matrix.settings.target == 'aarch64-unknown-linux-gnu' }}
52+ working-directory : rolldown
53+ run : rustup target add x86_64-unknown-linux-gnu
54+
4855 - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
4956
57+ - name : Build host rolldown
58+ if : ${{ matrix.settings.target == 'aarch64-unknown-linux-gnu' }}
59+ run : pnpm --filter rolldown build-binding:release --target x86_64-unknown-linux-gnu
60+
5061 - name : Set binding version
5162 run : pnpm exec tool replace-file-content packages/cli/binding/Cargo.toml 'version = "0.0.0"' 'version = "0.0.0-${{ github.sha }}"'
5263
5364 - name : Configure Git for access to vite-task
5465 run : git config --global url."https://x-access-token:${{ secrets.VITE_TASK_TOKEN }}@github.com/".insteadOf "https://github.com/"
5566
5667 - name : Build
57- if : ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
58- run : pnpm --filter=@voidzero-dev/vite-plus build --target ${{ matrix.settings.target }} --use-napi-cross
59- env :
60- CC : x86_64-unknown-linux-gnu-cc
61- TARGET_CC : clang
62-
63- - name : Build
64- if : ${{ matrix.settings.target == 'aarch64-unknown-linux-gnu' }}
65- run : pnpm --filter=@voidzero-dev/vite-plus build --target ${{ matrix.settings.target }} --use-napi-cross
66- env :
67- TARGET_CC : clang
68-
69- - name : Build
70- if : ${{ !contains(matrix.settings.target, 'linux') }}
71- run : pnpm --filter=@voidzero-dev/vite-plus build --target ${{ matrix.settings.target }}
68+ uses : ./.github/actions/build-upstream
69+ with :
70+ target : ${{ matrix.settings.target }}
7271
73- - name : Upload artifact
72+ - name : Upload Vite+ artifact
7473 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7574 with :
76- name : bindings -${{ matrix.settings.target }}
75+ name : vite-plus-native -${{ matrix.settings.target }}
7776 path : ./packages/cli/binding/*.node
7877 if-no-files-found : error
7978
79+ - name : Upload rolldown artifact
80+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
81+ with :
82+ name : rolldown-native-${{ matrix.settings.target }}
83+ path : ./rolldown/packages/rolldown/src/*.node
84+ if-no-files-found : error
85+ - name : Remove .node files before upload dist
86+ if : ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
87+ run : rm ./packages/cli/dist/**/*.node
88+
8089 - name : Upload cli dist
8190 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8291 if : ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
@@ -93,18 +102,13 @@ jobs:
93102 packages : write
94103 steps :
95104 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
96- with :
97- persist-credentials : false
98- submodules : true
105+ - uses : ./.github/actions/clone
99106
100107 - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
101108
102109 - name : Configure Git for access to vite-task
103110 run : git config --global url."https://x-access-token:${{ secrets.VITE_TASK_TOKEN }}@github.com/".insteadOf "https://github.com/"
104111
105- - name : Bootstrap
106- run : pnpm bootstrap-cli:ci
107-
108112 - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
109113 with :
110114 path : packages/cli/dist
@@ -114,7 +118,13 @@ jobs:
114118 - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
115119 with :
116120 path : packages/cli/dist
117- pattern : bindings-*
121+ pattern : vite-plus-native-*
122+ merge-multiple : true
123+
124+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
125+ with :
126+ path : packages/cli/dist/vite
127+ pattern : rolldown-native-*
118128 merge-multiple : true
119129
120130 - name : Set npm packages version
0 commit comments