-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Workflow to build and test Triton on Windows (#3075)
Adding initial workflow to run some tests on Windows+A770 daily. Currently tutorials, instrumentation and e2e tests are skipped. Separate workflows to build and test on Windows: * `build-windows.yml` - runs on every PR, builds only. * `build-test-windows.yml` - runs daily, builds and tests. --------- Signed-off-by: Gregory Shimansky <[email protected]> Co-authored-by: Gregory Shimansky <[email protected]>
- Loading branch information
1 parent
18b8b75
commit 118f6ed
Showing
3 changed files
with
114 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build on Windows | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
- release/** | ||
push: | ||
branches: | ||
- main | ||
- release/** | ||
|
||
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 }} | ||
cmd /c '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 && set' | ForEach-Object { | ||
if ($_ -match '^(.*?)=(.*)$') { | ||
[Environment]::SetEnvironmentVariable($matches[1], $matches[2]) | ||
} | ||
} | ||
cd python | ||
pip install -U wheel pybind11 certifi cython cmake setuptools>=65.6.1 | ||
python -m certifi | ||
pip install -v --no-build-isolation '.[build]' | ||
- name: Clean | ||
if: ${{ always() }} | ||
run: | | ||
Remove-Item -LiteralPath ${{ env.NEW_WORKSPACE }} -Force -Recurse -ErrorAction Ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters