forked from KhronosGroup/OpenCL-CTS
-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (65 loc) · 1.89 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
name: Presubmit
on: [push, pull_request]
jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.arch }}${{ matrix.extra }}
runs-on: ${{ matrix.os }}
env:
JOB_ARCHITECTURE: ${{ matrix.arch }}
JOB_ENABLE_GL: ${{ matrix.gl }}
JOB_ENABLE_DEBUG: ${{ matrix.debug }}
strategy:
fail-fast: false
matrix:
mainmatrix: [true]
os: [ubuntu-22.04, macos-latest, windows-latest]
include:
- os: ubuntu-22.04
mainmatrix: true
gl: 1
extra: " gl"
- os: ubuntu-22.04
mainmatrix: false
arch: arm
- os: ubuntu-22.04
mainmatrix: false
arch: aarch64
debug: 1
extra: " debug"
steps:
- uses: actions/checkout@v3
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup OpenGL build dependencies
if: ${{ matrix.gl }}
run: |
sudo apt-get update
sudo apt-get -y install libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev
- name: Setup MSVC with Ninja
uses: ilammy/msvc-dev-cmd@v1
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
variant: sccache
key: ${{ matrix.os }}-${{ matrix.arch }}
- name: Fetch OpenCL Headers
shell: bash
run: |
git clone https://github.com/KhronosGroup/OpenCL-Headers.git
cd OpenCL-Headers
ln -s CL OpenCL # For OSX builds
cd ..
- name: Build
shell: bash
run: ./presubmit.sh
formatcheck:
name: Check code format
runs-on: ubuntu-22.04
steps:
- name: Install packages
run: sudo apt install -y clang-format clang-format-11
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check code format
run: ./check-format.sh