Replace Travis CI with Github Actions (#1047)

* Replace Travis CI with Github Actions

Signed-off-by: Kevin Petit <kevin.petit@arm.com>

* Fix OpenGL coverage

* Tidy up

- Fix shell warning
- Remove ENABLE_OPENCL30_PROVISIONAL ICD CMake option
This commit is contained in:
Kévin Petit
2020-11-06 11:23:50 +00:00
committed by GitHub
parent 0e67969989
commit 46fead41f4
3 changed files with 43 additions and 25 deletions

40
.github/workflows/presubmit.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Presubmit
on: [push, pull_request]
jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
JOB_CHECK_FORMAT: ${{ matrix.format }}
JOB_ARCHITECTURE: ${{ matrix.arch }}
JOB_ENABLE_GL: ${{ matrix.gl }}
strategy:
matrix:
mainmatrix: [true]
os: [ubuntu-20.04, macos-11.0]
include:
- os: ubuntu-20.04
mainmatrix: true
gl: 1
- os: ubuntu-20.04
mainmatrix: false
name: Format
format: 1
- os: ubuntu-20.04
mainmatrix: false
name: Arm
arch: arm
- os: ubuntu-20.04
mainmatrix: false
name: AArch64
arch: aarch64
steps:
- name: Setup
run: if [[ "${{matrix.format}}" == "1" ]]; then sudo apt install -y clang-format; fi
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
run: ./presubmit.sh

View File

@@ -1,22 +0,0 @@
language: cpp
os:
- linux
- osx
jobs:
include:
- os: linux
dist: bionic
env: JOB_CHECK_FORMAT=1
addons:
apt:
packages:
- clang-format-9
- os: linux
env: JOB_ARCHITECTURE=arm
- os: linux
env: JOB_ARCHITECTURE=aarch64
script:
- ./travis.sh

View File

@@ -4,7 +4,7 @@ set -e
export TOP=$(pwd)
if [ "${JOB_CHECK_FORMAT}" -eq 1 ]; then
if [[ "${JOB_CHECK_FORMAT}" == "1" ]]; then
./check-format.sh
exit $?
fi
@@ -41,7 +41,7 @@ if [[ ${JOB_ARCHITECTURE} != "" ]]; then
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> ${TOOLCHAIN_FILE}
fi
if [[ ( ${JOB_ARCHITECTURE} == "" && ${TRAVIS_OS_NAME} == "linux" ) ]]; then
if [[ ( ${JOB_ARCHITECTURE} == "" && ${JOB_ENABLE_GL} == "1" ) ]]; then
BUILD_OPENGL_TEST="ON"
sudo apt-get update
sudo apt-get -y install libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev
@@ -57,7 +57,7 @@ git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
cd ${TOP}/OpenCL-ICD-Loader
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DENABLE_OPENCL30_PROVISIONAL=1 -DOPENCL_ICD_LOADER_HEADERS_DIR=${TOP}/OpenCL-Headers/ ..
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DOPENCL_ICD_LOADER_HEADERS_DIR=${TOP}/OpenCL-Headers/ ..
make
# Get libclcxx