mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
On Ubuntu, use the system's package manager, `apt`, to download and install the cross-compilers for Arm and AArch64. This replaces downloading the compilers as tarballs. To ensure that the correct version of the compiler is used when calling one without the version suffix, e.g. `aarch64-linux-gnu-gcc`, use `update-alternatives`. On Linux, the compilers for `x86_64`, `arm`, and `aarch64` will now correctly use the filesystem root as their sysroots, i.e. `/usr/include` will be used when searching for headers, instead of each compiler providing its own.
83 lines
2.9 KiB
YAML
83 lines
2.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-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@v4
|
|
- name: Setup Ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@master
|
|
- name: Install Arm and AArch64 compilers
|
|
if: ${{ matrix.arch == 'arm' || matrix.arch == 'aarch64' }}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
gcc-12-arm-linux-gnueabihf g++-12-arm-linux-gnueabihf \
|
|
gcc-12-aarch64-linux-gnu g++-12-aarch64-linux-gnu
|
|
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-12 12
|
|
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-12 12
|
|
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-12 12
|
|
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-12 12
|
|
- 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: Install Vulkan SDK
|
|
uses: humbletim/install-vulkan-sdk@main
|
|
with:
|
|
version: 1.3.275.0
|
|
cache: true
|
|
- 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-14
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Check code format
|
|
run: ./check-format.sh
|