From 394cb75f9a6f215cae263e15fb52ac94e364fece Mon Sep 17 00:00:00 2001 From: oglassdev <23040613+oglassdev@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:55:26 -0400 Subject: [PATCH 1/3] ci(release): cache Rust builds, cross-compile darwin-x64 and use a Windows Dev Drive --- .github/actions/rust-cache/action.yml | 22 +++++++++++++++++--- .github/workflows/release.yml | 29 +++++++++++++++++++++++++-- docs/distribution.md | 3 ++- scripts/install-typescript.mjs | 5 +++++ scripts/package-sdk.py | 19 +++++++++++------- 5 files changed, 65 insertions(+), 13 deletions(-) diff --git a/.github/actions/rust-cache/action.yml b/.github/actions/rust-cache/action.yml index 4b90cd41..07454b00 100644 --- a/.github/actions/rust-cache/action.yml +++ b/.github/actions/rust-cache/action.yml @@ -4,17 +4,33 @@ inputs: profile: description: Cargo output profile directory (debug or release) default: debug + key: + description: Separates the caches of jobs that share a runner OS and architecture, such as a build matrix + default: "" runs: using: composite steps: + # Follows Cargo's CARGO_TARGET_DIR and CARGO_BUILD_TARGET, so set them before this action. + - id: paths + shell: bash + run: | + target="${CARGO_TARGET_DIR:-target}" + profile="$target/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}${{ inputs.profile }}" + echo "target=$target" >> "$GITHUB_OUTPUT" + echo "gn-out=$profile/gn_out" >> "$GITHUB_OUTPUT" - uses: Swatinem/rust-cache@v2 + with: + key: ${{ inputs.key }} + workspaces: . -> ${{ steps.paths.outputs.target }} # rust-cache removes gn_out during cleanup; this later action saves it first. - uses: actions/cache@v5 id: v8 with: - path: target/${{ inputs.profile }}/gn_out - key: v8-${{ runner.os }}-${{ runner.arch }}-${{ inputs.profile }}-${{ hashFiles('Cargo.lock') }} + path: ${{ steps.paths.outputs.gn-out }} + key: >- + v8-${{ inputs.key || format('{0}-{1}', runner.os, runner.arch) }}-${{ inputs.profile }}-${{ + hashFiles('Cargo.lock') }} - name: Rebuild V8 if its native archive was evicted if: steps.v8.outputs.cache-hit != 'true' shell: bash - run: cargo clean -p v8 + run: cargo clean -p v8 --profile ${{ inputs.profile == 'debug' && 'dev' || inputs.profile }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 875ecfb6..4481cd0e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,8 +71,11 @@ jobs: platform: linux-arm64 - runner: macos-15 platform: darwin-arm64 - - runner: macos-15-intel + # Cross-compiled on Apple Silicon, which builds faster than the Intel runner; Rosetta runs the smoke test. + - runner: macos-15 platform: darwin-x64 + target: x86_64-apple-darwin + node-arch: x64 - runner: windows-2025 platform: windows-x64 runs-on: ${{ matrix.runner }} @@ -86,14 +89,25 @@ jobs: - name: Free disk space if: runner.os == 'Linux' run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL + # A Dev Drive speeds up Windows builds; its cleanup runs after the Rust cache saves. + - uses: samypr100/setup-dev-drive@v4 + if: runner.os == 'Windows' + with: + drive-size: 20GB + env-mapping: | + CARGO_HOME,{{ DEV_DRIVE }}/.cargo + RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup + CARGO_TARGET_DIR,{{ DEV_DRIVE }}/target - uses: actions/checkout@v5 - uses: actions/setup-python@v6 with: python-version: "3.13" - uses: pnpm/action-setup@v4 + # The archive's TypeScript compiler matches Node.js's architecture. - uses: actions/setup-node@v5 with: node-version: 24 + architecture: ${{ matrix.node-arch }} - name: Install the pinned TypeScript compiler run: pnpm install --frozen-lockfile --filter chunk-monorepo - uses: actions/setup-java@v5 @@ -104,12 +118,23 @@ jobs: - uses: gradle/actions/setup-gradle@v5 if: matrix.maven - run: rustup toolchain install --no-self-update + - name: Cross-compile for ${{ matrix.target }} + if: matrix.target + run: | + rustup target add ${{ matrix.target }} + echo "CARGO_BUILD_TARGET=${{ matrix.target }}" >> "$GITHUB_ENV" + - uses: ./.github/actions/rust-cache + with: + profile: release + key: ${{ matrix.platform }} - name: Configure the vendored OpenSSL with Strawberry Perl if: runner.os == 'Windows' # Git's MSYS Perl, first on the bash PATH, cannot configure OpenSSL for MSVC. run: echo 'OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl.exe' >> "$GITHUB_ENV" - run: cargo build --release --locked -p chunk-cli - - run: python scripts/package-sdk.py --output dist ${{ !matrix.maven && '--no-maven' || '' }} + - run: >- + python scripts/package-sdk.py --output dist --platform ${{ matrix.platform }} ${{ !matrix.maven && + '--no-maven' || '' }} - name: Compile and type-check a project with the extracted CLI if: runner.os != 'Windows' run: | diff --git a/docs/distribution.md b/docs/distribution.md index f5dd0075..aa33b75a 100644 --- a/docs/distribution.md +++ b/docs/distribution.md @@ -72,7 +72,8 @@ python3 scripts/check-sdk.py target/dist/chunk-0.1.0-linux-x64.tar.gz target/dis `just package-cli` builds the release CLI and runs `scripts/package-sdk.py`, which writes the archive, its checksum and a `maven/` repository with every JVM artifact to `target/dist/`. It refuses to replace existing outputs; pass -`--output DIRECTORY` for another candidate of the same version, or `--chunk PATH` to package another CLI build. +`--output DIRECTORY` for another candidate of the same version, or `--chunk PATH` to package another CLI build and +`--platform` to name a cross-compiled build's platform. `scripts/check-sdk.py` checks the sources and documentation JARs, installs the archive into a temporary prefix, serves the Maven directory over local HTTP, and creates, generates and builds a Java and a Kotlin project against them, diff --git a/scripts/install-typescript.mjs b/scripts/install-typescript.mjs index 78b9a77d..7ec5ab17 100644 --- a/scripts/install-typescript.mjs +++ b/scripts/install-typescript.mjs @@ -6,6 +6,11 @@ import getExePath from "../node_modules/typescript/lib/getExePath.js"; const version = "7.0.2"; const destination = path.resolve(process.argv[2] ?? "target/debug"); +// The installed compiler matches this Node.js build's platform, so a cross-platform SDK needs a matching Node.js. +const platform = `${process.platform === "win32" ? "windows" : process.platform}-${process.arch}`; +if (process.argv[3] && process.argv[3] !== platform) { + throw new Error(`Expected a ${process.argv[3]} Node.js to install its TypeScript compiler, got ${platform}`); +} const compiler = getExePath(); const pkg = JSON.parse(await fs.readFile(new URL("../node_modules/typescript/package.json", import.meta.url), "utf8")); if (pkg.version !== version) throw new Error(`Expected TypeScript ${version}`); diff --git a/scripts/package-sdk.py b/scripts/package-sdk.py index 70c684a6..35fc253b 100644 --- a/scripts/package-sdk.py +++ b/scripts/package-sdk.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Assemble a versioned SDK for the host platform from a prepared CLI and, optionally, the JVM publications.""" +"""Assemble a versioned SDK for one platform from a prepared CLI and, optionally, the JVM publications.""" import argparse import gzip @@ -27,15 +27,19 @@ def host_platform(): def main(): - target = host_platform() - suffix = ".exe" if target.startswith("windows-") else "" parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--chunk", type=Path, default=Path(f"target/release/chunk{suffix}")) + parser.add_argument("--chunk", type=Path, help="CLI to package; defaults to Cargo's release output") + parser.add_argument("--platform", default=host_platform(), help="platform of the CLI; defaults to the host") parser.add_argument("--output", type=Path, default=Path("target/dist")) parser.add_argument("--no-maven", action="store_true", help="package only the CLI archive") args = parser.parse_args() + target = args.platform + suffix = ".exe" if target.startswith("windows-") else "" + # Cargo writes cross-compiled builds to a target triple directory. + rust_target = os.environ.get("CARGO_BUILD_TARGET", "") + chunk = args.chunk or Path(os.environ.get("CARGO_TARGET_DIR", "target"), rust_target, "release", f"chunk{suffix}") repository = Path(__file__).resolve().parent.parent - executable = args.chunk.resolve(strict=True) + executable = chunk.resolve(strict=True) output = args.output.resolve() cargo = tomllib.loads((repository / "Cargo.toml").read_text()) versions = tomllib.loads((repository / "gradle/libs.versions.toml").read_text())["versions"] @@ -62,10 +66,11 @@ def main(): root.mkdir() shutil.copy2(executable, root / f"chunk{suffix}") shutil.copy2(repository / "LICENSE.md", root / "LICENSE.md") - notices = subprocess.run([sys.executable, "-X", "utf8", "scripts/rust-notices.py"], cwd=repository, check=True, + notices = subprocess.run([sys.executable, "-X", "utf8", "scripts/rust-notices.py", + *(["--target", rust_target] if rust_target else [])], cwd=repository, check=True, stdout=subprocess.PIPE, text=True, encoding="utf-8").stdout (root / "THIRD_PARTY_LICENSES").write_text(notices, encoding="utf-8", newline="\n") - subprocess.run(["node", "scripts/install-typescript.mjs", str(root)], cwd=repository, check=True) + subprocess.run(["node", "scripts/install-typescript.mjs", str(root), target], cwd=repository, check=True) if not args.no_maven: subprocess.run([ str(repository / "gradlew"), "publishSdk", f"-Pchunk.sdkRepository={staged_maven}", From 730eb391e4f68f83f3af6745847cc79075fe8547 Mon Sep 17 00:00:00 2001 From: oglassdev <23040613+oglassdev@users.noreply.github.com> Date: Mon, 5 Oct 2026 00:19:45 -0400 Subject: [PATCH 2/3] ci(release): smoke-test the cross-compiled darwin-x64 CLI on Intel --- .github/workflows/release.yml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4481cd0e..3ffeb368 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,7 +71,7 @@ jobs: platform: linux-arm64 - runner: macos-15 platform: darwin-arm64 - # Cross-compiled on Apple Silicon, which builds faster than the Intel runner; Rosetta runs the smoke test. + # Cross-compiled on Apple Silicon, which builds faster than the Intel runner that smoke-tests it. - runner: macos-15 platform: darwin-x64 target: x86_64-apple-darwin @@ -85,6 +85,7 @@ jobs: shell: bash env: CHUNK_RELEASE_VERSION: ${{ needs.version.outputs.version }} + PLATFORM: ${{ matrix.platform }} steps: - name: Free disk space if: runner.os == 'Linux' @@ -136,9 +137,9 @@ jobs: python scripts/package-sdk.py --output dist --platform ${{ matrix.platform }} ${{ !matrix.maven && '--no-maven' || '' }} - name: Compile and type-check a project with the extracted CLI - if: runner.os != 'Windows' - run: | - name="chunk-$CHUNK_RELEASE_VERSION-${{ matrix.platform }}" + if: runner.os != 'Windows' && !matrix.target + run: &smoke-test | + name="chunk-$CHUNK_RELEASE_VERSION-$PLATFORM" mkdir -p "$RUNNER_TEMP/sdk" tar -xzf "dist/$name.tar.gz" -C "$RUNNER_TEMP/sdk" chunk="$RUNNER_TEMP/sdk/$name/chunk" @@ -166,6 +167,23 @@ jobs: if-no-files-found: error retention-days: 1 + # V8 crashes under Rosetta, so the cross-compiled darwin-x64 CLI runs on Intel. + smoke-darwin-x64: + needs: [version, package] + runs-on: macos-15-intel + timeout-minutes: 15 + env: + CHUNK_RELEASE_VERSION: ${{ needs.version.outputs.version }} + PLATFORM: darwin-x64 + steps: + - uses: actions/checkout@v5 + - uses: actions/download-artifact@v4 + with: + name: archive-darwin-x64 + path: dist + - name: Compile and type-check a project with the extracted CLI + run: *smoke-test + verify: needs: [version, package] runs-on: ubuntu-24.04 @@ -203,7 +221,7 @@ jobs: # Maven first: a published CLI pins JVM artifacts that must already resolve. publish: if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' - needs: [version, package, verify] + needs: [version, package, smoke-darwin-x64, verify] runs-on: ubuntu-24.04 timeout-minutes: 15 permissions: @@ -273,8 +291,9 @@ jobs: cleanup: if: >- always() && (needs.publish.result == 'success' || (github.event_name == 'pull_request' && needs.verify.result == - 'success' && github.event.pull_request.head.repo.full_name == github.repository)) - needs: [verify, publish] + 'success' && needs.smoke-darwin-x64.result == 'success' && github.event.pull_request.head.repo.full_name == + github.repository)) + needs: [smoke-darwin-x64, verify, publish] runs-on: ubuntu-24.04 timeout-minutes: 5 permissions: From bd13faf2f1cf4dbee2721b77ca453200ba86d299 Mon Sep 17 00:00:00 2001 From: oglassdev <23040613+oglassdev@users.noreply.github.com> Date: Mon, 5 Oct 2026 08:16:21 -0400 Subject: [PATCH 3/3] ci(release): keep only per-platform Rust caching --- .github/actions/rust-cache/action.yml | 11 +----- .github/workflows/release.yml | 56 ++++----------------------- docs/distribution.md | 3 +- scripts/install-typescript.mjs | 5 --- scripts/package-sdk.py | 19 ++++----- 5 files changed, 17 insertions(+), 77 deletions(-) diff --git a/.github/actions/rust-cache/action.yml b/.github/actions/rust-cache/action.yml index 07454b00..c715da49 100644 --- a/.github/actions/rust-cache/action.yml +++ b/.github/actions/rust-cache/action.yml @@ -10,23 +10,14 @@ inputs: runs: using: composite steps: - # Follows Cargo's CARGO_TARGET_DIR and CARGO_BUILD_TARGET, so set them before this action. - - id: paths - shell: bash - run: | - target="${CARGO_TARGET_DIR:-target}" - profile="$target/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}${{ inputs.profile }}" - echo "target=$target" >> "$GITHUB_OUTPUT" - echo "gn-out=$profile/gn_out" >> "$GITHUB_OUTPUT" - uses: Swatinem/rust-cache@v2 with: key: ${{ inputs.key }} - workspaces: . -> ${{ steps.paths.outputs.target }} # rust-cache removes gn_out during cleanup; this later action saves it first. - uses: actions/cache@v5 id: v8 with: - path: ${{ steps.paths.outputs.gn-out }} + path: target/${{ inputs.profile }}/gn_out key: >- v8-${{ inputs.key || format('{0}-{1}', runner.os, runner.arch) }}-${{ inputs.profile }}-${{ hashFiles('Cargo.lock') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ffeb368..05382dbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,11 +71,8 @@ jobs: platform: linux-arm64 - runner: macos-15 platform: darwin-arm64 - # Cross-compiled on Apple Silicon, which builds faster than the Intel runner that smoke-tests it. - - runner: macos-15 + - runner: macos-15-intel platform: darwin-x64 - target: x86_64-apple-darwin - node-arch: x64 - runner: windows-2025 platform: windows-x64 runs-on: ${{ matrix.runner }} @@ -85,30 +82,18 @@ jobs: shell: bash env: CHUNK_RELEASE_VERSION: ${{ needs.version.outputs.version }} - PLATFORM: ${{ matrix.platform }} steps: - name: Free disk space if: runner.os == 'Linux' run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL - # A Dev Drive speeds up Windows builds; its cleanup runs after the Rust cache saves. - - uses: samypr100/setup-dev-drive@v4 - if: runner.os == 'Windows' - with: - drive-size: 20GB - env-mapping: | - CARGO_HOME,{{ DEV_DRIVE }}/.cargo - RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup - CARGO_TARGET_DIR,{{ DEV_DRIVE }}/target - uses: actions/checkout@v5 - uses: actions/setup-python@v6 with: python-version: "3.13" - uses: pnpm/action-setup@v4 - # The archive's TypeScript compiler matches Node.js's architecture. - uses: actions/setup-node@v5 with: node-version: 24 - architecture: ${{ matrix.node-arch }} - name: Install the pinned TypeScript compiler run: pnpm install --frozen-lockfile --filter chunk-monorepo - uses: actions/setup-java@v5 @@ -119,11 +104,6 @@ jobs: - uses: gradle/actions/setup-gradle@v5 if: matrix.maven - run: rustup toolchain install --no-self-update - - name: Cross-compile for ${{ matrix.target }} - if: matrix.target - run: | - rustup target add ${{ matrix.target }} - echo "CARGO_BUILD_TARGET=${{ matrix.target }}" >> "$GITHUB_ENV" - uses: ./.github/actions/rust-cache with: profile: release @@ -133,13 +113,11 @@ jobs: # Git's MSYS Perl, first on the bash PATH, cannot configure OpenSSL for MSVC. run: echo 'OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl.exe' >> "$GITHUB_ENV" - run: cargo build --release --locked -p chunk-cli - - run: >- - python scripts/package-sdk.py --output dist --platform ${{ matrix.platform }} ${{ !matrix.maven && - '--no-maven' || '' }} + - run: python scripts/package-sdk.py --output dist ${{ !matrix.maven && '--no-maven' || '' }} - name: Compile and type-check a project with the extracted CLI - if: runner.os != 'Windows' && !matrix.target - run: &smoke-test | - name="chunk-$CHUNK_RELEASE_VERSION-$PLATFORM" + if: runner.os != 'Windows' + run: | + name="chunk-$CHUNK_RELEASE_VERSION-${{ matrix.platform }}" mkdir -p "$RUNNER_TEMP/sdk" tar -xzf "dist/$name.tar.gz" -C "$RUNNER_TEMP/sdk" chunk="$RUNNER_TEMP/sdk/$name/chunk" @@ -167,23 +145,6 @@ jobs: if-no-files-found: error retention-days: 1 - # V8 crashes under Rosetta, so the cross-compiled darwin-x64 CLI runs on Intel. - smoke-darwin-x64: - needs: [version, package] - runs-on: macos-15-intel - timeout-minutes: 15 - env: - CHUNK_RELEASE_VERSION: ${{ needs.version.outputs.version }} - PLATFORM: darwin-x64 - steps: - - uses: actions/checkout@v5 - - uses: actions/download-artifact@v4 - with: - name: archive-darwin-x64 - path: dist - - name: Compile and type-check a project with the extracted CLI - run: *smoke-test - verify: needs: [version, package] runs-on: ubuntu-24.04 @@ -221,7 +182,7 @@ jobs: # Maven first: a published CLI pins JVM artifacts that must already resolve. publish: if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' - needs: [version, package, smoke-darwin-x64, verify] + needs: [version, package, verify] runs-on: ubuntu-24.04 timeout-minutes: 15 permissions: @@ -291,9 +252,8 @@ jobs: cleanup: if: >- always() && (needs.publish.result == 'success' || (github.event_name == 'pull_request' && needs.verify.result == - 'success' && needs.smoke-darwin-x64.result == 'success' && github.event.pull_request.head.repo.full_name == - github.repository)) - needs: [smoke-darwin-x64, verify, publish] + 'success' && github.event.pull_request.head.repo.full_name == github.repository)) + needs: [verify, publish] runs-on: ubuntu-24.04 timeout-minutes: 5 permissions: diff --git a/docs/distribution.md b/docs/distribution.md index aa33b75a..f5dd0075 100644 --- a/docs/distribution.md +++ b/docs/distribution.md @@ -72,8 +72,7 @@ python3 scripts/check-sdk.py target/dist/chunk-0.1.0-linux-x64.tar.gz target/dis `just package-cli` builds the release CLI and runs `scripts/package-sdk.py`, which writes the archive, its checksum and a `maven/` repository with every JVM artifact to `target/dist/`. It refuses to replace existing outputs; pass -`--output DIRECTORY` for another candidate of the same version, or `--chunk PATH` to package another CLI build and -`--platform` to name a cross-compiled build's platform. +`--output DIRECTORY` for another candidate of the same version, or `--chunk PATH` to package another CLI build. `scripts/check-sdk.py` checks the sources and documentation JARs, installs the archive into a temporary prefix, serves the Maven directory over local HTTP, and creates, generates and builds a Java and a Kotlin project against them, diff --git a/scripts/install-typescript.mjs b/scripts/install-typescript.mjs index 7ec5ab17..78b9a77d 100644 --- a/scripts/install-typescript.mjs +++ b/scripts/install-typescript.mjs @@ -6,11 +6,6 @@ import getExePath from "../node_modules/typescript/lib/getExePath.js"; const version = "7.0.2"; const destination = path.resolve(process.argv[2] ?? "target/debug"); -// The installed compiler matches this Node.js build's platform, so a cross-platform SDK needs a matching Node.js. -const platform = `${process.platform === "win32" ? "windows" : process.platform}-${process.arch}`; -if (process.argv[3] && process.argv[3] !== platform) { - throw new Error(`Expected a ${process.argv[3]} Node.js to install its TypeScript compiler, got ${platform}`); -} const compiler = getExePath(); const pkg = JSON.parse(await fs.readFile(new URL("../node_modules/typescript/package.json", import.meta.url), "utf8")); if (pkg.version !== version) throw new Error(`Expected TypeScript ${version}`); diff --git a/scripts/package-sdk.py b/scripts/package-sdk.py index 35fc253b..70c684a6 100644 --- a/scripts/package-sdk.py +++ b/scripts/package-sdk.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Assemble a versioned SDK for one platform from a prepared CLI and, optionally, the JVM publications.""" +"""Assemble a versioned SDK for the host platform from a prepared CLI and, optionally, the JVM publications.""" import argparse import gzip @@ -27,19 +27,15 @@ def host_platform(): def main(): + target = host_platform() + suffix = ".exe" if target.startswith("windows-") else "" parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--chunk", type=Path, help="CLI to package; defaults to Cargo's release output") - parser.add_argument("--platform", default=host_platform(), help="platform of the CLI; defaults to the host") + parser.add_argument("--chunk", type=Path, default=Path(f"target/release/chunk{suffix}")) parser.add_argument("--output", type=Path, default=Path("target/dist")) parser.add_argument("--no-maven", action="store_true", help="package only the CLI archive") args = parser.parse_args() - target = args.platform - suffix = ".exe" if target.startswith("windows-") else "" - # Cargo writes cross-compiled builds to a target triple directory. - rust_target = os.environ.get("CARGO_BUILD_TARGET", "") - chunk = args.chunk or Path(os.environ.get("CARGO_TARGET_DIR", "target"), rust_target, "release", f"chunk{suffix}") repository = Path(__file__).resolve().parent.parent - executable = chunk.resolve(strict=True) + executable = args.chunk.resolve(strict=True) output = args.output.resolve() cargo = tomllib.loads((repository / "Cargo.toml").read_text()) versions = tomllib.loads((repository / "gradle/libs.versions.toml").read_text())["versions"] @@ -66,11 +62,10 @@ def main(): root.mkdir() shutil.copy2(executable, root / f"chunk{suffix}") shutil.copy2(repository / "LICENSE.md", root / "LICENSE.md") - notices = subprocess.run([sys.executable, "-X", "utf8", "scripts/rust-notices.py", - *(["--target", rust_target] if rust_target else [])], cwd=repository, check=True, + notices = subprocess.run([sys.executable, "-X", "utf8", "scripts/rust-notices.py"], cwd=repository, check=True, stdout=subprocess.PIPE, text=True, encoding="utf-8").stdout (root / "THIRD_PARTY_LICENSES").write_text(notices, encoding="utf-8", newline="\n") - subprocess.run(["node", "scripts/install-typescript.mjs", str(root), target], cwd=repository, check=True) + subprocess.run(["node", "scripts/install-typescript.mjs", str(root)], cwd=repository, check=True) if not args.no_maven: subprocess.run([ str(repository / "gradlew"), "publishSdk", f"-Pchunk.sdkRepository={staged_maven}",