Skip to content

End to end CI for pad pipeline (#156) #17

End to end CI for pad pipeline (#156)

End to end CI for pad pipeline (#156) #17

Workflow file for this run

name: CI
on:
workflow_call:
pull_request:
push:
branches:
- main
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit).
group: ci-build-test-cpp-linux-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
build_test_linux:
name: Build and Test (Linux, ASSERTIONS)
runs-on: nod-ai-shared-cpubuilder-manylinux-x86_64
strategy:
fail-fast: true
env:
CACHE_DIR: ${{ github.workspace }}/.container-cache
steps:
- name: Configure local git mirrors
run: |
/gitmirror/scripts/trigger_update_mirrors.sh
/gitmirror/scripts/git_config.sh
- name: "Checking out repository"
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
submodules: recursive
- name: Sync source deps
run: |
python ./sync_deps.py
- name: Enable cache
uses: actions/cache/restore@v3
with:
path: ${{ env.CACHE_DIR }}
key: linux-build-test-cpp-asserts-manylinux-v2-${{ github.sha }}
restore-keys: |
linux-build-test-cpp-
- name: Build packages
run: |
export cache_dir="${{ env.CACHE_DIR }}"
bash build_tools/ci/build_test_cpp.sh
- name: Create artifacts
if: ${{ !cancelled() }}
run: |
# TODO: https://github.com/openxla/iree/issues/16230
# We should not be packaging clang and llvm-link in the default dist
# installs.
rm -f iree-install/bin/clang*
rm -f iree-install/bin/llvm-link*
tar cf iree-dist.tar -C iree-install .
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: linux_x86_64_release_packages
path: |
iree-dist.tar
if-no-files-found: warn
- name: Save cache
uses: actions/cache/save@v3
if: ${{ !cancelled() }}
with:
path: ${{ env.CACHE_DIR }}
key: linux-build-test-cpp-asserts-manylinux-v2-${{ github.sha }}
test_linux:
runs-on: amd7940hs
needs: build_test_linux
strategy:
fail-fast: true
steps:
- name: "Checking out repository" # for test scripts
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
submodules: false
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: linux_x86_64_release_packages
- name: Extract artifact
run: |
mkdir iree-install
tar -xf iree-dist.tar -C iree-install
- name: Pad matmul test
run: |
bash build_tools/ci/pad_test.sh test1 iree-install