Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ jobs:
uses: ./.github/workflows/reusable-build.yml
with:
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 }}
skipable: ${{ needs.check-changed.outputs.changed != 'true' }}
bench: true
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ecosystem-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
uses: ./.github/workflows/reusable-build.yml
with:
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('refs/pull/{0}/head', inputs.pr) || github.sha }}
test: false
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ecosystem-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
uses: ./.github/workflows/reusable-build.yml
with:
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('refs/pull/{0}/head', inputs.pr) || github.sha }}
test: false
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ on:
target:
required: true
type: string
native:
required: false
type: boolean
default: false
runner: # Runner labels
required: true
type: string
Expand Down Expand Up @@ -143,17 +139,7 @@ jobs:
uses: xc2/free-disk-space@fbe203b3788f2bebe2c835a15925da303eaa5efe # v1.0.0
with:
tool-cache: false

# Linux
- name: Build x86_64-unknown-linux-gnu in Docker
if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' && steps.check_cache.outputs.exists != 'true' && !inputs.skipable && !inputs.native }}
uses: ./.github/actions/docker-build
with:
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
target: ${{ inputs.target }}
profile: ${{ inputs.profile }}
pre: unset CC_x86_64_unknown_linux_gnu && unset CC # for jemallocator to compile

# runner these build in docker since we don't have github runner machine for it
- name: Build aarch64-unknown-linux-gnu in Docker
if: ${{ inputs.target == 'aarch64-unknown-linux-gnu' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
uses: ./.github/actions/docker-build
Expand Down Expand Up @@ -193,17 +179,17 @@ jobs:
# clang19-static is used to install libclang.a
apk add llvm19-dev clang19-static

# setup rust target for windows and macos
# setup rust target for native runner
- name: Setup Rust Target
if: ${{ (!contains(inputs.target, 'linux') || inputs.native) && !inputs.skipable }}
if: ${{ !contains(inputs.target, 'linux') && !inputs.skipable }}
run: rustup target add ${{ inputs.target }}

- name: Build ${{ inputs.target }}
if: ${{ inputs.native && contains(inputs.target, 'linux') && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
# runner the following in github runner directly without docker since we have related machine
# Linux
- name: Build x86_64-unknown-linux-gnu
if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' && steps.check_cache.outputs.exists != 'true' && !inputs.skipable }}
run: RUST_TARGET=${{ inputs.target }} pnpm build:binding:${{ inputs.profile }}

# Windows

- name: Build i686-pc-windows-msvc
if: ${{ inputs.target == 'i686-pc-windows-msvc' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
run: RUST_TARGET=${{ inputs.target }} DISABLE_PLUGIN=1 pnpm build:binding:${{ inputs.profile }}
Expand Down
Loading