Add github CI

This commit is contained in:
Guillaume Meunier
2022-11-13 20:48:27 +01:00
parent 2dbade5c8f
commit 204606e96b
5 changed files with 66 additions and 6 deletions
+57
View File
@@ -0,0 +1,57 @@
name: ci
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-server:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DWIVRN_BUILD_CLIENT=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
#- name: Test
# working-directory: ${{github.workspace}}/build
# # Execute tests defined by the CMake configuration.
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}}
# build-android:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
# - name: set up JDK 11
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'temurin'
# cache: gradle
#
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
# - name: Build with Gradle
# run: ./gradlew build
+2 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.20)
project(WiVRn VERSION 1.0 LANGUAGES C CXX)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
@@ -29,6 +29,7 @@ endif()
find_package(PkgConfig REQUIRED)
find_package(Vulkan REQUIRED)
pkg_check_modules(systemd IMPORTED_TARGET systemd)
if (WIVRN_BUILD_SERVER)
find_package(CUDAToolkit)
+5 -3
View File
@@ -5,9 +5,11 @@ function(compile_glsl_aux shader_stage shader_name glsl_filename output)
add_custom_command(
OUTPUT ${output}
COMMAND echo "{ \"${shader_name}\", {" >> ${output}
COMMAND Vulkan::glslc -mfmt=num -fshader-stage=${shader_stage} -D${shader_stage_upper}_SHADER ${in_file} -o - >> ${output}
COMMAND echo "}}," >> ${output}
COMMAND echo "{ \"${shader_name}\", {" >> ${output}
COMMAND echo "#include \"${shader_name}.spv\"" >> ${output}
COMMAND echo "}}," >> ${output}
COMMAND Vulkan::glslangValidator -V -S ${shader_stage} -D${shader_stage_upper}_SHADER ${in_file} -x -o ${shader_name}.spv
DEPENDS ${glsl_filename}
VERBATIM
APPEND
+2 -1
View File
@@ -68,6 +68,7 @@ add_executable(wivrn-server
${WIVRN_SHADER_HEADERS}
driver/yuv_converter.cpp
)
target_compile_features(wivrn-server PRIVATE cxx_std_20)
target_include_directories(wivrn-server SYSTEM PRIVATE ${monado_SOURCE_DIR}/src/xrt/compositor/)
@@ -108,7 +109,7 @@ target_link_libraries(
xrt-external-openxr
xrt-interfaces
systemd
PkgConfig::systemd
Boost::pfr
PkgConfig::AVAHI
Eigen3::Eigen
-1
View File
@@ -35,7 +35,6 @@
#include "util/u_time.h"
#include "util/u_var.h"
#include <stdatomic.h>
#include <stdio.h>
#include <openxr/openxr.h>