Skip to content

Commit

Permalink
Merge branch 'main' into mk/breakup-test
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkar committed May 17, 2024
2 parents 970f8fb + a4ad586 commit c474c65
Show file tree
Hide file tree
Showing 394 changed files with 10,249 additions and 9,310 deletions.
13 changes: 10 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ rustdocflags = ["-Znormalize-docs"]
[target.x86_64-pc-windows-msvc]
linker = "rust-lld"

[target.aarch64-apple-darwin]
[target.'cfg(target_os = "macos")']
linker = "rust-lld"

[target.x86_64-apple-darwin]
linker = "rust-lld"
[target.'cfg(all(target_os = "linux", target_env = "gnu"))']
rustflags = [
"--cfg",
"tokio_unstable",
"-Zshare-generics=y",
"-Zthreads=8",
"-Csymbol-mangling-version=v0",
"-Clink-arg=-fuse-ld=lld",
]

[alias]
xtask = "run --package xtask --"
Expand Down
13 changes: 9 additions & 4 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ runs:
# we want more specific settings
cache: false

- name: "Install LLD (LLVM Linker) for Linux"
if: runner.os == 'Linux'
shell: bash
run: sudo apt-get -y update && sudo apt-get install -y lld

- name: "Set Windows default host to MinGW"
if: ${{ inputs.windows == 'true' }}
shell: bash
Expand All @@ -42,16 +47,16 @@ runs:
- name: Set Up Protoc
id: set-up-protoc
continue-on-error: true
uses: arduino/setup-protoc@v1.2.0
uses: arduino/setup-protoc@v2.1.0
with:
version: "3.x"
version: "26.x"
repo-token: ${{ inputs.github-token }}

- name: Set Up Protoc (second try)
if: steps.set-up-protoc.outcome == 'failure'
uses: arduino/setup-protoc@v1.2.0
uses: arduino/setup-protoc@v2.1.0
with:
version: "3.x"
version: "26.x"
repo-token: ${{ inputs.github-token }}

- name: "Add cargo problem matchers"
Expand Down
7 changes: 6 additions & 1 deletion .github/turbo-orchestrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ labeler:
isPRAuthorMatch: "^(bgw|ForsakenHarmony|kdy1|kwonoj|padmaia|sokra|wbinnssmith)$"
- label: "created-by: turborepo"
when:
isPRAuthorMatch: "^(gsoltis|anthonyshew|tknickman|mehulkar|chris-olszewski|NicholasLYang|arlyon|Zertsov)$"
isPRAuthorMatch: "^(gsoltis|anthonyshew|tknickman|mehulkar|chris-olszewski|NicholasLYang|arlyon|Zertsov|paulogdm|codybrouwers)$"

# needs: triage when not any of the turbopack or turborepo team
- label: "needs: triage"
when:
isNotPRAuthorMatch: "^(bgw|ForsakenHarmony|kdy1|kwonoj|padmaia|sokra|wbinnssmith|gsoltis|anthonyshew|tknickman|mehulkar|chris-olszewski|NicholasLYang|arlyon|Zertsov|paulogdm|codybrouwers)$"

# areas
- label: "area: ci"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench-turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: ubuntu
runner: ubuntu-latest
- name: macos
runner: macos-12
runner: macos-latest
- name: windows
runner: windows-latest

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-turbopack-rust-bench-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
uses: ./.github/actions/setup-rust
with:
save-cache: true
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Setup Node.js
uses: ./.github/actions/setup-node
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/turbopack-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ jobs:
uses: ./.github/actions/setup-rust
with:
targets: wasm32-unknown-unknown,wasm32-wasip1-threads
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Run cargo check release
run: |
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/turborepo-library-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
fail-fast: false
matrix:
settings:
- host: macos-12
- host: macos-latest
target: "aarch64-apple-darwin"
- host: macos-12
- host: macos-latest
target: "x86_64-apple-darwin"

