Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
macos_cross: false

- target: x86_64-pc-windows-msvc
runner: ubuntu-24.04
runner: windows-latest
binary_ext: ".exe"
linux_cross: false
macos_cross: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
macos_cross: false

- target: x86_64-pc-windows-msvc
runner: ubuntu-24.04
runner: windows-latest
binary_ext: ".exe"
linux_cross: false
macos_cross: false
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/template_native_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ jobs:
sudo apt-get update
sudo apt-get install -y musl-tools pkg-config

# Windows MSVC release artifacts are built from Linux with cargo-xwin.
# Windows MSVC release artifacts can be cross-built from Linux with
# cargo-xwin, but native Windows runners use the standard cargo path.
- name: Install cargo-xwin
if: contains(inputs.target, 'pc-windows-msvc')
if: runner.os == 'Linux' && contains(inputs.target, 'pc-windows-msvc')
uses: taiki-e/install-action@v2
with:
tool: cargo-xwin

- name: Install xwin system dependencies
if: contains(inputs.target, 'pc-windows-msvc')
if: runner.os == 'Linux' && contains(inputs.target, 'pc-windows-msvc')
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang lld zip
Expand All @@ -112,7 +113,7 @@ jobs:
run: pip install cargo-zigbuild

- name: Fetch Windows Python lib for PyO3 cross-compile
if: contains(inputs.target, 'pc-windows-msvc')
if: runner.os == 'Linux' && contains(inputs.target, 'pc-windows-msvc')
shell: bash
run: |
set -euo pipefail
Expand All @@ -138,7 +139,7 @@ jobs:
- name: Build release binaries
shell: bash
run: |
if [[ "${{ inputs.target }}" == *-pc-windows-msvc ]]; then
if [ "${{ runner.os }}" = "Linux" ] && [[ "${{ inputs.target }}" == *-pc-windows-msvc ]]; then
cargo xwin build --release --target ${{ inputs.target }} \
-p fbuild-cli \
-p fbuild-daemon
Expand Down Expand Up @@ -172,7 +173,7 @@ jobs:
shell: bash
run: |
PYTHON_TARGET_DIR="target/python-extension"
if [[ "${{ inputs.target }}" == *-pc-windows-msvc ]]; then
if [ "${{ runner.os }}" = "Linux" ] && [[ "${{ inputs.target }}" == *-pc-windows-msvc ]]; then
PYO3_NO_PYTHON=1 cargo xwin build --release \
--target-dir "${PYTHON_TARGET_DIR}" \
--target ${{ inputs.target }} -p fbuild-python \
Expand Down
Loading