Skip to content

Fix clang error: add explicit braces to avoid dangling else #5899

Fix clang error: add explicit braces to avoid dangling else

Fix clang error: add explicit braces to avoid dangling else #5899

Workflow file for this run

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:
- windows
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Clean up old workspaces
shell: bash
run: |
rm -rf /c/gh*
# Copy workspace to a temporary location with a shorter name.
- name: Copy workspace
run: |
Copy-Item -Path ${{ github.workspace }} -Destination ${{ env.NEW_WORKSPACE }} -Recurse
- name: Create venv
run:
python -m venv .venv
# 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: Setup Triton
run: |
.venv\Scripts\activate.ps1
Invoke-BatchFile "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
cd ${{ env.NEW_WORKSPACE }}
pip install -U wheel pybind11 cython cmake
pip install -v '.[build]'
- name: Clean
if: ${{ always() }}
run: |
Remove-Item -LiteralPath ${{ env.NEW_WORKSPACE }} -Force -Recurse -ErrorAction Ignore