From e1a3c22e11b325799dd9d3a39a09025d49dcd128 Mon Sep 17 00:00:00 2001 From: newyork_loki <137760120+lowkeyrossi@users.noreply.github.com> Date: Fri, 4 Jul 2025 10:15:33 +0530 Subject: [PATCH] CI: Add support for building TikToken WoA --- .github/workflows/build_wheels.yml | 31 +++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 9f14b28..332be5a 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -58,6 +58,35 @@ jobs: name: cibw-wheels-aarch64-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl + build_wheels_windows_arm64: + name: py${{ matrix.python-version }} on ${{ matrix.os }} (arm64) + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + os: [windows-11-arm] + python-version: [39, 310, 311, 312, 313] + steps: + - uses: actions/checkout@v4 + - name: Install Rust for Windows ARM64 + run: | + Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -UseBasicParsing -Outfile rustup-init.exe + .\rustup-init.exe -y --default-toolchain stable --profile minimal + $env:PATH = "$env:PATH;$env:USERPROFILE\.cargo\bin" + & "$env:USERPROFILE\.cargo\bin\rustc" --version + - name: Build wheels + uses: pypa/cibuildwheel@v2.22.0 + env: + CIBW_BUILD: "cp${{ matrix.python-version}}-*" + CIBW_ARCHS: ARM64 + CIBW_BUILD_VERBOSITY: 3 + CIBW_ENVIRONMENT_WINDOWS: PATH="$PATH;$USERPROFILE\\.cargo\\bin" + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-windows-arm64-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl + build_sdist: name: sdist runs-on: ubuntu-latest @@ -84,7 +113,7 @@ jobs: join_artifacts: name: Join artifacts runs-on: ubuntu-latest - needs: [build_wheels, build_wheels_aarch64, build_sdist] + needs: [build_wheels, build_wheels_aarch64, build_wheels_windows_arm64, build_sdist] steps: - name: Merge artifacts uses: actions/upload-artifact/merge@v4