Skip to content
Open
Show file tree
Hide file tree
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
16 changes: 15 additions & 1 deletion .github/workflows/build_llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
description: 'Run the build with a tmate session ONLY in case of failure'
required: false
default: false
llvm_commit:
description: 'llvm commit to build'
type: string
required: false
default: ''
pull_request:
paths:
- ".github/actions/setup_base"
Expand Down Expand Up @@ -133,12 +138,21 @@ jobs:
run: |

export LLVM_SOURCE_DIR="$PWD/third_party/llvm-project"

if [ x"${{ inputs.llvm_commit }}" != x"" ]; then
pushd $LLVM_SOURCE_DIR
git fetch --unshallow
git reset --hard "${{ inputs.llvm_commit }}"
popd
fi

export LLVM_BUILD_DIR="$PWD/llvm-build"
# double nested so that upload artifacts uploads a folder
export LLVM_INSTALL_DIR="$PWD/llvm-install/llvm-install"

ccache -z
$python3_command -m pip install -r third_party/llvm-project/mlir/python/requirements.txt

$python3_command -m pip install PyYAML nanobind pybind11 numpy

if [[ "${{ matrix.arch }}" == "wasm32-wasi" ]]; then
scripts/build_llvm_wasi.sh
Expand Down
12 changes: 11 additions & 1 deletion scripts/clean_gh_releases.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import re
import time

from github import Github
Expand All @@ -19,21 +20,30 @@
# -H "X-GitHub-Api-Version: 2022-11-28" \
# /repos/llvm/eudsl/releases

skip = [
# last commit before typed-pointers in MLIR is removed
"35ca64989"
]

skip_re = re.compile("|".join(skip))

n_deleted = 0
for rel in [
# llvm
253845177,
# eudsl
253847293,
# mlir-python-bindings
253847610
253847610,
]:
for _ in range(100):
n_deleted = 0
repo = g.get_repo("llvm/eudsl")
release = repo.get_release(rel)
assets = release.get_assets()
for ass in assets:
if skip_re.search(ass.name):
continue
if ass.created_at.date() < thirty_days_ago:
print(ass.name)
assert ass.delete_asset()
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/llvm_cache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ set(LLVM_MlirDevelopment_DISTRIBUTION_COMPONENTS
mlir-libraries
mlir-linalg-ods-yaml-gen
mlir-opt
mlir-python-sources
# mlir-python-sources
mlir-reduce
mlir-tblgen
mlir-translate
Expand Down
Loading