From 9f225f8f6c6d864f01adaf7c79555325ed96952b Mon Sep 17 00:00:00 2001 From: Bili Dong Date: Sun, 6 Oct 2024 11:38:35 -0700 Subject: [PATCH] Set up GitHub action to build MLIR --- .github/workflows/build-and-test.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..c4956a3 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,37 @@ +name: build-and-test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +# Cancel any preceding run on the pull request. +concurrency: + group: p4mlir-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + build: + runs-on: ubuntu-20.04 + env: + IMAGE_TYPE: test + steps: + + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Enable ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ matrix.os }} + + - name: Install requirements + run: | + build_tools/ubuntu_install_mlir_requirements.sh + + - name: Build MLIR + run: | + build_tools/build_mlir.sh