fix CI (hopefully)
Some checks failed
Validate Operations / validate-operations (push) Failing after 1h2m33s

This commit is contained in:
NiccoloN
2026-03-23 19:27:53 +01:00
parent 661170a9aa
commit a1b29dffe0
6 changed files with 173 additions and 96 deletions

View File

@@ -4,29 +4,14 @@ env:
LLVM_COMMIT: 0c2701fe7fa002e1befc5f86c268a7964f96d286
PROTOBUF_COMMIT: v34.0
CMAKE_VERSION: 4.3.0
MOLD_LINKER_FLAGS: -fuse-ld=mold
on:
push:
pull_request:
jobs:
# Expose env vars as outputs so they can be passed to reusable workflows
config:
runs-on: ubuntu-latest
outputs:
llvm-commit: ${{ steps.set-vars.outputs.llvm-commit }}
steps:
- id: set-vars
run: echo "llvm-commit=$LLVM_COMMIT" >> "$GITHUB_OUTPUT"
build-mlir-cache:
needs: config
uses: ./.github/workflows/build_mlir_cache.yml
with:
llvm-commit: ${{ needs.config.outputs.llvm-commit }}
validate:
needs: build-mlir-cache
validate-operations:
runs-on: ubuntu-latest
steps:
@@ -39,7 +24,7 @@ jobs:
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y ninja-build build-essential curl ca-certificates
sudo apt install -y cmake ninja-build build-essential mold curl ca-certificates
- name: Install CMake
run: |
@@ -58,27 +43,17 @@ jobs:
cmake --version
which cmake
- name: Cache protobuf build
id: cache-protobuf
uses: actions/cache@v4
- name: Prepare MLIR cache
uses: ./.github/actions/prepare-mlir-cache
with:
path: |
/usr/local/lib/libproto*
/usr/local/include/google/protobuf
key: protobuf-${{ runner.os }}-${{ env.PROTOBUF_COMMIT }}
llvm-commit: ${{ env.LLVM_COMMIT }}
mold-linker-flags: ${{ env.MOLD_LINKER_FLAGS }}
- name: Install protobuf
if: steps.cache-protobuf.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch ${{ env.PROTOBUF_COMMIT }} https://github.com/protocolbuffers/protobuf
cd protobuf
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja
sudo ninja install
cd ../..
rm -rf protobuf
- name: Prepare protobuf cache
uses: ./.github/actions/prepare-protobuf-cache
with:
protobuf-commit: ${{ env.PROTOBUF_COMMIT }}
mold-linker-flags: ${{ env.MOLD_LINKER_FLAGS }}
- name: Register installed libraries
run: sudo ldconfig
@@ -94,23 +69,34 @@ jobs:
- name: Install Python dependencies
run: pip install numpy onnx colorama
- name: Restore MLIR cache
uses: actions/cache/restore@v4
- name: Restore raptor build cache
id: restore-raptor-build-cache
uses: ./.github/actions/restore-raptor-build-cache
with:
path: onnx-mlir/llvm-project
key: mlir-${{ runner.os }}-${{ env.LLVM_COMMIT }}
fail-on-cache-miss: true
key: raptor-build-${{ runner.os }}-${{ github.ref_name }}-${{ env.LLVM_COMMIT }}-${{ env.PROTOBUF_COMMIT }}-${{ env.CMAKE_VERSION }}-${{ github.sha }}
restore-keys: |
raptor-build-${{ runner.os }}-${{ github.ref_name }}-${{ env.LLVM_COMMIT }}-${{ env.PROTOBUF_COMMIT }}-${{ env.CMAKE_VERSION }}-
raptor-build-${{ runner.os }}-${{ env.LLVM_COMMIT }}-${{ env.PROTOBUF_COMMIT }}-${{ env.CMAKE_VERSION }}-
- name: Build Raptor
id: build-raptor
run: |
MLIR_DIR=$(pwd)/onnx-mlir/llvm-project/build/lib/cmake/mlir
mkdir -p build && cd build
cmake .. -G Ninja \
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DONNX_MLIR_ACCELERATORS=PIM \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DMLIR_DIR=${MLIR_DIR}
cmake --build .
-DMLIR_DIR=${MLIR_DIR} \
-DCMAKE_EXE_LINKER_FLAGS="${MOLD_LINKER_FLAGS}" \
-DCMAKE_SHARED_LINKER_FLAGS="${MOLD_LINKER_FLAGS}" \
-DCMAKE_MODULE_LINKER_FLAGS="${MOLD_LINKER_FLAGS}"
cmake --build build
- name: Save raptor build cache
if: steps.build-raptor.outcome == 'success' && steps.restore-raptor-build-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/save-raptor-build-cache
with:
key: raptor-build-${{ runner.os }}-${{ github.ref_name }}-${{ env.LLVM_COMMIT }}-${{ env.PROTOBUF_COMMIT }}-${{ env.CMAKE_VERSION }}-${{ github.sha }}
- name: Run validation
run: |