-
Notifications
You must be signed in to change notification settings - Fork 259
123 lines (115 loc) · 3.9 KB
/
presubmit.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Presubmit
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Install Ubuntu packages
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y dos2unix
- name: Install macOS packages
if: matrix.os == 'macos-latest'
run: brew install dos2unix
- name: Build
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=install ..
cmake --build . --target install
- name: Build spec tools
run: |
cd tools/buildHeaders
mkdir build
cd build
cmake ..
cmake --build . --target install
- name: Build headers
run: |
cd tools/buildHeaders
./bin/makeHeaders
- name: Check generated headers
run: git diff --exit-code
test_cmake_min_required:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.14.0
- name: CMake build
run: |
cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Debug -G "Ninja" -D CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/build/install/
cmake --build build --target install
test_cmake_latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: CMake build
run: |
cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Debug -G "Ninja"
cmake --install build/ --prefix build/install
add_subdirectory:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
- name: Build spirv-headers with testing enabled
run: |
cmake -S . -B build/ -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug -G "Ninja"
cmake --build build
find_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
- name: Install spirv-headers
run: |
cmake -S . -B build/
cmake --install build/ --prefix build/install
- name: Check spirv-headers find_package support
run: |
cmake -S tests/find_package -B tests/find_package/build/ -D CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/build/install
cmake --build tests/find_package/build/
find_pkg_config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
- name: Install spirv-headers
run: |
cmake -S . -B build/ -D CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/build/install/
cmake --install build/
- name: Check spirv-headers pkg_config support
run: |
cmake -S tests/pkg_config -B tests/pkg_config/build/ -D CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/build/install
cmake --build tests/pkg_config/build/
# https://github.com/KhronosGroup/SPIRV-Headers/issues/282
find_pkg_config_absolute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
- name: Install spirv-headers with CMAKE_INSTALL_INCLUDEDIR being absolute
run: |
cmake -S . -B build/ -D CMAKE_INSTALL_INCLUDEDIR=${GITHUB_WORKSPACE}/build/install/include -D CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/build/install/
cmake --install build/
- name: Check spirv-headers pkg_config support
run: |
cmake -S tests/pkg_config -B tests/pkg_config/build/ -D CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/build/install
cmake --build tests/pkg_config/build/