diff --git a/.github/workflows/rust-release-windows.yml b/.github/workflows/rust-release-windows.yml index 228f68949..a93577c45 100644 --- a/.github/workflows/rust-release-windows.yml +++ b/.github/workflows/rust-release-windows.yml @@ -277,13 +277,24 @@ jobs: shell: bash run: | set -euo pipefail - for bundle in primary app-server; do - bash "${GITHUB_WORKSPACE}/.github/scripts/build-codex-package-archive.sh" \ - --target "${{ matrix.target }}" \ - --bundle "$bundle" \ - --entrypoint-dir "target/${{ matrix.target }}/release" \ - --archive-dir "dist/${{ matrix.target }}" - done + target="${{ matrix.target }}" + archive_script="${GITHUB_WORKSPACE}/.github/scripts/build-codex-package-archive.sh" + temp_root="${RUNNER_TEMP}/codex-package-archives" + + # The package helper rewrites cached DotSlash executables. Keep the + # concurrent processes in separate temp roots because Windows cannot + # replace an executable while another process is using it. + mkdir -p "$temp_root/primary" "$temp_root/app-server" + printf '%s\0' primary app-server | + xargs -0 -P0 -I{} env \ + TMPDIR="$temp_root/{}" \ + TMP="$temp_root/{}" \ + TEMP="$temp_root/{}" \ + bash "$archive_script" \ + --target "$target" \ + --bundle "{}" \ + --entrypoint-dir "target/$target/release" \ + --archive-dir "dist/$target" - name: Build Python runtime wheel shell: bash