mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
The "Ninja" CMake generator does not support multiple configurations, i.e. it does not support use of the '--config' option when running 'cmake --build'. As such, the default configuration (i.e. Debug) was getting used for all builds. Use the CMAKE_BUILD_TYPE variable instead, so that we do release builds, but change one build (ubuntu-20.04 aarch64) to use Debug as its build type, to keep some build coverage for asserts, etc. For Vulkan-Loader and OpenCL-ICD-Loader, we do release builds unconditionally, as we assume there is no need in the CI workflow to actually run the binaries that are built, and therefore no need for any additional debug info. Signed-off-by: Stuart Brady <stuart.brady@arm.com>
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
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-20.04, macos-latest, windows-latest]
|
|
include:
|
|
- os: ubuntu-20.04
|
|
mainmatrix: true
|
|
gl: 1
|
|
extra: " gl"
|
|
- os: ubuntu-20.04
|
|
mainmatrix: false
|
|
arch: arm
|
|
- os: ubuntu-20.04
|
|
mainmatrix: false
|
|
arch: aarch64
|
|
debug: 1
|
|
extra: " debug"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- 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/ccache-action@v1.2
|
|
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-20.04
|
|
steps:
|
|
- name: Install packages
|
|
run: sudo apt install -y clang-format clang-format-9
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Check code format
|
|
run: ./check-format.sh
|