Skip to content

Commit

Permalink
Add scheduled CI for StableHLO builds against LLVM@HEAD (#1562)
Browse files Browse the repository at this point in the history
Felt inspired after seeing a presentation on JAX CI in
[openxla/openxla-pjrt-plugin](https://github.com/openxla/openxla-pjrt-plugin)
(like
[run_jaxtests_cpu.yml](https://github.com/openxla/openxla-pjrt-plugin/blob/main/.github/workflows/run_jaxtests_cpu.yml)),
decided to add some frequent (every 6hr) builds against the latest LLVM
revision to detect compatibility / other issues as soon as possible.

This is built on top of existing CI. The name of the buildAndTestCmake
job now includes what StableHLO is being built against. Examples from my
fork:
- [cmake-build
(llvm-project@HEAD)](https://github.com/GleasonK/stablehlo/actions/runs/5136120754/jobs/9242454311)
- [cmake-build
(llvm_version.txt)](https://github.com/GleasonK/stablehlo/actions/runs/5136234330/jobs/9242713655)

_Note: This only builds scheduled CI against HEAD, meaning it should
have no impact on CI for pull requests._

Other things to consider:
- If LLVM build fails (not StableHLO build) should we exit with success,
indicating a likely upstream breakage?
- How should these be monitored? Is subscribing to email notification
enough?

Closes #1489
  • Loading branch information
GleasonK authored Jun 21, 2023
1 parent d79d1ef commit d8f0c12
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/buildAndTestCMake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on:
push:
branches: [ main ]
schedule:
# Run once a day
- cron: '0 12 * * *'
# Run once every 6hr building against llvm-project@HEAD
- cron: '0 */6 * * *'
workflow_dispatch:

# Ensure that only a single job or workflow using the same
Expand All @@ -34,6 +34,7 @@ concurrency:

jobs:
cmake-build:
name: "cmake-build ${{ github.event_name == 'schedule' && '(llvm-project@HEAD)' || ''}}"
env:
LLVM_PROJECT_DIR: "llvm-project"
LLVM_BUILD_DIR: "llvm-build"
Expand All @@ -51,7 +52,12 @@ jobs:
id: llvm-version
shell: bash
run: |
echo "version=$(cat ${{ github.workspace }}/build_tools/llvm_version.txt)" >> $GITHUB_OUTPUT
USE_LLVM_HEAD=${{ github.event_name == 'schedule' }}
if [[ $USE_LLVM_HEAD = true ]]; then
echo "version=main" >> $GITHUB_OUTPUT
else
echo "version=$(cat ${{ github.workspace }}/build_tools/llvm_version.txt)" >> $GITHUB_OUTPUT
fi;
- name: Setup workspace
uses: ./.github/actions/setup-build
Expand Down

0 comments on commit d8f0c12

Please sign in to comment.