-
Notifications
You must be signed in to change notification settings - Fork 115
71 lines (56 loc) · 2.1 KB
/
source-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Source Checks
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
source-checks:
name: Source Checks
strategy:
matrix:
os: ['ubuntu-22.04', 'windows-2022']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.9
- name: Install pip packages
run: pip install -r third_party/requirements.txt
- name: "[Lin] Install doxygen"
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y doxygen
- name: "[Win] Install doxygen"
if: matrix.os == 'windows-2022'
run: |
$WorkingDir = $PWD.Path
Invoke-WebRequest -Uri https://github.com/doxygen/doxygen/releases/download/Release_1_9_8/doxygen-1.9.8.windows.x64.bin.zip -OutFile "$WorkingDir\doxygen.zip"
Expand-Archive -Path "$WorkingDir\doxygen.zip"
Add-Content $env:GITHUB_PATH "$WorkingDir\doxygen"
- name: "[Lin] Install hwloc"
if: matrix.os == 'ubuntu-22.04'
run: .github/scripts/install_hwloc.sh
- name: "[Win] Install hwloc"
if: matrix.os == 'windows-2022'
run: vcpkg install hwloc:x64-windows
- name: Configure CMake
env:
VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows"
run: >
cmake
-B${{github.workspace}}/build
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
-DUR_ENABLE_TRACING=OFF
-DCMAKE_BUILD_TYPE=Debug
-DUR_BUILD_TESTS=OFF
-DUR_FORMAT_CPP_STYLE=ON
# Verifying license should be enough on a single OS
- name: Verify that each source file contains a license
if: matrix.os == 'ubuntu-22.04'
run: cmake --build ${{github.workspace}}/build --target verify-licenses
- name: Generate source from spec, check for uncommitted diff
run: cmake --build ${{github.workspace}}/build --target check-generated