fix CI (hopefully)
Some checks failed
Validate Operations / validate-operations (push) Failing after 1h2m33s
Some checks failed
Validate Operations / validate-operations (push) Failing after 1h2m33s
This commit is contained in:
54
.github/actions/prepare-mlir-cache/action.yml
vendored
Normal file
54
.github/actions/prepare-mlir-cache/action.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Prepare MLIR Cache
|
||||
description: Restore or build the cached MLIR toolchain.
|
||||
|
||||
inputs:
|
||||
llvm-commit:
|
||||
description: LLVM commit to build.
|
||||
required: true
|
||||
mold-linker-flags:
|
||||
description: Linker flags used to force mold.
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Restore MLIR cache
|
||||
id: restore-mlir-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: onnx-mlir/llvm-project
|
||||
key: mlir-${{ runner.os }}-${{ inputs.llvm-commit }}
|
||||
|
||||
- name: Clone LLVM
|
||||
if: steps.restore-mlir-cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
git clone --filter=blob:none --no-checkout https://github.com/llvm/llvm-project.git onnx-mlir/llvm-project
|
||||
cd onnx-mlir/llvm-project
|
||||
git fetch --depth 1 origin ${{ inputs.llvm-commit }}
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
- name: Build MLIR
|
||||
if: steps.restore-mlir-cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -S onnx-mlir/llvm-project/llvm -B onnx-mlir/llvm-project/build -G Ninja \
|
||||
-DLLVM_ENABLE_PROJECTS="mlir;clang" \
|
||||
-DLLVM_ENABLE_RUNTIMES="openmp" \
|
||||
-DLLVM_TARGETS_TO_BUILD="host" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=ON \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DENABLE_LIBOMPTARGET=OFF \
|
||||
-DLLVM_ENABLE_LIBEDIT=OFF \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${{ inputs.mold-linker-flags }}" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="${{ inputs.mold-linker-flags }}" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="${{ inputs.mold-linker-flags }}"
|
||||
cmake --build onnx-mlir/llvm-project/build
|
||||
|
||||
- name: Save MLIR cache
|
||||
if: steps.restore-mlir-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: onnx-mlir/llvm-project
|
||||
key: mlir-${{ runner.os }}-${{ inputs.llvm-commit }}
|
||||
45
.github/actions/prepare-protobuf-cache/action.yml
vendored
Normal file
45
.github/actions/prepare-protobuf-cache/action.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Prepare Protobuf Cache
|
||||
description: Restore or build the cached protobuf installation.
|
||||
|
||||
inputs:
|
||||
protobuf-commit:
|
||||
description: Protobuf tag or commit to build.
|
||||
required: true
|
||||
mold-linker-flags:
|
||||
description: Linker flags used to force mold.
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Restore protobuf cache
|
||||
id: restore-protobuf-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
/usr/local/lib/libproto*
|
||||
/usr/local/include/google/protobuf
|
||||
key: protobuf-${{ runner.os }}-${{ inputs.protobuf-commit }}
|
||||
|
||||
- name: Install protobuf
|
||||
if: steps.restore-protobuf-cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
git clone --depth 1 --branch ${{ inputs.protobuf-commit }} https://github.com/protocolbuffers/protobuf
|
||||
cmake -S protobuf -B protobuf/build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${{ inputs.mold-linker-flags }}" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="${{ inputs.mold-linker-flags }}" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="${{ inputs.mold-linker-flags }}"
|
||||
cmake --build protobuf/build
|
||||
sudo cmake --install protobuf/build
|
||||
rm -rf protobuf
|
||||
|
||||
- name: Save protobuf cache
|
||||
if: steps.restore-protobuf-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
/usr/local/lib/libproto*
|
||||
/usr/local/include/google/protobuf
|
||||
key: protobuf-${{ runner.os }}-${{ inputs.protobuf-commit }}
|
||||
26
.github/actions/restore-raptor-build-cache/action.yml
vendored
Normal file
26
.github/actions/restore-raptor-build-cache/action.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Restore Raptor Build Cache
|
||||
description: Restore the cached raptor build directory for incremental builds.
|
||||
|
||||
inputs:
|
||||
key:
|
||||
description: Exact cache key to restore.
|
||||
required: true
|
||||
restore-keys:
|
||||
description: Prefixes used to restore the most recent compatible cache.
|
||||
required: false
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: Whether the exact cache key was restored.
|
||||
value: ${{ steps.restore-raptor-build-cache.outputs.cache-hit }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Restore raptor build cache
|
||||
id: restore-raptor-build-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: build
|
||||
key: ${{ inputs.key }}
|
||||
restore-keys: ${{ inputs.restore-keys }}
|
||||
16
.github/actions/save-raptor-build-cache/action.yml
vendored
Normal file
16
.github/actions/save-raptor-build-cache/action.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Save Raptor Build Cache
|
||||
description: Save the raptor build directory after a successful incremental build.
|
||||
|
||||
inputs:
|
||||
key:
|
||||
description: Cache key used to save the build directory.
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Save raptor build cache
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: build
|
||||
key: ${{ inputs.key }}
|
||||
Reference in New Issue
Block a user