Skip to content

Commit eb8edbe

Browse files
authored
Merge pull request #2158 from RossBrunton/ross/checks
Split source checks into a seperate workflow
2 parents 7f1332e + f301b12 commit eb8edbe

File tree

2 files changed

+52
-18
lines changed

2 files changed

+52
-18
lines changed

.github/workflows/cmake.yml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Install apt packages
5050
run: |
5151
sudo apt-get update
52-
sudo apt-get install -y doxygen ${{matrix.compiler.c}}
52+
sudo apt-get install -y ${{matrix.compiler.c}}
5353
5454
- name: Install libhwloc
5555
run: .github/scripts/install_hwloc.sh
@@ -62,9 +62,6 @@ jobs:
6262
run: |
6363
sudo apt-get install -y ${{matrix.compiler.cxx}}
6464
65-
- name: Install pip packages
66-
run: pip install -r third_party/requirements.txt
67-
6865
- name: Install libbacktrace
6966
if: matrix.libbacktrace == '-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON'
7067
run: |
@@ -93,7 +90,7 @@ jobs:
9390
-DUR_ENABLE_TRACING=ON
9491
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
9592
-DUR_BUILD_TESTS=ON
96-
-DUR_FORMAT_CPP_STYLE=ON
93+
-DUR_FORMAT_CPP_STYLE=OFF
9794
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
9895
${{matrix.libbacktrace}}
9996
${{matrix.pool_tracking}}
@@ -109,18 +106,11 @@ jobs:
109106
-DUR_ENABLE_TRACING=ON
110107
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
111108
-DUR_BUILD_TESTS=ON
112-
-DUR_FORMAT_CPP_STYLE=ON
109+
-DUR_FORMAT_CPP_STYLE=OFF
113110
${{matrix.libbacktrace}}
114111
${{matrix.pool_tracking}}
115112
${{matrix.latency_tracking}}
116113
117-
- name: Generate source from spec, check for uncommitted diff
118-
if: matrix.os == 'ubuntu-22.04'
119-
run: cmake --build ${{github.workspace}}/build --target check-generated
120-
121-
- name: Verify that each source file contains a license
122-
run: cmake --build ${{github.workspace}}/build --target verify-licenses
123-
124114
- name: Build
125115
run: cmake --build ${{github.workspace}}/build -j $(nproc)
126116

@@ -285,11 +275,6 @@ jobs:
285275
-DUR_FORMAT_CPP_STYLE=ON
286276
${{matrix.adapter.var}}
287277
288-
# TODO: re-enable when check-generated is fixed for windows runners see #888
289-
# - name: Generate source from spec, check for uncommitted diff
290-
# if: matrix.os == 'windows-2022'
291-
# run: cmake --build ${{github.workspace}}/build --target check-generated --config ${{matrix.build_type}}
292-
293278
- name: Build all
294279
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
295280

.github/workflows/source-checks.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Source Checks
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
source-checks:
14+
name: Source Checks
15+
# TODO: Make this run on Windows (#888)
16+
runs-on: 'ubuntu-22.04'
17+
18+
steps:
19+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20+
21+
- name: Install apt packages
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y doxygen
25+
26+
- name: Setup PATH
27+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
28+
29+
- name: Install pip packages
30+
run: pip install -r third_party/requirements.txt
31+
32+
# Required for CMake
33+
- name: Install libhwloc
34+
run: .github/scripts/install_hwloc.sh
35+
36+
- name: Configure CMake
37+
run: >
38+
cmake
39+
-B${{github.workspace}}/build
40+
-DUR_ENABLE_TRACING=OFF
41+
-DCMAKE_BUILD_TYPE=Debug
42+
-DUR_BUILD_TESTS=OFF
43+
-DUR_FORMAT_CPP_STYLE=ON
44+
45+
- name: Verify that each source file contains a license
46+
run: cmake --build ${{github.workspace}}/build --target verify-licenses
47+
48+
- name: Generate source from spec, check for uncommitted diff
49+
run: cmake --build ${{github.workspace}}/build --target check-generated

0 commit comments

Comments
 (0)