From 3851c2226983a62e8fa6e3269fbe1e7fbba94691 Mon Sep 17 00:00:00 2001 From: Johnny Date: Wed, 10 Sep 2025 03:39:34 +0200 Subject: [PATCH 01/52] draft version llvm --- .github/workflows/llvm-ci.yml | 158 ++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 .github/workflows/llvm-ci.yml diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml new file mode 100644 index 0000000..a1ffc52 --- /dev/null +++ b/.github/workflows/llvm-ci.yml @@ -0,0 +1,158 @@ +name: Build LLVM (matrix) + +on: + workflow_dispatch: + inputs: + llvm_pin: + description: "Commit SHA (or ref) to fetch from llvm/llvm-project" + required: true + type: string + + push: + branches: [ main ] + pull_request: + +env: + # Used by your script below; workflow_dispatch input takes precedence when triggered manually. + LLVM_PIN: ${{ inputs.llvm_pin }} + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + build: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-22.04-arm64, macos-14, windows-2022] + + defaults: + run: + # Use bash everywhere so your script is the same on each runner + shell: bash + + steps: + - name: Checkout (sparse) + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + # ---------- Prereqs per OS ---------- + - name: Install prerequisites (Ubuntu) + if: startsWith(matrix.os, 'ubuntu-') + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + git python3 python3-pip python3-venv \ + cmake ninja-build build-essential + python3 -m pip install --upgrade pip + + - name: Install prerequisites (macOS) + if: matrix.os == 'macos-14' + run: | + brew update + brew install cmake ninja || true + # Ensure modern Python available and up-to-date pip + python3 -m pip install --upgrade pip + + - name: Install prerequisites (Windows) + if: matrix.os == 'windows-2022' + shell: pwsh + run: | + # Rely on preinstalled toolchain; ensure pip packages for Ninja/CMake are present as fallback + python -m pip install --upgrade pip + python -m pip install ninja cmake + git config --global core.autocrlf false + + # ---------- Prepare install prefix (/opt) ---------- + - name: Prepare /opt install prefix + if: matrix.os != 'windows-2022' + run: | + sudo mkdir -p /opt/llvm-project/install + sudo chown -R "$USER":"$USER" /opt/llvm-project + + - name: Prepare install prefix (Windows) + if: matrix.os == 'windows-2022' + run: | + # Use a writable path on Windows; keep your given prefix for other OSes. + echo "CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/llvm-project/install" >> $GITHUB_ENV + + # ---------- Build ---------- + - name: Build LLVM/MLIR with Ninja + env: + # If Windows step set CMAKE_INSTALL_PREFIX above, use it; otherwise default to /opt path. + CMAKE_INSTALL_PREFIX: ${{ env.CMAKE_INSTALL_PREFIX || '/opt/llvm-project/install' }} + run: | + set -euo pipefail + + echo "LLVM_PIN=${LLVM_PIN:-''}" + if [[ -z "${LLVM_PIN:-}" ]]; then + echo "ERROR: LLVM_PIN is not set. Provide it via workflow_dispatch input 'llvm_pin' or env." + exit 2 + fi + + mkdir -p llvm-project + cd llvm-project + git init + git remote add origin https://github.com/llvm/llvm-project.git + # fetch a single commit (depth 1) for the provided pin + git fetch --depth 1 origin "${LLVM_PIN}" + git checkout FETCH_HEAD + + # Apply patch if present (do not fail if missing) + if [[ -f /tmp/triton/llvm_sm110_patch.diff ]]; then + echo "Applying /tmp/triton/llvm_sm110_patch.diff" + git apply /tmp/triton/llvm_sm110_patch.diff + else + echo "NOTE: Patch file /tmp/triton/llvm_sm110_patch.diff not found; continuing without it." + fi + + # Python deps for MLIR + python3 -m pip install -r ./mlir/python/requirements.txt + + mkdir -p install build + cd build + + # Location of top-level llvm directory within monorepo + LLVM_SRC_DIR="../llvm" + + # Generator selection (Ninja) + # On Windows, prefer the Python-provided Ninja if not on PATH + if [[ "${{ matrix.os }}" == "windows-2022" ]]; then + export PATH="$HOME/AppData/Roaming/Python/Python*/Scripts:$PATH" + fi + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ + -DLLVM_BUILD_UTILS=ON \ + -DLLVM_BUILD_TOOLS=ON \ + -DLLVM_ENABLE_ASSERTIONS=ON \ + -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ + -DLLVM_ENABLE_PROJECTS="llvm;clang;lld;mlir" \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ + -DLLVM_ENABLE_TERMINFO=OFF \ + "${LLVM_SRC_DIR}" + + # Build and run MLIR checks that don't require full runtimes, + # then install into the chosen prefix + ninja check-mlir-build-only install + + - name: Archive install (artifact) + if: always() + uses: actions/upload-artifact@v4 + with: + name: llvm-install-${{ matrix.os }} + path: | + /opt/llvm-project/install + llvm-project/install + if-no-files-found: warn From 8aa171ff99f7e498a23c1d1c7af3b20d588cecbc Mon Sep 17 00:00:00 2001 From: Johnny Date: Wed, 10 Sep 2025 03:53:09 +0200 Subject: [PATCH 02/52] Update llvm-ci.yml --- .github/workflows/llvm-ci.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index a1ffc52..1c8fb95 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-22.04-arm64, macos-14, windows-2022] + os: [ubuntu-22.04, ubuntu-22.04-arm64, macos-15, windows-2025] defaults: run: @@ -107,14 +107,6 @@ jobs: git fetch --depth 1 origin "${LLVM_PIN}" git checkout FETCH_HEAD - # Apply patch if present (do not fail if missing) - if [[ -f /tmp/triton/llvm_sm110_patch.diff ]]; then - echo "Applying /tmp/triton/llvm_sm110_patch.diff" - git apply /tmp/triton/llvm_sm110_patch.diff - else - echo "NOTE: Patch file /tmp/triton/llvm_sm110_patch.diff not found; continuing without it." - fi - # Python deps for MLIR python3 -m pip install -r ./mlir/python/requirements.txt @@ -126,7 +118,7 @@ jobs: # Generator selection (Ninja) # On Windows, prefer the Python-provided Ninja if not on PATH - if [[ "${{ matrix.os }}" == "windows-2022" ]]; then + if [[ "${{ matrix.os }}" == "windows-2025" ]]; then export PATH="$HOME/AppData/Roaming/Python/Python*/Scripts:$PATH" fi From 67c5bffff6f0b96686c5b3ae8953eac66e215c22 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 12 Sep 2025 17:49:04 +0200 Subject: [PATCH 03/52] Update llvm-ci.yml --- .github/workflows/llvm-ci.yml | 159 ++++++++++++++++------------------ 1 file changed, 76 insertions(+), 83 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 1c8fb95..fd80c72 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -4,18 +4,13 @@ on: workflow_dispatch: inputs: llvm_pin: - description: "Commit SHA (or ref) to fetch from llvm/llvm-project" - required: true - type: string - + description: "Commit SHA, tag (e.g. llvmorg-21.1.1), or ref for llvm/llvm-project" + required: false + default: llvmorg-21.1.1 push: branches: [ main ] pull_request: -env: - # Used by your script below; workflow_dispatch input takes precedence when triggered manually. - LLVM_PIN: ${{ inputs.llvm_pin }} - permissions: contents: read @@ -27,124 +22,122 @@ jobs: build: name: ${{ matrix.os }} runs-on: ${{ matrix.os }} - timeout-minutes: 120 + timeout-minutes: 180 strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-22.04-arm64, macos-15, windows-2025] + os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] + + # Fallback order: manual input → repo/org variable → default stable tag + env: + LLVM_PIN: ${{ github.event.inputs.llvm_pin || vars.LLVM_PIN || 'llvmorg-21.1.1' }} defaults: run: - # Use bash everywhere so your script is the same on each runner shell: bash steps: - - name: Checkout (sparse) + - name: Checkout uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 with: - fetch-depth: 1 + python-version: '3.11' - # ---------- Prereqs per OS ---------- - - name: Install prerequisites (Ubuntu) - if: startsWith(matrix.os, 'ubuntu-') + # ---------- Prereqs ---------- + - name: Install prerequisites (Linux) + if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - git python3 python3-pip python3-venv \ - cmake ninja-build build-essential - python3 -m pip install --upgrade pip - + sudo apt-get install -y --no-install-recommends git cmake ninja-build build-essential + python -m pip install --upgrade pip - name: Install prerequisites (macOS) - if: matrix.os == 'macos-14' + if: runner.os == 'macOS' run: | brew update brew install cmake ninja || true - # Ensure modern Python available and up-to-date pip python3 -m pip install --upgrade pip - - name: Install prerequisites (Windows) - if: matrix.os == 'windows-2022' + if: runner.os == 'Windows' shell: pwsh run: | - # Rely on preinstalled toolchain; ensure pip packages for Ninja/CMake are present as fallback python -m pip install --upgrade pip python -m pip install ninja cmake git config --global core.autocrlf false - - # ---------- Prepare install prefix (/opt) ---------- - - name: Prepare /opt install prefix - if: matrix.os != 'windows-2022' - run: | - sudo mkdir -p /opt/llvm-project/install - sudo chown -R "$USER":"$USER" /opt/llvm-project - - - name: Prepare install prefix (Windows) - if: matrix.os == 'windows-2022' + # ---------- Compute install prefix ---------- + - name: Compute install prefix + id: prefix run: | - # Use a writable path on Windows; keep your given prefix for other OSes. - echo "CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/llvm-project/install" >> $GITHUB_ENV - - # ---------- Build ---------- - - name: Build LLVM/MLIR with Ninja + set -euo pipefail + if [ "${RUNNER_OS}" = "Windows" ]; then + echo "prefix=${RUNNER_TEMP}\\llvm-install" >> "$GITHUB_OUTPUT" + else + echo "prefix=${RUNNER_TEMP}/llvm-install" >> "$GITHUB_OUTPUT" + fi + # ---------- Build *nix ---------- + - name: Build (Linux & macOS) + if: runner.os != 'Windows' env: - # If Windows step set CMAKE_INSTALL_PREFIX above, use it; otherwise default to /opt path. - CMAKE_INSTALL_PREFIX: ${{ env.CMAKE_INSTALL_PREFIX || '/opt/llvm-project/install' }} + CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} run: | set -euo pipefail - - echo "LLVM_PIN=${LLVM_PIN:-''}" - if [[ -z "${LLVM_PIN:-}" ]]; then - echo "ERROR: LLVM_PIN is not set. Provide it via workflow_dispatch input 'llvm_pin' or env." - exit 2 - fi - + echo "Using LLVM_PIN=${LLVM_PIN}" mkdir -p llvm-project cd llvm-project git init git remote add origin https://github.com/llvm/llvm-project.git - # fetch a single commit (depth 1) for the provided pin git fetch --depth 1 origin "${LLVM_PIN}" - git checkout FETCH_HEAD - - # Python deps for MLIR - python3 -m pip install -r ./mlir/python/requirements.txt - - mkdir -p install build - cd build - - # Location of top-level llvm directory within monorepo - LLVM_SRC_DIR="../llvm" - - # Generator selection (Ninja) - # On Windows, prefer the Python-provided Ninja if not on PATH - if [[ "${{ matrix.os }}" == "windows-2025" ]]; then - export PATH="$HOME/AppData/Roaming/Python/Python*/Scripts:$PATH" - fi - - cmake -G Ninja \ + git checkout --detach FETCH_HEAD + python3 -m pip install -r mlir/python/requirements.txt + cmake -S llvm -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ - -DLLVM_BUILD_UTILS=ON \ - -DLLVM_BUILD_TOOLS=ON \ -DLLVM_ENABLE_ASSERTIONS=ON \ - -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ - -DLLVM_ENABLE_PROJECTS="llvm;clang;lld;mlir" \ + -DLLVM_BUILD_UTILS=ON -DLLVM_BUILD_TOOLS=ON \ -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_ENABLE_PROJECTS="clang;lld;mlir" \ + -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ - -DLLVM_ENABLE_TERMINFO=OFF \ - "${LLVM_SRC_DIR}" - - # Build and run MLIR checks that don't require full runtimes, - # then install into the chosen prefix - ninja check-mlir-build-only install - + -DLLVM_ENABLE_TERMINFO=OFF + cmake --build build --target all -- -k 0 + cmake --build build --target check-mlir + cmake --build build --target install + # ---------- Build Windows ---------- + - name: Build (Windows) + if: runner.os == 'Windows' + shell: pwsh + env: + CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} + run: | + $ErrorActionPreference = 'Stop' + Write-Host "Using LLVM_PIN=$env:LLVM_PIN" + New-Item -ItemType Directory -Force -Path llvm-project | Out-Null + Set-Location llvm-project + git init + git remote add origin https://github.com/llvm/llvm-project.git + git fetch --depth 1 origin "$env:LLVM_PIN" + git checkout --detach FETCH_HEAD + python -m pip install -r mlir/python/requirements.txt + cmake -S llvm -B build -G "Ninja" ` + -DCMAKE_BUILD_TYPE=Release ` + -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` + -DLLVM_ENABLE_ASSERTIONS=ON ` + -DLLVM_BUILD_UTILS=ON -DLLVM_BUILD_TOOLS=ON ` + -DLLVM_INSTALL_UTILS=ON ` + -DLLVM_ENABLE_PROJECTS="clang;lld;mlir" ` + -DMLIR_ENABLE_BINDINGS_PYTHON=ON ` + -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` + -DLLVM_ENABLE_TERMINFO=OFF + cmake --build build --target all + cmake --build build --target check-mlir + cmake --build build --target install + # ---------- Artifact ---------- - name: Archive install (artifact) if: always() uses: actions/upload-artifact@v4 with: name: llvm-install-${{ matrix.os }} - path: | - /opt/llvm-project/install - llvm-project/install + path: ${{ steps.prefix.outputs.prefix }} if-no-files-found: warn From d5ce1f4812258bf2a1ba61112e35498afdad0932 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 12 Sep 2025 18:19:05 +0200 Subject: [PATCH 04/52] Update llvm-ci.yml --- .github/workflows/llvm-ci.yml | 121 +++++++++++++++++++++++++++++++--- 1 file changed, 112 insertions(+), 9 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index fd80c72..c2c8c94 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -23,14 +23,13 @@ jobs: name: ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 180 - strategy: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - # Fallback order: manual input → repo/org variable → default stable tag env: + # manual input → repo/org var → default LLVM_PIN: ${{ github.event.inputs.llvm_pin || vars.LLVM_PIN || 'llvmorg-21.1.1' }} defaults: @@ -46,19 +45,25 @@ jobs: with: python-version: '3.11' + # --- calm the git default-branch hint --- + - name: Silence git default-branch hint + run: git config --global init.defaultBranch main + # ---------- Prereqs ---------- - name: Install prerequisites (Linux) if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends git cmake ninja-build build-essential + sudo apt-get install -y --no-install-recommends git cmake ninja-build build-essential zip python -m pip install --upgrade pip + - name: Install prerequisites (macOS) if: runner.os == 'macOS' run: | brew update brew install cmake ninja || true python3 -m pip install --upgrade pip + - name: Install prerequisites (Windows) if: runner.os == 'Windows' shell: pwsh @@ -66,6 +71,7 @@ jobs: python -m pip install --upgrade pip python -m pip install ninja cmake git config --global core.autocrlf false + # ---------- Compute install prefix ---------- - name: Compute install prefix id: prefix @@ -76,6 +82,7 @@ jobs: else echo "prefix=${RUNNER_TEMP}/llvm-install" >> "$GITHUB_OUTPUT" fi + # ---------- Build *nix ---------- - name: Build (Linux & macOS) if: runner.os != 'Windows' @@ -84,13 +91,16 @@ jobs: run: | set -euo pipefail echo "Using LLVM_PIN=${LLVM_PIN}" + mkdir -p llvm-project cd llvm-project git init git remote add origin https://github.com/llvm/llvm-project.git git fetch --depth 1 origin "${LLVM_PIN}" git checkout --detach FETCH_HEAD + python3 -m pip install -r mlir/python/requirements.txt + cmake -S llvm -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ @@ -101,9 +111,11 @@ jobs: -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ -DLLVM_ENABLE_TERMINFO=OFF + cmake --build build --target all -- -k 0 cmake --build build --target check-mlir cmake --build build --target install + # ---------- Build Windows ---------- - name: Build (Windows) if: runner.os == 'Windows' @@ -113,13 +125,16 @@ jobs: run: | $ErrorActionPreference = 'Stop' Write-Host "Using LLVM_PIN=$env:LLVM_PIN" + New-Item -ItemType Directory -Force -Path llvm-project | Out-Null Set-Location llvm-project git init git remote add origin https://github.com/llvm/llvm-project.git git fetch --depth 1 origin "$env:LLVM_PIN" git checkout --detach FETCH_HEAD + python -m pip install -r mlir/python/requirements.txt + cmake -S llvm -B build -G "Ninja" ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` @@ -130,14 +145,102 @@ jobs: -DMLIR_ENABLE_BINDINGS_PYTHON=ON ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` -DLLVM_ENABLE_TERMINFO=OFF + cmake --build build --target all cmake --build build --target check-mlir cmake --build build --target install - # ---------- Artifact ---------- - - name: Archive install (artifact) - if: always() + + # ---------- compute package naming ---------- + - name: Compute package name + id: pkgmeta + shell: bash + run: | + set -euo pipefail + os="${RUNNER_OS}" + arch="$(uname -m || true)" + case "$os" in + Linux) + if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then suffix="linux-aarch64"; else suffix="linux-x86_64"; fi + ;; + macOS) suffix="macos-arm64" ;; # macos-15 runners are Apple Silicon + Windows) suffix="windows-amd64" ;; + esac + echo "suffix=$suffix" >> "$GITHUB_OUTPUT" + echo "zip=taichi-llvm-21-$suffix.zip" >> "$GITHUB_OUTPUT" + + # ---------- package (Linux/macOS) ---------- + - name: Package (Linux/macOS) + if: runner.os != 'Windows' + env: + CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} + run: | + set -euo pipefail + pkgroot="${RUNNER_TEMP}/taichi-llvm-21-${{ steps.pkgmeta.outputs.suffix }}" + mkdir -p "$pkgroot" + # copy install tree + cp -R "${CMAKE_INSTALL_PREFIX}/." "$pkgroot/" + # bundle license + cp llvm-project/LICENSE.TXT "$pkgroot/LLVM-LICENSE.txt" || true + # optional strip to shrink size + if [ -x "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" ]; then + find "$pkgroot/bin" -type f -exec "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" --strip-unneeded {} + || true + find "$pkgroot/lib" -type f \( -name "*.so*" -o -name "*.dylib" -o -name "*.a" \) \ + -exec "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" --strip-unneeded {} + || true + fi + ( cd "${RUNNER_TEMP}" && zip -r "${GITHUB_WORKSPACE}/${{ steps.pkgmeta.outputs.zip }}" \ + "taichi-llvm-21-${{ steps.pkgmeta.outputs.suffix }}" ) + # sha256 + ( cd "${GITHUB_WORKSPACE}" && shasum -a 256 "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" || sha256sum "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" ) + + # ---------- package (Windows) ---------- + - name: Package (Windows) + if: runner.os == 'Windows' + shell: pwsh + env: + CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} + run: | + $zip = "${{ steps.pkgmeta.outputs.zip }}" + # Zip contents at root (strip=0 expectation) + Compress-Archive -Path "$env:CMAKE_INSTALL_PREFIX\*" -DestinationPath "$pwd\$zip" -Force + # SHA256 + CertUtil -hashfile "$pwd\$zip" SHA256 | Out-File -FilePath "$pwd\$zip.sha256" -Encoding ascii + + # ---------- Upload artifacts (for aggregator) ---------- + - name: Upload packaged asset uses: actions/upload-artifact@v4 with: - name: llvm-install-${{ matrix.os }} - path: ${{ steps.prefix.outputs.prefix }} - if-no-files-found: warn + name: ${{ steps.pkgmeta.outputs.zip }} + path: | + ${{ github.workspace }}/${{ steps.pkgmeta.outputs.zip }} + ${{ github.workspace }}/${{ steps.pkgmeta.outputs.zip }}.sha256 + if-no-files-found: error + + # ---------- publish a GitHub Release with all zips ---------- + release: + name: Publish release ${{ needs.build.outputs.LLVM_PIN }} + runs-on: ubuntu-22.04 + needs: build + permissions: + contents: write + env: + LLVM_PIN: ${{ github.event.inputs.llvm_pin || vars.LLVM_PIN || 'llvmorg-21.1.1' }} + steps: + - name: Download all assets + uses: actions/download-artifact@v4 + with: + path: dist + + - name: List assets + run: ls -R dist + + - name: Create/Update release (tag = LLVM_PIN) + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.LLVM_PIN }} + name: LLVM assets for ${{ env.LLVM_PIN }} + body: | + Prebuilt LLVM/Clang/LLD/MLIR install trees for Taichi consumption. + Tag: ${{ env.LLVM_PIN }} + files: | + dist/**/taichi-llvm-21-*.zip + dist/**/taichi-llvm-21-*.zip.sha256 From fe6253525cb315cf4baa360932399dd97b0b1968 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 14 Sep 2025 18:16:33 -0400 Subject: [PATCH 05/52] try running everything, without mlir, on 15.0.7 --- .github/workflows/llvm-ci.yml | 85 +++++++++---------- .../{ubuntu-arm.yml => vulkan-arm.yml} | 16 ++-- 2 files changed, 50 insertions(+), 51 deletions(-) rename .github/workflows/{ubuntu-arm.yml => vulkan-arm.yml} (94%) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index c2c8c94..651ce4e 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -3,13 +3,13 @@ name: Build LLVM (matrix) on: workflow_dispatch: inputs: - llvm_pin: + llvm_tag: description: "Commit SHA, tag (e.g. llvmorg-21.1.1), or ref for llvm/llvm-project" required: false - default: llvmorg-21.1.1 - push: - branches: [ main ] + default: llvmorg-15.0.7 pull_request: + paths: + - '.github/workflows/llvm-ci.yml' permissions: contents: read @@ -30,7 +30,7 @@ jobs: env: # manual input → repo/org var → default - LLVM_PIN: ${{ github.event.inputs.llvm_pin || vars.LLVM_PIN || 'llvmorg-21.1.1' }} + LLVM_TAG: ${{ github.event.inputs.llvm_tag || vars.LLVM_TAG || 'llvmorg-15.0.7' }} defaults: run: @@ -43,7 +43,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.10' # --- calm the git default-branch hint --- - name: Silence git default-branch hint @@ -90,13 +90,13 @@ jobs: CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} run: | set -euo pipefail - echo "Using LLVM_PIN=${LLVM_PIN}" + echo "Using LLVM_TAG=${LLVM_TAG}" mkdir -p llvm-project cd llvm-project git init git remote add origin https://github.com/llvm/llvm-project.git - git fetch --depth 1 origin "${LLVM_PIN}" + git fetch --depth 1 origin "${LLVM_TAG}" git checkout --detach FETCH_HEAD python3 -m pip install -r mlir/python/requirements.txt @@ -124,13 +124,13 @@ jobs: CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} run: | $ErrorActionPreference = 'Stop' - Write-Host "Using LLVM_PIN=$env:LLVM_PIN" + Write-Host "Using LLVM_TAG=$env:LLVM_TAG" New-Item -ItemType Directory -Force -Path llvm-project | Out-Null Set-Location llvm-project git init git remote add origin https://github.com/llvm/llvm-project.git - git fetch --depth 1 origin "$env:LLVM_PIN" + git fetch --depth 1 origin "$env:LLVM_TAG" git checkout --detach FETCH_HEAD python -m pip install -r mlir/python/requirements.txt @@ -139,15 +139,13 @@ jobs: -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` -DLLVM_ENABLE_ASSERTIONS=ON ` - -DLLVM_BUILD_UTILS=ON -DLLVM_BUILD_TOOLS=ON ` - -DLLVM_INSTALL_UTILS=ON ` - -DLLVM_ENABLE_PROJECTS="clang;lld;mlir" ` + -DLLVM_ENABLE_PROJECTS="clang" ` + -DLLVM_ENABLE_RTTI:BOOL=ON ` -DMLIR_ENABLE_BINDINGS_PYTHON=ON ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` -DLLVM_ENABLE_TERMINFO=OFF cmake --build build --target all - cmake --build build --target check-mlir cmake --build build --target install # ---------- compute package naming ---------- @@ -215,32 +213,33 @@ jobs: ${{ github.workspace }}/${{ steps.pkgmeta.outputs.zip }}.sha256 if-no-files-found: error - # ---------- publish a GitHub Release with all zips ---------- - release: - name: Publish release ${{ needs.build.outputs.LLVM_PIN }} - runs-on: ubuntu-22.04 - needs: build - permissions: - contents: write - env: - LLVM_PIN: ${{ github.event.inputs.llvm_pin || vars.LLVM_PIN || 'llvmorg-21.1.1' }} - steps: - - name: Download all assets - uses: actions/download-artifact@v4 - with: - path: dist - - - name: List assets - run: ls -R dist - - - name: Create/Update release (tag = LLVM_PIN) - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ env.LLVM_PIN }} - name: LLVM assets for ${{ env.LLVM_PIN }} - body: | - Prebuilt LLVM/Clang/LLD/MLIR install trees for Taichi consumption. - Tag: ${{ env.LLVM_PIN }} - files: | - dist/**/taichi-llvm-21-*.zip - dist/**/taichi-llvm-21-*.zip.sha256 + # might put this back later, but with more specific name, that is ok-ish on a PR + # # ---------- publish a GitHub Release with all zips ---------- + # release: + # name: Publish release ${{ needs.build.outputs.LLVM_TAG }} + # runs-on: ubuntu-22.04 + # needs: build + # permissions: + # contents: write + # env: + # LLVM_TAG: ${{ github.event.inputs.llvm_tag || vars.LLVM_TAG || 'llvmorg-21.1.1' }} + # steps: + # - name: Download all assets + # uses: actions/download-artifact@v4 + # with: + # path: dist + + # - name: List assets + # run: ls -R dist + + # - name: Create/Update release (tag = LLVM_TAG) + # uses: softprops/action-gh-release@v2 + # with: + # tag_name: ${{ env.LLVM_TAG }} + # name: LLVM assets for ${{ env.LLVM_TAG }} + # body: | + # Prebuilt LLVM/Clang/LLD/MLIR install trees for Taichi consumption. + # Tag: ${{ env.LLVM_TAG }} + # files: | + # dist/**/taichi-llvm-21-*.zip + # dist/**/taichi-llvm-21-*.zip.sha256 diff --git a/.github/workflows/ubuntu-arm.yml b/.github/workflows/vulkan-arm.yml similarity index 94% rename from .github/workflows/ubuntu-arm.yml rename to .github/workflows/vulkan-arm.yml index 11f3f2d..4df4087 100644 --- a/.github/workflows/ubuntu-arm.yml +++ b/.github/workflows/vulkan-arm.yml @@ -1,18 +1,18 @@ name: Build-Vulkan-SDK-ARM on: - push: - branches: - - main - pull_request: - branches: - - main + # disable for now + # pull_request: + # branches: + # - main + # paths: + # - '.github/workflows/vulkan-arm.yml' workflow_dispatch: inputs: version: - description: 'Vulkan SDK version (e.g., 1.4.304.1)' + description: 'Vulkan SDK version (e.g., 1.4.321.1)' required: false - default: '1.4.304.1' + default: '1.4.321.1' jobs: build-linux-arm: From 42bf326f4a05e47eaa2f90b4e0f966b5f3a55e98 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 14 Sep 2025 18:31:10 -0400 Subject: [PATCH 06/52] removing more mlir --- .github/workflows/llvm-ci.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 651ce4e..349b736 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -99,21 +99,16 @@ jobs: git fetch --depth 1 origin "${LLVM_TAG}" git checkout --detach FETCH_HEAD - python3 -m pip install -r mlir/python/requirements.txt - cmake -S llvm -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ -DLLVM_ENABLE_ASSERTIONS=ON \ - -DLLVM_BUILD_UTILS=ON -DLLVM_BUILD_TOOLS=ON \ - -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_ENABLE_PROJECTS="clang;lld;mlir" \ - -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ + -DLLVM_ENABLE_PROJECTS="clang" \ + -DLLVM_ENABLE_RTTI:BOOL=ON ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ -DLLVM_ENABLE_TERMINFO=OFF cmake --build build --target all -- -k 0 - cmake --build build --target check-mlir cmake --build build --target install # ---------- Build Windows ---------- @@ -133,15 +128,12 @@ jobs: git fetch --depth 1 origin "$env:LLVM_TAG" git checkout --detach FETCH_HEAD - python -m pip install -r mlir/python/requirements.txt - cmake -S llvm -B build -G "Ninja" ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` -DLLVM_ENABLE_ASSERTIONS=ON ` -DLLVM_ENABLE_PROJECTS="clang" ` -DLLVM_ENABLE_RTTI:BOOL=ON ` - -DMLIR_ENABLE_BINDINGS_PYTHON=ON ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` -DLLVM_ENABLE_TERMINFO=OFF From 49ef9e51a5a72345bc27897eadf8280b7a1b2f87 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 14 Sep 2025 18:34:19 -0400 Subject: [PATCH 07/52] syntax erro in yml --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 349b736..16601a6 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -104,7 +104,7 @@ jobs: -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_ENABLE_PROJECTS="clang" \ - -DLLVM_ENABLE_RTTI:BOOL=ON ` + -DLLVM_ENABLE_RTTI:BOOL=ON \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ -DLLVM_ENABLE_TERMINFO=OFF From 4a37cd7bb9f4a667a707a03bc5b11fb1d13ec8f6 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 14 Sep 2025 18:53:52 -0400 Subject: [PATCH 08/52] llvm_version; dont hardcode 21 --- .github/workflows/llvm-ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 16601a6..75bd73a 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -3,10 +3,10 @@ name: Build LLVM (matrix) on: workflow_dispatch: inputs: - llvm_tag: - description: "Commit SHA, tag (e.g. llvmorg-21.1.1), or ref for llvm/llvm-project" + llvm_version: + description: "e.g. 15.0.7, 21.1.1, etc" required: false - default: llvmorg-15.0.7 + default: 15.0.7 pull_request: paths: - '.github/workflows/llvm-ci.yml' @@ -30,7 +30,7 @@ jobs: env: # manual input → repo/org var → default - LLVM_TAG: ${{ github.event.inputs.llvm_tag || vars.LLVM_TAG || 'llvmorg-15.0.7' }} + LLVM_TAG: llvmorg-${{ github.event.inputs.llvm_version || vars.LLVM_TAG || '15.0.7' }} defaults: run: @@ -156,7 +156,7 @@ jobs: Windows) suffix="windows-amd64" ;; esac echo "suffix=$suffix" >> "$GITHUB_OUTPUT" - echo "zip=taichi-llvm-21-$suffix.zip" >> "$GITHUB_OUTPUT" + echo "zip=taichi-llvm-${{ github.event.inputs.llvm_version }}-$suffix.zip" >> "$GITHUB_OUTPUT" # ---------- package (Linux/macOS) ---------- - name: Package (Linux/macOS) @@ -165,7 +165,7 @@ jobs: CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} run: | set -euo pipefail - pkgroot="${RUNNER_TEMP}/taichi-llvm-21-${{ steps.pkgmeta.outputs.suffix }}" + pkgroot="${RUNNER_TEMP}/taichi-llvm-${{ github.event.inputs.llvm_version }}-${{ steps.pkgmeta.outputs.suffix }}" mkdir -p "$pkgroot" # copy install tree cp -R "${CMAKE_INSTALL_PREFIX}/." "$pkgroot/" @@ -178,7 +178,7 @@ jobs: -exec "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" --strip-unneeded {} + || true fi ( cd "${RUNNER_TEMP}" && zip -r "${GITHUB_WORKSPACE}/${{ steps.pkgmeta.outputs.zip }}" \ - "taichi-llvm-21-${{ steps.pkgmeta.outputs.suffix }}" ) + "taichi-llvm-${{ github.event.inputs.llvm_version }}-${{ steps.pkgmeta.outputs.suffix }}" ) # sha256 ( cd "${GITHUB_WORKSPACE}" && shasum -a 256 "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" || sha256sum "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" ) @@ -214,7 +214,7 @@ jobs: # permissions: # contents: write # env: - # LLVM_TAG: ${{ github.event.inputs.llvm_tag || vars.LLVM_TAG || 'llvmorg-21.1.1' }} + # LLVM_TAG: llvmorg-${{ github.event.inputs.llvm_version || vars.LLVM_TAG || '15.0.7' }} # steps: # - name: Download all assets # uses: actions/download-artifact@v4 @@ -233,5 +233,5 @@ jobs: # Prebuilt LLVM/Clang/LLD/MLIR install trees for Taichi consumption. # Tag: ${{ env.LLVM_TAG }} # files: | - # dist/**/taichi-llvm-21-*.zip - # dist/**/taichi-llvm-21-*.zip.sha256 + # dist/**/taichi-llvm-${{ github.event.inputs.llvm_version }}-*.zip + # dist/**/taichi-llvm-${{ github.event.inputs.llvm_version }}-*.zip.sha256 From a5448a244b086df41a9b058503165d87d90e45f4 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Mon, 15 Sep 2025 09:36:59 -0400 Subject: [PATCH 09/52] add bakc in release, with more granular naming --- .github/workflows/llvm-ci.yml | 100 ++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 35 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 75bd73a..76aab8e 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,13 +1,17 @@ name: Build LLVM (matrix) +env: + DEFAULT_LLVM_VERSION: '15.0.7' + on: workflow_dispatch: inputs: llvm_version: description: "e.g. 15.0.7, 21.1.1, etc" required: false - default: 15.0.7 pull_request: + branches: + - main paths: - '.github/workflows/llvm-ci.yml' @@ -28,15 +32,18 @@ jobs: matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - env: - # manual input → repo/org var → default - LLVM_TAG: llvmorg-${{ github.event.inputs.llvm_version || vars.LLVM_TAG || '15.0.7' }} - defaults: run: shell: bash steps: + - name: Set env vars + id: vars + run: | + LLVM_VERSION=${{ github.event.inputs.llvm_version || env.DEFAULT_LLVM_VERSION }} + echo "LLVM_VERSION=${LLVM_VERSION}" >> $GITHUB_ENV + echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV + - name: Checkout uses: actions/checkout@v4 @@ -205,33 +212,56 @@ jobs: ${{ github.workspace }}/${{ steps.pkgmeta.outputs.zip }}.sha256 if-no-files-found: error - # might put this back later, but with more specific name, that is ok-ish on a PR - # # ---------- publish a GitHub Release with all zips ---------- - # release: - # name: Publish release ${{ needs.build.outputs.LLVM_TAG }} - # runs-on: ubuntu-22.04 - # needs: build - # permissions: - # contents: write - # env: - # LLVM_TAG: llvmorg-${{ github.event.inputs.llvm_version || vars.LLVM_TAG || '15.0.7' }} - # steps: - # - name: Download all assets - # uses: actions/download-artifact@v4 - # with: - # path: dist - - # - name: List assets - # run: ls -R dist - - # - name: Create/Update release (tag = LLVM_TAG) - # uses: softprops/action-gh-release@v2 - # with: - # tag_name: ${{ env.LLVM_TAG }} - # name: LLVM assets for ${{ env.LLVM_TAG }} - # body: | - # Prebuilt LLVM/Clang/LLD/MLIR install trees for Taichi consumption. - # Tag: ${{ env.LLVM_TAG }} - # files: | - # dist/**/taichi-llvm-${{ github.event.inputs.llvm_version }}-*.zip - # dist/**/taichi-llvm-${{ github.event.inputs.llvm_version }}-*.zip.sha256 + # ---------- publish a GitHub Release with all zips ---------- + release: + name: Publish release ${{ needs.build.outputs.LLVM_TAG }} + runs-on: ubuntu-22.04 + needs: build + permissions: + contents: write + steps: + - name: Set env vars + id: vars + run: | + LLVM_VERSION=${{ github.event.inputs.llvm_version || env.DEFAULT_LLVM_VERSION }} + echo "LLVM_VERSION=${LLVM_VERSION}" >> $GITHUB_ENV + echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV + - name: Download all assets + uses: actions/download-artifact@v4 + with: + path: dist + + - name: List assets + run: ls -R dist + + - name: Set tag name + id: set_tag + run: | + # Get current date/time in UTC, format YYYYMMDDHHMM + DATE=$(date -u +'%Y%m%d%H%M') + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "tag=llvm-${LLVM_VERSION}-${DATE}" >> $GITHUB_OUTPUT + else + PR_BRANCH="${{ github.head_ref }}" + PR_BRANCH_CLEAN=$(echo "$PR_BRANCH" | tr '/' '-' | tr -cd '[:alnum:]-') + echo "tag=llvm-${LLVM_VERSION}-${PR_BRANCH_CLEAN}-${DATE}" >> $GITHUB_OUTPUT + fi + - name: Set prerelease flag + id: set_prerelease + run: | + if [[ "${{ github.ref_name }}" == "main" ]]; then + echo "is_prerelease=false" >> $GITHUB_OUTPUT + else + echo "is_prerelease=true" >> $GITHUB_OUTPUT + fi + + - name: Create/Update release (tag = LLVM_TAG) + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.set_tag.outputs.tag }} + name: ${{ steps.set_tag.outputs.tag }} + prerelease: ${{ steps.set_prerelease.outputs.is_prerelease }} + body: | + Prebuilt LLVM/Clang install trees for GsTaichi consumption. + files: | + dist/** From a4079570a51c01885bafaca7f022b183a0aaac07 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Mon, 15 Sep 2025 11:40:00 -0400 Subject: [PATCH 10/52] try building with 21.1.1 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 76aab8e..f46a3ff 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '15.0.7' + DEFAULT_LLVM_VERSION: '21.1.1' on: workflow_dispatch: From 4729d035ac70fb1b5e560cbdbc5e7431091da175 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Mon, 15 Sep 2025 14:30:52 -0400 Subject: [PATCH 11/52] missed some version expansiosn --- .github/workflows/llvm-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index f46a3ff..e86ca24 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '21.1.1' + DEFAULT_LLVM_VERSION: '15.0.7' on: workflow_dispatch: @@ -163,7 +163,7 @@ jobs: Windows) suffix="windows-amd64" ;; esac echo "suffix=$suffix" >> "$GITHUB_OUTPUT" - echo "zip=taichi-llvm-${{ github.event.inputs.llvm_version }}-$suffix.zip" >> "$GITHUB_OUTPUT" + echo "zip=taichi-llvm-${LLVM_VERSION}-$suffix.zip" >> "$GITHUB_OUTPUT" # ---------- package (Linux/macOS) ---------- - name: Package (Linux/macOS) @@ -172,7 +172,7 @@ jobs: CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }} run: | set -euo pipefail - pkgroot="${RUNNER_TEMP}/taichi-llvm-${{ github.event.inputs.llvm_version }}-${{ steps.pkgmeta.outputs.suffix }}" + pkgroot="${RUNNER_TEMP}/taichi-llvm-${LLVM_VERSION}-${{ steps.pkgmeta.outputs.suffix }}" mkdir -p "$pkgroot" # copy install tree cp -R "${CMAKE_INSTALL_PREFIX}/." "$pkgroot/" @@ -185,7 +185,7 @@ jobs: -exec "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" --strip-unneeded {} + || true fi ( cd "${RUNNER_TEMP}" && zip -r "${GITHUB_WORKSPACE}/${{ steps.pkgmeta.outputs.zip }}" \ - "taichi-llvm-${{ github.event.inputs.llvm_version }}-${{ steps.pkgmeta.outputs.suffix }}" ) + "taichi-llvm-${LLVM_VERSION}-${{ steps.pkgmeta.outputs.suffix }}" ) # sha256 ( cd "${GITHUB_WORKSPACE}" && shasum -a 256 "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" || sha256sum "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" ) From 949ffad41012f6361f96ce3ede9f6f240235bf88 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Mon, 15 Sep 2025 14:36:11 -0400 Subject: [PATCH 12/52] remove version in brackets --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index e86ca24..d19ee22 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -214,7 +214,7 @@ jobs: # ---------- publish a GitHub Release with all zips ---------- release: - name: Publish release ${{ needs.build.outputs.LLVM_TAG }} + name: Publish release runs-on: ubuntu-22.04 needs: build permissions: From 6c13205fb3a1ee4a2ecdc41dbbdf46f34fae4020 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Mon, 15 Sep 2025 16:30:01 -0400 Subject: [PATCH 13/52] run for 21.1.1 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index d19ee22..da0431b 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '15.0.7' + DEFAULT_LLVM_VERSION: '21.1.1' on: workflow_dispatch: From 7f0fdfee932bd8c98c15d46aa964ead20c640187 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Tue, 16 Sep 2025 07:18:15 -0400 Subject: [PATCH 14/52] 15.0.7, disable zstd (unaailable on manylinux) --- .github/workflows/llvm-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index da0431b..4faabcf 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '21.1.1' + DEFAULT_LLVM_VERSION: '15.0.7' on: workflow_dispatch: @@ -112,6 +112,7 @@ jobs: -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_ENABLE_PROJECTS="clang" \ -DLLVM_ENABLE_RTTI:BOOL=ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ -DLLVM_ENABLE_TERMINFO=OFF @@ -141,6 +142,7 @@ jobs: -DLLVM_ENABLE_ASSERTIONS=ON ` -DLLVM_ENABLE_PROJECTS="clang" ` -DLLVM_ENABLE_RTTI:BOOL=ON ` + -DLLVM_ENABLE_ZSTD=OFF ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` -DLLVM_ENABLE_TERMINFO=OFF From 8b9342328030821b8babafebdee5d347bae56cc0 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Tue, 16 Sep 2025 20:45:20 -0400 Subject: [PATCH 15/52] add lld --- .github/workflows/llvm-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 2a3785b..da7ffbf 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -106,7 +106,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ -DLLVM_ENABLE_ASSERTIONS=ON \ - -DLLVM_ENABLE_PROJECTS="clang" \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DLLVM_ENABLE_RTTI:BOOL=ON \ -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ @@ -136,7 +136,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` -DLLVM_ENABLE_ASSERTIONS=ON ` - -DLLVM_ENABLE_PROJECTS="clang" ` + -DLLVM_ENABLE_PROJECTS="clang;lld" ` -DLLVM_ENABLE_RTTI:BOOL=ON ` -DLLVM_ENABLE_ZSTD=OFF ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` From 6c610a0766d5be03df54a5c8a919813efe7e31b0 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Wed, 17 Sep 2025 10:22:01 -0400 Subject: [PATCH 16/52] try running in ubuntu 18.04 container --- .github/workflows/llvm-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index da7ffbf..0ab6ff0 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,6 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] + container: ${{ startsWith(matrix.os, 'ubuntu-') && 'ubuntu:18.04' || '' }} defaults: run: From 0e61b0baf84a17bd323ef1fbb2d30fe0970722cc Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Wed, 17 Sep 2025 10:30:01 -0400 Subject: [PATCH 17/52] u20 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 0ab6ff0..d26dd56 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ startsWith(matrix.os, 'ubuntu-') && 'ubuntu:18.04' || '' }} + container: ${{ startsWith(matrix.os, 'ubuntu-') && 'ubuntu:20.04' || '' }} defaults: run: From d0b7004ec7827768cb6d1b0af95aaa97198e91cc Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Wed, 17 Sep 2025 10:49:08 -0400 Subject: [PATCH 18/52] manylinux --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index d26dd56..5b7dd81 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ startsWith(matrix.os, 'ubuntu-') && 'ubuntu:20.04' || '' }} + container: ${{ startsWith(matrix.os, 'ubuntu-') && 'quay.io/pypa/manylinux_2_27_x86_64:latest' || '' }} defaults: run: From 8688277bb2181d5ec279c8af4c28f35a04b03efa Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Wed, 17 Sep 2025 10:49:28 -0400 Subject: [PATCH 19/52] manylinux 2 28 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 5b7dd81..13b9f8c 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ startsWith(matrix.os, 'ubuntu-') && 'quay.io/pypa/manylinux_2_27_x86_64:latest' || '' }} + container: ${{ startsWith(matrix.os, 'ubuntu-') && 'quay.io/pypa/manylinux_2_28_x86_64:latest' || '' }} defaults: run: From 4adf16904b2ead45f233d1d20b6b81aa9c4c7c12 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Wed, 17 Sep 2025 10:51:20 -0400 Subject: [PATCH 20/52] remove sudo --- .github/workflows/llvm-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 13b9f8c..ae834b6 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -57,8 +57,8 @@ jobs: - name: Install prerequisites (Linux) if: runner.os == 'Linux' run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends git cmake ninja-build build-essential zip + apt-get update + apt-get install -y --no-install-recommends git cmake ninja-build build-essential zip python -m pip install --upgrade pip - name: Install prerequisites (macOS) From 3e522621b63986f87390d1dfc209e9bb8510d3bc Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Wed, 17 Sep 2025 10:56:26 -0400 Subject: [PATCH 21/52] github rnner 20.04 image --- .github/workflows/llvm-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index ae834b6..f179270 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ startsWith(matrix.os, 'ubuntu-') && 'quay.io/pypa/manylinux_2_28_x86_64:latest' || '' }} + container: ${{ startsWith(matrix.os, 'ubuntu-') && 'tcardonne/github-runner:ubuntu-20.04' || '' }} defaults: run: @@ -57,8 +57,8 @@ jobs: - name: Install prerequisites (Linux) if: runner.os == 'Linux' run: | - apt-get update - apt-get install -y --no-install-recommends git cmake ninja-build build-essential zip + sudo apt-get update + sudo apt-get install -y --no-install-recommends git cmake ninja-build build-essential zip python -m pip install --upgrade pip - name: Install prerequisites (macOS) From 29a7ab08d33ea93ffd314e9a9f6b6274d6282d2b Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Wed, 17 Sep 2025 11:35:08 -0400 Subject: [PATCH 22/52] container only for ubuntu x86 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index f179270..c49b25d 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ startsWith(matrix.os, 'ubuntu-') && 'tcardonne/github-runner:ubuntu-20.04' || '' }} + container: ${{ matrix.os == 'ubuntu-22.04' && 'tcardonne/github-runner:ubuntu-20.04' || '' }} defaults: run: From 8eafdf7b9c63e5cc396a2f977178375efaaa9c94 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Fri, 19 Sep 2025 19:33:21 -0400 Subject: [PATCH 23/52] retry manylinux for u22 x86 --- .github/workflows/llvm-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index c49b25d..a15f8a6 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ matrix.os == 'ubuntu-22.04' && 'tcardonne/github-runner:ubuntu-20.04' || '' }} + container: ${{ matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux_2_28_x86_64:latest' || '' }} defaults: run: @@ -57,8 +57,8 @@ jobs: - name: Install prerequisites (Linux) if: runner.os == 'Linux' run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends git cmake ninja-build build-essential zip + # sudo apt-get update + yum install -y git cmake ninja-build gcc gcc-c++ make zip python -m pip install --upgrade pip - name: Install prerequisites (macOS) From 08da9687de1a2d2b03217b6c837210652f43ab9d Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Fri, 19 Sep 2025 19:42:45 -0400 Subject: [PATCH 24/52] dont install gcc or python --- .github/workflows/llvm-ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index a15f8a6..6333506 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -44,10 +44,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' + # - name: Set up Python + # uses: actions/setup-python@v5 + # with: + # python-version: '3.10' # --- calm the git default-branch hint --- - name: Silence git default-branch hint @@ -57,9 +57,10 @@ jobs: - name: Install prerequisites (Linux) if: runner.os == 'Linux' run: | - # sudo apt-get update - yum install -y git cmake ninja-build gcc gcc-c++ make zip - python -m pip install --upgrade pip + yum install -y git cmake ninja-build + # # sudo apt-get update + # yum install -y git cmake ninja-build gcc gcc-c++ make zip + # # python -m pip install --upgrade pip - name: Install prerequisites (macOS) if: runner.os == 'macOS' From f93e6bd8ab75204435de22ce8c12aeaf0da86906 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Fri, 19 Sep 2025 19:45:12 -0400 Subject: [PATCH 25/52] dont install ninja on mac --- .github/workflows/llvm-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 6333506..fd7e792 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -62,12 +62,12 @@ jobs: # yum install -y git cmake ninja-build gcc gcc-c++ make zip # # python -m pip install --upgrade pip - - name: Install prerequisites (macOS) - if: runner.os == 'macOS' - run: | - brew update - brew install cmake ninja || true - python3 -m pip install --upgrade pip + # - name: Install prerequisites (macOS) + # if: runner.os == 'macOS' + # run: | + # brew update + # brew install cmake ninja || true + # python3 -m pip install --upgrade pip - name: Install prerequisites (Windows) if: runner.os == 'Windows' From 4d5b25ec60604df7239933f90ba6f7ece01b8a21 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 07:31:10 -0400 Subject: [PATCH 26/52] build x86 linux in manylinux2014 --- .github/workflows/llvm-ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index fd7e792..ad5182f 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,8 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux_2_28_x86_64:latest' || '' }} - + container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux2014_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux_2_28_aarch64:latest') || '' }} defaults: run: shell: bash @@ -54,16 +53,16 @@ jobs: run: git config --global init.defaultBranch main # ---------- Prereqs ---------- - - name: Install prerequisites (Linux) - if: runner.os == 'Linux' - run: | - yum install -y git cmake ninja-build + # - name: Install prerequisites (Linux) + # if: runner.os == 'Linux' + # run: | + # yum install -y git cmake ninja-build # # sudo apt-get update # yum install -y git cmake ninja-build gcc gcc-c++ make zip # # python -m pip install --upgrade pip # - name: Install prerequisites (macOS) - # if: runner.os == 'macOS' + # if: runner.os == 'macOS' # run: | # brew update # brew install cmake ninja || true From 79ea028efca3613d6a77696c14fd0e0cee87b6a6 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 07:35:39 -0400 Subject: [PATCH 27/52] downgrade actions to be comaible mnaylinux2014 --- .github/workflows/llvm-ci.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index ad5182f..1ad104f 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -41,33 +41,12 @@ jobs: echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@v4 - - # - name: Set up Python - # uses: actions/setup-python@v5 - # with: - # python-version: '3.10' + uses: actions/checkout@v3 # --- calm the git default-branch hint --- - name: Silence git default-branch hint run: git config --global init.defaultBranch main - # ---------- Prereqs ---------- - # - name: Install prerequisites (Linux) - # if: runner.os == 'Linux' - # run: | - # yum install -y git cmake ninja-build - # # sudo apt-get update - # yum install -y git cmake ninja-build gcc gcc-c++ make zip - # # python -m pip install --upgrade pip - - # - name: Install prerequisites (macOS) - # if: runner.os == 'macOS' - # run: | - # brew update - # brew install cmake ninja || true - # python3 -m pip install --upgrade pip - - name: Install prerequisites (Windows) if: runner.os == 'Windows' shell: pwsh @@ -203,7 +182,7 @@ jobs: # ---------- Upload artifacts (for aggregator) ---------- - name: Upload packaged asset - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: ${{ steps.pkgmeta.outputs.zip }} path: | From ed618b921dd3ed9296f8f6ee4bc348ea7743f2b8 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 07:48:48 -0400 Subject: [PATCH 28/52] ninja from python --- .github/workflows/llvm-ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 1ad104f..d22d367 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -41,12 +41,27 @@ jobs: echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # --- calm the git default-branch hint --- - name: Silence git default-branch hint run: git config --global init.defaultBranch main + # ---------- Prereqs ---------- + - name: Install prerequisites (Linux) + if: runner.os == 'Linux' + run: | + export PATH=/opt/python/cp310-cp310/bin:$PATH + pip install ninja + ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build + + # - name: Install prerequisites (macOS) + # if: runner.os == 'macOS' + # run: | + # brew update + # brew install cmake ninja || true + # python3 -m pip install --upgrade pip + - name: Install prerequisites (Windows) if: runner.os == 'Windows' shell: pwsh @@ -182,7 +197,7 @@ jobs: # ---------- Upload artifacts (for aggregator) ---------- - name: Upload packaged asset - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.pkgmeta.outputs.zip }} path: | From a674e92fdc0558a89dc9da9f7f546f7f0c2d8643 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 07:49:58 -0400 Subject: [PATCH 29/52] 2 28 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index d22d367..ee21e88 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux2014_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux_2_28_aarch64:latest') || '' }} + container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux_2_28_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux_2_28_aarch64:latest') || '' }} defaults: run: shell: bash From 5482edafd3e3116a1c6b370e1d709759a9b432eb Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 08:00:15 -0400 Subject: [PATCH 30/52] disable xml2, zlib --- .github/workflows/llvm-ci.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index ee21e88..03f7f86 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -55,13 +55,6 @@ jobs: pip install ninja ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build - # - name: Install prerequisites (macOS) - # if: runner.os == 'macOS' - # run: | - # brew update - # brew install cmake ninja || true - # python3 -m pip install --upgrade pip - - name: Install prerequisites (Windows) if: runner.os == 'Windows' shell: pwsh @@ -100,9 +93,9 @@ jobs: cmake -S llvm -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ - -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ - -DLLVM_ENABLE_RTTI:BOOL=ON \ + -DLLVM_ENABLE_LIBXML2=OFF \ + -DLLVM_ENABLE_ZLIB=OFF \ -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ -DLLVM_ENABLE_TERMINFO=OFF @@ -130,9 +123,9 @@ jobs: cmake -S llvm -B build -G "Ninja" ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` - -DLLVM_ENABLE_ASSERTIONS=ON ` -DLLVM_ENABLE_PROJECTS="clang;lld" ` - -DLLVM_ENABLE_RTTI:BOOL=ON ` + -DLLVM_ENABLE_LIBXML2=OFF ` + -DLLVM_ENABLE_ZLIB=OFF ` -DLLVM_ENABLE_ZSTD=OFF ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` -DLLVM_ENABLE_TERMINFO=OFF From bf77dc6217e3a31f2697ca62c32b78daed23acd5 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 09:13:17 -0400 Subject: [PATCH 31/52] install zip on linux; migrate windows build to msvc; change windows threading model --- .github/workflows/llvm-ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 03f7f86..22e737c 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -51,6 +51,7 @@ jobs: - name: Install prerequisites (Linux) if: runner.os == 'Linux' run: | + yum install -y zip export PATH=/opt/python/cp310-cp310/bin:$PATH pip install ninja ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build @@ -62,6 +63,8 @@ jobs: python -m pip install --upgrade pip python -m pip install ninja cmake git config --global core.autocrlf false + Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_BuildTools.exe" -OutFile "vs.exe" + .\vs.exe --passive --wait --norestart --includeRecommended --add Microsoft.VisualStudio.Workload.VCTools # ---------- Compute install prefix ---------- - name: Compute install prefix @@ -113,6 +116,13 @@ jobs: $ErrorActionPreference = 'Stop' Write-Host "Using LLVM_TAG=$env:LLVM_TAG" + $vsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat" + cmd /c "`"$vsPath`" && set" | ForEach-Object { + if ($_ -match '^([^=]+)=(.*)') { + [Environment]::SetEnvironmentVariable($matches[1], $matches[2]) + } + } + New-Item -ItemType Directory -Force -Path llvm-project | Out-Null Set-Location llvm-project git init @@ -120,7 +130,7 @@ jobs: git fetch --depth 1 origin "$env:LLVM_TAG" git checkout --detach FETCH_HEAD - cmake -S llvm -B build -G "Ninja" ` + cmake -S llvm -B build -G "Visual Studio 17 2022" -A x64 ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` -DLLVM_ENABLE_PROJECTS="clang;lld" ` @@ -128,7 +138,8 @@ jobs: -DLLVM_ENABLE_ZLIB=OFF ` -DLLVM_ENABLE_ZSTD=OFF ` -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ` - -DLLVM_ENABLE_TERMINFO=OFF + -DLLVM_ENABLE_TERMINFO=OFF ` + -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" cmake --build build --target all cmake --build build --target install From f975b927db7b263a82db41a91f52db143f311abf Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 11:53:53 -0400 Subject: [PATCH 32/52] remove clang and lld from windows build --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 22e737c..e113e24 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -133,7 +133,7 @@ jobs: cmake -S llvm -B build -G "Visual Studio 17 2022" -A x64 ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` - -DLLVM_ENABLE_PROJECTS="clang;lld" ` + -DLLVM_ENABLE_PROJECTS="" ` -DLLVM_ENABLE_LIBXML2=OFF ` -DLLVM_ENABLE_ZLIB=OFF ` -DLLVM_ENABLE_ZSTD=OFF ` From 1d7044c978f055d2ca2df4ed617f6d8e37b1cbbf Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 12:51:35 -0400 Subject: [PATCH 33/52] put back rtti --- .github/workflows/llvm-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index e113e24..eb9c487 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -97,6 +97,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ + -DLLVM_ENABLE_RTTI:BOOL=ON \ -DLLVM_ENABLE_LIBXML2=OFF \ -DLLVM_ENABLE_ZLIB=OFF \ -DLLVM_ENABLE_ZSTD=OFF \ @@ -134,6 +135,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` -DLLVM_ENABLE_PROJECTS="" ` + -DLLVM_ENABLE_RTTI:BOOL=ON ` -DLLVM_ENABLE_LIBXML2=OFF ` -DLLVM_ENABLE_ZLIB=OFF ` -DLLVM_ENABLE_ZSTD=OFF ` From add69ddc99deaf466eea5f28e80bae8527e55136 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 15:26:27 -0400 Subject: [PATCH 34/52] update windows build command to ahve release etc --- .github/workflows/llvm-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index eb9c487..2bc62ea 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -143,8 +143,8 @@ jobs: -DLLVM_ENABLE_TERMINFO=OFF ` -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" - cmake --build build --target all - cmake --build build --target install + cmake --build build --config Release --target ALL_BUILD + cmake --build build --config Release --target INSTALL # ---------- compute package naming ---------- - name: Compute package name From c2a8568bc70fa6c8249cfe35e30353baaf618ab2 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 20 Sep 2025 15:29:54 -0400 Subject: [PATCH 35/52] add clang back to windows build --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 2bc62ea..7a0d5c5 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -134,7 +134,7 @@ jobs: cmake -S llvm -B build -G "Visual Studio 17 2022" -A x64 ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_INSTALL_PREFIX="$env:CMAKE_INSTALL_PREFIX" ` - -DLLVM_ENABLE_PROJECTS="" ` + -DLLVM_ENABLE_PROJECTS="clang;lld" ` -DLLVM_ENABLE_RTTI:BOOL=ON ` -DLLVM_ENABLE_LIBXML2=OFF ` -DLLVM_ENABLE_ZLIB=OFF ` From c0923784b9637e2d7bb32bf48113c23e01c8274c Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 10:47:45 -0400 Subject: [PATCH 36/52] build llvm inside manylinux2014, otherwise linker errors later --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 7a0d5c5..ff3d70e 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux_2_28_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux_2_28_aarch64:latest') || '' }} + container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux2014_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux2014_aarch64:latest') || '' }} defaults: run: shell: bash From c6974c33898042bfe19815174c93dfdeb8962424 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 10:58:43 -0400 Subject: [PATCH 37/52] manylinux 2014 --- .github/workflows/llvm-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index ff3d70e..b80edba 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux2014_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux2014_aarch64:latest') || '' }} + container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux2014_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux2014_aarch64:latest') || '' }} defaults: run: shell: bash @@ -40,8 +40,8 @@ jobs: echo "LLVM_VERSION=${LLVM_VERSION}" >> $GITHUB_ENV echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV - - name: Checkout - uses: actions/checkout@v4 + # - name: Checkout + # uses: actions/checkout@v4 # --- calm the git default-branch hint --- - name: Silence git default-branch hint @@ -203,7 +203,7 @@ jobs: # ---------- Upload artifacts (for aggregator) ---------- - name: Upload packaged asset - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: ${{ steps.pkgmeta.outputs.zip }} path: | @@ -226,7 +226,7 @@ jobs: echo "LLVM_VERSION=${LLVM_VERSION}" >> $GITHUB_ENV echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV - name: Download all assets - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: path: dist From be13c7ab0eeefe56950e7bbfa3f54dec0e40b8b1 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:04:08 -0400 Subject: [PATCH 38/52] install node 20 --- .github/workflows/llvm-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index b80edba..084083e 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -56,6 +56,11 @@ jobs: pip install ninja ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build + # Install Node.js 20 for upload-artifact@v4 + curl -fsSL https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz | tar -xJ -C /opt/ + ln -sf /opt/node-v20.11.1-linux-x64/bin/node /usr/bin/node + ln -sf /opt/node-v20.11.1-linux-x64/bin/npm /usr/bin/npm + - name: Install prerequisites (Windows) if: runner.os == 'Windows' shell: pwsh @@ -203,7 +208,7 @@ jobs: # ---------- Upload artifacts (for aggregator) ---------- - name: Upload packaged asset - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.pkgmeta.outputs.zip }} path: | @@ -226,7 +231,7 @@ jobs: echo "LLVM_VERSION=${LLVM_VERSION}" >> $GITHUB_ENV echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV - name: Download all assets - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: dist From bdb20e3821ef324bd7f34bb8f972e5b2a8850668 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:06:34 -0400 Subject: [PATCH 39/52] put back checkout to check the nod20 worked --- .github/workflows/llvm-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 084083e..a874f52 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -40,8 +40,8 @@ jobs: echo "LLVM_VERSION=${LLVM_VERSION}" >> $GITHUB_ENV echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV - # - name: Checkout - # uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 # --- calm the git default-branch hint --- - name: Silence git default-branch hint From c28f9afba2fc929baecb0dba36b34fc130187a74 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:08:14 -0400 Subject: [PATCH 40/52] move checkout --- .github/workflows/llvm-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index a874f52..41f7ec6 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -40,9 +40,6 @@ jobs: echo "LLVM_VERSION=${LLVM_VERSION}" >> $GITHUB_ENV echo "LLVM_TAG=llvmorg-${LLVM_VERSION}" >> $GITHUB_ENV - - name: Checkout - uses: actions/checkout@v4 - # --- calm the git default-branch hint --- - name: Silence git default-branch hint run: git config --global init.defaultBranch main @@ -71,6 +68,10 @@ jobs: Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_BuildTools.exe" -OutFile "vs.exe" .\vs.exe --passive --wait --norestart --includeRecommended --add Microsoft.VisualStudio.Workload.VCTools + # ---------- Checkout ---------- + - name: Checkout + uses: actions/checkout@v4 + # ---------- Compute install prefix ---------- - name: Compute install prefix id: prefix From 51e2bc77e3478b98cb8a379fb9ae40504f5d60fb Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:09:56 -0400 Subject: [PATCH 41/52] try removing blank line --- .github/workflows/llvm-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 41f7ec6..f4b6800 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -52,7 +52,6 @@ jobs: export PATH=/opt/python/cp310-cp310/bin:$PATH pip install ninja ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build - # Install Node.js 20 for upload-artifact@v4 curl -fsSL https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz | tar -xJ -C /opt/ ln -sf /opt/node-v20.11.1-linux-x64/bin/node /usr/bin/node From fe5e1aa6a799b8db5827e6766f731ef58e749270 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:11:28 -0400 Subject: [PATCH 42/52] remove comment --- .github/workflows/llvm-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index f4b6800..e29b4e1 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -52,7 +52,6 @@ jobs: export PATH=/opt/python/cp310-cp310/bin:$PATH pip install ninja ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build - # Install Node.js 20 for upload-artifact@v4 curl -fsSL https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz | tar -xJ -C /opt/ ln -sf /opt/node-v20.11.1-linux-x64/bin/node /usr/bin/node ln -sf /opt/node-v20.11.1-linux-x64/bin/npm /usr/bin/npm From c4e966b42e38f6f6db46ce175ce7674e616a4ab1 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:18:13 -0400 Subject: [PATCH 43/52] insecure node --- .github/workflows/llvm-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index e29b4e1..7898240 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -31,6 +31,10 @@ jobs: defaults: run: shell: bash + env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 + ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 steps: - name: Set env vars @@ -52,9 +56,13 @@ jobs: export PATH=/opt/python/cp310-cp310/bin:$PATH pip install ninja ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build - curl -fsSL https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz | tar -xJ -C /opt/ - ln -sf /opt/node-v20.11.1-linux-x64/bin/node /usr/bin/node - ln -sf /opt/node-v20.11.1-linux-x64/bin/npm /usr/bin/npm + # Install Node.js 16 which is more compatible with manylinux2014 + curl -fsSL https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz | tar -xJ -C /opt/ + ln -sf /opt/node-v16.20.2-linux-x64/bin/node /usr/bin/node + ln -sf /opt/node-v16.20.2-linux-x64/bin/npm /usr/bin/npm + # Verify it works + node --version + npm --version - name: Install prerequisites (Windows) if: runner.os == 'Windows' From 750e8208c622c68aedfd93622348f8f1e3f2e0c0 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:19:30 -0400 Subject: [PATCH 44/52] checkout v3 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 7898240..6fc4074 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -76,7 +76,7 @@ jobs: # ---------- Checkout ---------- - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 # ---------- Compute install prefix ---------- - name: Compute install prefix From e7bb023738ca2c7e8ac38ecba250ace717dbe763 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 11:21:16 -0400 Subject: [PATCH 45/52] upload v3 --- .github/workflows/llvm-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 6fc4074..b761ed1 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -64,6 +64,14 @@ jobs: node --version npm --version + - name: Upload packaged asset + uses: actions/upload-artifact@v3 + with: + name: foo + path: | + bar + if-no-files-found: error + - name: Install prerequisites (Windows) if: runner.os == 'Windows' shell: pwsh @@ -74,9 +82,9 @@ jobs: Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_BuildTools.exe" -OutFile "vs.exe" .\vs.exe --passive --wait --norestart --includeRecommended --add Microsoft.VisualStudio.Workload.VCTools - # ---------- Checkout ---------- - - name: Checkout - uses: actions/checkout@v3 + # # ---------- Checkout ---------- + # - name: Checkout + # uses: actions/checkout@v3 # ---------- Compute install prefix ---------- - name: Compute install prefix From 2df582eefaa71e01638a4805d206ea4e8b4b9259 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 12:12:09 -0400 Subject: [PATCH 46/52] staically link libstdc++ --- .github/workflows/llvm-ci.yml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index b761ed1..4269d8d 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -27,14 +27,10 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] - container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux2014_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux2014_aarch64:latest') || '' }} + container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux_2_28_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux_2_28_aarch64:latest') || '' }} defaults: run: shell: bash - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 - ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 steps: - name: Set env vars @@ -56,21 +52,6 @@ jobs: export PATH=/opt/python/cp310-cp310/bin:$PATH pip install ninja ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja-build - # Install Node.js 16 which is more compatible with manylinux2014 - curl -fsSL https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz | tar -xJ -C /opt/ - ln -sf /opt/node-v16.20.2-linux-x64/bin/node /usr/bin/node - ln -sf /opt/node-v16.20.2-linux-x64/bin/npm /usr/bin/npm - # Verify it works - node --version - npm --version - - - name: Upload packaged asset - uses: actions/upload-artifact@v3 - with: - name: foo - path: | - bar - if-no-files-found: error - name: Install prerequisites (Windows) if: runner.os == 'Windows' @@ -82,10 +63,6 @@ jobs: Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_BuildTools.exe" -OutFile "vs.exe" .\vs.exe --passive --wait --norestart --includeRecommended --add Microsoft.VisualStudio.Workload.VCTools - # # ---------- Checkout ---------- - # - name: Checkout - # uses: actions/checkout@v3 - # ---------- Compute install prefix ---------- - name: Compute install prefix id: prefix @@ -120,6 +97,8 @@ jobs: -DLLVM_ENABLE_RTTI:BOOL=ON \ -DLLVM_ENABLE_LIBXML2=OFF \ -DLLVM_ENABLE_ZLIB=OFF \ + -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \ + -DCMAKE_SHARED_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \ -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ -DLLVM_ENABLE_TERMINFO=OFF From 4cc21a4fec58ecc933db24574097d04f23f8bd56 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 14:31:15 -0400 Subject: [PATCH 47/52] remove static linking --- .github/workflows/llvm-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 4269d8d..bbe8061 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -97,8 +97,6 @@ jobs: -DLLVM_ENABLE_RTTI:BOOL=ON \ -DLLVM_ENABLE_LIBXML2=OFF \ -DLLVM_ENABLE_ZLIB=OFF \ - -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \ - -DCMAKE_SHARED_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \ -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ -DLLVM_ENABLE_TERMINFO=OFF From 4f41ccc9fe5fdbd482ec7e032ee2730b94ebf01e Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 14:40:42 -0400 Subject: [PATCH 48/52] build 16.0.6 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index bbe8061..f5cf5e1 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '15.0.7' + DEFAULT_LLVM_VERSION: '16.0.6' on: workflow_dispatch: From 0ce02c27a3a7e2f463a58ba6852752bce5b5b5ef Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 18:04:56 -0400 Subject: [PATCH 49/52] build 17.0.6 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index f5cf5e1..14560d6 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '16.0.6' + DEFAULT_LLVM_VERSION: '17.0.6' on: workflow_dispatch: From 563c8123e6f664cb6444f77d7f9c4904cf50a345 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 18:08:25 -0400 Subject: [PATCH 50/52] build 18.1.8 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index 14560d6..d15e103 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '17.0.6' + DEFAULT_LLVM_VERSION: '18.1.8' on: workflow_dispatch: From 3f85a806b685685896d1ed8e6710e0f028cf84f1 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 19:08:10 -0400 Subject: [PATCH 51/52] remove arm build; retry 17.0.6 --- .github/workflows/llvm-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index d15e103..b8cceb4 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,13 +1,13 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '18.1.8' + DEFAULT_LLVM_VERSION: '17.0.6' on: workflow_dispatch: inputs: llvm_version: - description: "e.g. 15.0.7, 21.1.1, etc" + description: "e.g. 15.0.7, 17.0.6, 18.1.8, 21.1.1, etc" required: false pull_request: branches: @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-22.04-arm, macos-15, windows-2025] + os: [ubuntu-22.04, macos-15, windows-2025] container: ${{ (matrix.os == 'ubuntu-22.04' && 'quay.io/pypa/manylinux_2_28_x86_64:latest') || (matrix.os == 'ubuntu-22.04-arm' && 'quay.io/pypa/manylinux_2_28_aarch64:latest') || '' }} defaults: run: From 70330223a2d75f166013019ea361183175c5754e Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 21 Sep 2025 19:09:25 -0400 Subject: [PATCH 52/52] build 18.1.8 --- .github/workflows/llvm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm-ci.yml b/.github/workflows/llvm-ci.yml index b8cceb4..0bc34f3 100644 --- a/.github/workflows/llvm-ci.yml +++ b/.github/workflows/llvm-ci.yml @@ -1,7 +1,7 @@ name: Build LLVM (matrix) env: - DEFAULT_LLVM_VERSION: '17.0.6' + DEFAULT_LLVM_VERSION: '18.1.8' on: workflow_dispatch: