-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split source checks into a seperate workflow
The "Build - Ubuntu" job has a stage that checks the source generated from the spec matches the version stored in the repo. This is the part of the job that takes the longest, and is ran multiple times. Since it doesn't require a build, it has been brought out into its own workflow which is only ran once. This should hopefully speed up builds.
- Loading branch information
1 parent
675dd29
commit 002fd32
Showing
4 changed files
with
69 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Source Checks | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
# To kill the job | ||
actions: write | ||
|
||
jobs: | ||
source-checks: | ||
name: Source Checks | ||
# TODO: Make this run on Windows (#888) | ||
runs-on: 'ubuntu-22.04' | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Install apt packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y doxygen | ||
- name: Setup PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Install pip packages | ||
run: pip install -r third_party/requirements.txt | ||
|
||
# Required for CMake | ||
- name: Install libhwloc | ||
run: .github/scripts/install_hwloc.sh | ||
|
||
- name: Configure CMake | ||
run: > | ||
cmake | ||
-B${{github.workspace}}/build | ||
-DUR_ENABLE_TRACING=OFF | ||
-DCMAKE_BUILD_TYPE=Debug | ||
-DUR_BUILD_TESTS=OFF | ||
-DUR_FORMAT_CPP_STYLE=ON | ||
- name: Verify that each source file contains a license | ||
run: cmake --build ${{github.workspace}}/build --target verify-licenses | ||
|
||
- name: Verify source is clang-formatted | ||
run: cmake --build ${{github.workspace}}/build --target check-clang-format | ||
|
||
- name: Generate source from spec, check for uncommitted diff | ||
run: cmake --build ${{github.workspace}}/build --target check-generated | ||
|
||
- name: Kill job on failure | ||
run: gh run cancel ${{ github.run_id }} | ||
if: ${{ failure() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters