Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on Windows #2743

Merged
merged 22 commits into from
Nov 20, 2024
Merged
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
54 changes: 54 additions & 0 deletions .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build on Windows

on:
workflow_dispatch:

pull_request:
branches:
- main
push:
branches:
- main

permissions: read-all

env:
NEW_WORKSPACE: C:\gh${{ github.run_id }}

jobs:
build:
name: Build
runs-on: avc336
steps:
- name: Enable long paths
run: |
git config --system core.longPaths true

- name: Checkout repository
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

# Copy workspace to a temporary location with a shorter name.
- name: Copy workspace
run: |
Copy-Item -Path ${{ github.workspace }} -Destination ${{ env.NEW_WORKSPACE }} -Recurse

# We need ninja >= 1.12.0 to support long names on Windows. At the moment there is no required
# version in pypi, so instead of installing ninja with pip we use a preinstalled 1.12.1 on the
# runner.
- name: Build Triton
run: |
cd ${{ env.NEW_WORKSPACE }}
cd python
pip install -U wheel pybind11 certifi cython cmake
python -m certifi
pip install --no-build-isolation '.[build]'

- name: Clean
if: ${{ always() }}
run: |
Remove-Item -LiteralPath ${{ env.NEW_WORKSPACE }} -Force -Recurse -ErrorAction Ignore