diff --git a/.github/actions/build-upstream/action.yml b/.github/actions/build-upstream/action.yml index 78c88cb834..fa25f0b269 100644 --- a/.github/actions/build-upstream/action.yml +++ b/.github/actions/build-upstream/action.yml @@ -15,7 +15,6 @@ runs: - uses: ./.github/actions/download-rolldown-binaries with: github-token: ${{ github.token }} - target: ${{ inputs.target }} upload: 'false' # Compute cache key once before any builds modify files diff --git a/.github/actions/download-rolldown-binaries/action.yml b/.github/actions/download-rolldown-binaries/action.yml index 5bc103d006..ff4862d18c 100644 --- a/.github/actions/download-rolldown-binaries/action.yml +++ b/.github/actions/download-rolldown-binaries/action.yml @@ -5,10 +5,6 @@ inputs: github-token: description: 'GitHub token for accessing GitHub Package Registry' required: true - target: - description: 'The target platform' - default: 'x86_64-unknown-linux-gnu' - required: false upload: description: 'Upload the rolldown binaries as artifact' required: false @@ -20,12 +16,14 @@ runs: - name: Install previous release shell: bash run: | - if ${{ runner.os == 'Windows' }}; then - export TARGET="win32-x64-msvc" - elif ${{ runner.os == 'Linux' }}; then - export TARGET="linux-x64-gnu" - elif ${{ runner.os == 'macOS' }}; then - export TARGET="darwin-arm64" + # Use host OS + arch (not cross-compilation target) since rolldown + # runs under the host Node process during the build. + if ${{ runner.os == 'Windows' }}; then export TARGET="win32-x64-msvc" + elif ${{ runner.os == 'Linux' && runner.arch == 'X64' }}; then export TARGET="linux-x64-gnu" + elif ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }}; then export TARGET="linux-arm64-gnu" + elif ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }}; then export TARGET="darwin-arm64" + elif ${{ runner.os == 'macOS' && runner.arch == 'X64' }}; then export TARGET="darwin-x64" + else echo "Unsupported platform: ${{ runner.os }} ${{ runner.arch }}" && exit 1 fi # Pin to the version from checked-out rolldown source to avoid mismatch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8bfa9ef62..9d8a08b870 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,8 @@ jobs: target: x86_64-pc-windows-msvc - os: namespace-profile-mac-default target: aarch64-apple-darwin + - os: macos-15-intel + target: x86_64-apple-darwin runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -176,8 +178,13 @@ jobs: matrix: include: - os: ubuntu-latest + target: x86_64-unknown-linux-gnu - os: namespace-profile-mac-default + target: aarch64-apple-darwin - os: windows-latest + target: x86_64-pc-windows-msvc + - os: macos-15-intel + target: x86_64-apple-darwin runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -208,7 +215,7 @@ jobs: - name: Build with upstream uses: ./.github/actions/build-upstream with: - target: ${{ matrix.os == 'ubuntu-latest' && 'x86_64-unknown-linux-gnu' || matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'aarch64-apple-darwin' }} + target: ${{ matrix.target }} - name: Build CLI run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9591012e1a..6e9a0c856e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,7 +169,6 @@ jobs: - uses: ./.github/actions/download-rolldown-binaries with: github-token: ${{ github.token }} - target: x86_64-unknown-linux-gnu upload: 'false' - name: Download Rust CLI binaries