- host: ubuntu-latest
Expand All @@ -45,24 +45,30 @@ jobs:
target: "x86_64-unknown-linux-musl"
container: ghcr.io/napi-rs/napi-rs/nodejs-rust:stable-2023-09-17-alpine
install: |
apk update && apk upgrade
apk add libc6-compat curl
echo /root/.cargo/bin >> ${GITHUB_PATH}
echo /usr/local/cargo/bin/rustup >> ${GITHUB_PATH}
setup: |
export PATH=/usr/local/cargo/bin/rustup:/root/.cargo/bin:${PATH}
rustup show active-toolchain
dirname $(rustup which cargo) >> ${GITHUB_PATH}
pnpm install
- host: ubuntu-latest
target: "aarch64-unknown-linux-musl"
container: ghcr.io/napi-rs/napi-rs/nodejs-rust:stable-2023-09-17-alpine
install: |
apk update && apk upgrade
apk add libc6-compat curl
echo /root/.cargo/bin >> ${GITHUB_PATH}
echo /usr/local/cargo/bin/rustup >> ${GITHUB_PATH}
echo /aarch64-linux-musl-cross/bin >> ${GITHUB_PATH}
export PATH=/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo/bin:${PATH}
setup: |
export PATH=/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo/bin:${PATH}
rustup default $(cat ./rust-toolchain)-aarch64-unknown-linux-musl
rustup show active-toolchain
rustup target add aarch64-unknown-linux-musl
rustup toolchain install $(cat ./rust-toolchain)
dirname $(rustup which cargo) >> ${GITHUB_PATH}
pnpm install
rust_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc RUSTFLAGS="-Ctarget-feature=-crt-static"

Expand Down Expand Up @@ -103,7 +109,10 @@ jobs:
if: ${{ matrix.settings.setup }}

- name: Build native library
# For some reason PATH modifications from Setup toolchain aren't populated
# when using the nodejs-rust alpine container.
run: |
export PATH=/usr/local/cargo/bin/rustup:/root/.cargo/bin:${PATH}
cd packages/turbo-repository
${{ matrix.settings.rust_env }} pnpm build:release --target=${{ matrix.settings.target }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/turborepo-native-lib-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- "x64"
- "metal"
- name: macos
runner: macos-12
runner: macos-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/turborepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ jobs:
fail-fast: false
matrix:
settings:
- host: macos-12
- host: macos-latest
target: "x86_64-apple-darwin"
container-options: "--rm"
- host: macos-12
- host: macos-latest
target: "aarch64-apple-darwin"
container-options: "--rm"
- host: ubuntu-latest
container: ubuntu:xenial
container-options: "--platform=linux/amd64 --rm"
container-setup: "apt-get update && apt-get install -y curl musl-tools sudo"
container-setup: "apt-get update && apt-get install -y curl musl-tools sudo unzip"
target: "x86_64-unknown-linux-musl"
setup: "apt-get install -y build-essential clang-5.0 lldb-5.0 llvm-5.0-dev libclang-5.0-dev"
- host: ubuntu-latest
Expand Down Expand Up @@ -144,8 +144,9 @@ jobs:
run: ${{ matrix.settings.container-setup }}

- name: Setup Protoc
uses: arduino/setup-protoc@v1.2.0
uses: arduino/setup-protoc@v2.1.0
with:
version: "26.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup capnproto
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Thanks for your interest in contributing to Turbo!
- [Rust](https://www.rust-lang.org/tools/install)
- [cargo-groups](https://github.com/nicholaslyang/cargo-groups) (used to group crates into Turborepo-specific ones and Turbopack-specific ones)

### Linux Dependencies

- LLD (LLVM Linker), as it's not installed by default on many Linux distributions (e.g. `apt install lld`).

## Contributing to Turborepo

### Building Turborepo
Expand Down
Loading

0 comments on commit c474c65

Please sign in to comment.