Skip to content

Commit 413e738

Browse files
authored
Build on Windows (#2743)
1 parent a8ca9e5 commit 413e738

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build on Windows
2+
3+
on:
4+
workflow_dispatch:
5+
6+
pull_request:
7+
branches:
8+
- main
9+
push:
10+
branches:
11+
- main
12+
13+
permissions: read-all
14+
15+
env:
16+
NEW_WORKSPACE: C:\gh${{ github.run_id }}
17+
18+
jobs:
19+
build:
20+
name: Build
21+
runs-on: avc336
22+
steps:
23+
- name: Enable long paths
24+
run: |
25+
git config --system core.longPaths true
26+
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Install Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.9'
34+
35+
# Copy workspace to a temporary location with a shorter name.
36+
- name: Copy workspace
37+
run: |
38+
Copy-Item -Path ${{ github.workspace }} -Destination ${{ env.NEW_WORKSPACE }} -Recurse
39+
40+
# We need ninja >= 1.12.0 to support long names on Windows. At the moment there is no required
41+
# version in pypi, so instead of installing ninja with pip we use a preinstalled 1.12.1 on the
42+
# runner.
43+
- name: Build Triton
44+
run: |
45+
cd ${{ env.NEW_WORKSPACE }}
46+
cd python
47+
pip install -U wheel pybind11 certifi cython cmake
48+
python -m certifi
49+
pip install --no-build-isolation '.[build]'
50+
51+
- name: Clean
52+
if: ${{ always() }}
53+
run: |
54+
Remove-Item -LiteralPath ${{ env.NEW_WORKSPACE }} -Force -Recurse -ErrorAction Ignore

0 commit comments

Comments
 (0)