Skip to content

Commit

Permalink
Merge branch 'main' into fix/max-size-many-chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerFeng authored Dec 19, 2024
2 parents d3645ef + 0e749f0 commit 34991a8
Show file tree
Hide file tree
Showing 317 changed files with 6,917 additions and 3,443 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pnpm-lock.yaml
/crates/node_binding
/crates/rspack_ast_viewer
/crates/rspack_base64
/crates/rspack_binding_options
/crates/rspack_core
/crates/rspack_core/src/compiler/make @jerrykingxyz
/crates/rspack_error
Expand Down
15 changes: 13 additions & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
extends: [":dependencyDashboard"],
schedule: ["before 8am on wednesday"],
enabledManagers: ["github-actions", "cargo", "npm"],
lockFileMaintenance: {
enabled: true
},
ignorePaths: [
"**/fixtures/**",
"**/tests/**",
Expand Down Expand Up @@ -57,7 +60,8 @@
"owo-colors",
"miette",
"rkyv",
"rspack_resolver"
"rspack_resolver",
"inventory"
]
},
{
Expand Down Expand Up @@ -90,7 +94,14 @@
{
groupName: "ignored crates",
matchManagers: ["cargo"],
matchPackageNames: ["ustr", "textwrap", "owo-colors", "miette", "rkyv"],
matchPackageNames: [
"ustr",
"textwrap",
"owo-colors",
"miette",
"rkyv",
"inventory"
],
enabled: false
},
{
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
with:
target: x86_64-unknown-linux-gnu
profile: "debug"
native: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS == '"ubuntu-latest"' }}
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }}
skipable: ${{ needs.check-changed.outputs.changed != 'true' }}

Expand Down Expand Up @@ -159,7 +160,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected].2
- uses: crate-ci/[email protected].4
with:
files: .

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

Expand Down Expand Up @@ -318,7 +319,7 @@ jobs:
- name: Run test
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200
run: cargo test --workspace --exclude rspack_binding_options --exclude rspack_node -- --nocapture
run: cargo test --workspace --exclude rspack_node -- --nocapture

rust_test_miri:
name: Rust test miri
Expand Down Expand Up @@ -349,7 +350,7 @@ jobs:
env:
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-disable-isolation
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200
run: cargo miri test --workspace --exclude rspack_binding_options --exclude rspack_node -- --nocapture
run: cargo miri test --workspace --exclude rspack_node -- --nocapture

run_rust_benchmark:
name: Run rust benchmark
Expand Down
34 changes: 31 additions & 3 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ on:
target:
required: true
type: string
native:
required: false
type: boolean
default: false
runner: # Runner labels
required: true
type: string
Expand Down Expand Up @@ -104,6 +108,14 @@ jobs:
echo 'codegen-units = 64' >> Cargo.toml
echo 'incremental = false' >> Cargo.toml
- name: Trim paths
if: ${{ !inputs.skipable }}
shell: bash
run: |
echo $'\n' >> .cargo/config.toml
echo '[unstable]' >> .cargo/config.toml
echo 'trim-paths = true' >> .cargo/config.toml
- name: Check local cache
id: check_cache
if: ${{ inputs.profile == 'debug' && !startsWith(runner.name, 'GitHub Actions') && !inputs.skipable }}
Expand All @@ -126,7 +138,7 @@ jobs:

# 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 }}
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
Expand All @@ -141,7 +153,8 @@ jobs:
target: ${{ inputs.target }}
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
profile: ${{ inputs.profile }}
pre: export CC_aarch64_unknown_linux_gnu=clang
pre: |
export CC_aarch64_unknown_linux_gnu=clang
- name: Build x86_64-unknown-linux-musl in Docker
if: ${{ inputs.target == 'x86_64-unknown-linux-musl' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
Expand All @@ -150,6 +163,12 @@ jobs:
target: ${{ inputs.target }}
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
profile: ${{ inputs.profile }}
pre: |
# musl will enable clang-sys static linking
# https://github.com/KyleMayes/clang-sys?tab=readme-ov-file#static
# llvm19-dev is used to install llvm-config
# clang19-static is used to install libclang.a
apk add llvm19-dev clang19-static
- name: Build aarch64-unknown-linux-musl in Docker
if: ${{ inputs.target == 'aarch64-unknown-linux-musl' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
Expand All @@ -160,12 +179,21 @@ jobs:
profile: ${{ inputs.profile }}
pre: |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc
# musl will enable clang-sys static linking
# https://github.com/KyleMayes/clang-sys?tab=readme-ov-file#static
# llvm19-dev is used to install llvm-config
# clang19-static is used to install libclang.a
apk add llvm19-dev clang19-static
# setup rust target for windows and macos
- name: Setup Rust Target
if: ${{ !contains(inputs.target, 'linux') && !inputs.skipable }}
if: ${{ (!contains(inputs.target, 'linux') || inputs.native) && !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 }}
run: RUST_TARGET=${{ inputs.target }} pnpm build:binding:${{ inputs.profile }}

# Windows

- name: Build i686-pc-windows-msvc
Expand Down
Loading

0 comments on commit 34991a8

Please sign in to comment.