fix CI
set protobuf specific commit in requirements
This commit is contained in:
39
.github/workflows/validate_operations.yml
vendored
39
.github/workflows/validate_operations.yml
vendored
@@ -2,6 +2,7 @@ name: Validate Operations
|
||||
|
||||
env:
|
||||
LLVM_COMMIT: 0c2701fe7fa002e1befc5f86c268a7964f96d286
|
||||
PROTOBUF_COMMIT: v34.0
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -20,7 +21,30 @@ jobs:
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y cmake ninja-build build-essential protobuf-compiler
|
||||
sudo apt install -y cmake ninja-build build-essential
|
||||
|
||||
- name: Cache protobuf build
|
||||
id: cache-protobuf
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /usr/local
|
||||
key: protobuf-${{ runner.os }}-${{ env.PROTOBUF_COMMIT }}
|
||||
|
||||
- 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: Register installed libraries
|
||||
run: sudo ldconfig
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
@@ -33,11 +57,6 @@ jobs:
|
||||
- name: Install Python dependencies
|
||||
run: pip install numpy onnx colorama
|
||||
|
||||
- name: Clone LLVM
|
||||
run: |
|
||||
git clone -n https://github.com/llvm/llvm-project.git onnx-mlir/llvm-project
|
||||
cd onnx-mlir/llvm-project && git checkout ${{ env.LLVM_COMMIT }}
|
||||
|
||||
- name: Cache MLIR build
|
||||
id: cache-mlir
|
||||
uses: actions/cache@v4
|
||||
@@ -45,6 +64,14 @@ jobs:
|
||||
path: onnx-mlir/llvm-project/build
|
||||
key: mlir-${{ runner.os }}-${{ env.LLVM_COMMIT }}
|
||||
|
||||
- name: Clone LLVM
|
||||
if: steps.cache-mlir.outputs.cache-hit != 'true'
|
||||
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 ${{ env.LLVM_COMMIT }}
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
- name: Build MLIR
|
||||
if: steps.cache-mlir.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user