File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 6262 with :
6363 target : x86_64-unknown-linux-gnu
6464 profile : " debug"
65+ native : ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS == '"ubuntu-latest"' }}
6566 runner : ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }}
6667 skipable : ${{ needs.check-changed.outputs.changed != 'true' }}
6768
Original file line number Diff line number Diff line change 3939 target :
4040 required : true
4141 type : string
42+ native :
43+ required : false
44+ type : boolean
45+ default : false
4246 runner : # Runner labels
4347 required : true
4448 type : string
@@ -133,7 +137,7 @@ jobs:
133137
134138 # Linux
135139 - name : Build x86_64-unknown-linux-gnu in Docker
136- if : ${{ inputs.target == 'x86_64-unknown-linux-gnu' && steps.check_cache.outputs.exists != 'true' && !inputs.skipable }}
140+ if : ${{ inputs.target == 'x86_64-unknown-linux-gnu' && steps.check_cache.outputs.exists != 'true' && !inputs.skipable && !inputs.native }}
137141 uses : ./.github/actions/docker-build
138142 with :
139143 image : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
@@ -182,9 +186,13 @@ jobs:
182186
183187 # setup rust target for windows and macos
184188 - name : Setup Rust Target
185- if : ${{ !contains(inputs.target, 'linux') && !inputs.skipable }}
189+ if : ${{ ( !contains(inputs.target, 'linux') || inputs.native ) && !inputs.skipable }}
186190 run : rustup target add ${{ inputs.target }}
187191
192+ - name : Build ${{ inputs.target }}
193+ if : ${{ inputs.native && contains(inputs.target, 'linux') && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
194+ run : RUST_TARGET=${{ inputs.target }} pnpm build:binding:${{ inputs.profile }}
195+
188196 # Windows
189197
190198 - name : Build i686-pc-windows-msvc
You can’t perform that action at this time.
0 commit comments