89 lines
3.6 KiB
YAML
89 lines
3.6 KiB
YAML
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-22.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: set up JDK 11
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '11'
|
|
distribution: 'temurin'
|
|
cache: gradle
|
|
|
|
- name: Install dependencies
|
|
run: >
|
|
sudo apt-get update && sudo apt-get install glslang-tools
|
|
|
|
- name: Secrets
|
|
env:
|
|
WIVRNBOTKEY: ${{ secrets.WIVRNBOTKEY }}
|
|
APK_SIGNINGKEYPASSWORD: ${{ secrets.APK_SIGNINGKEYPASSWORD }}
|
|
APK_KEYSTORE_BASE64: ${{ secrets.APK_KEYSTORE_BASE64 }}
|
|
run: |
|
|
echo "$WIVRNBOTKEY" > id_ed25519
|
|
chmod 600 id_ed25519
|
|
echo signingKeyPassword="$APK_SIGNINGKEYPASSWORD" > gradle.properties
|
|
echo "$APK_KEYSTORE_BASE64" | base64 --decode --ignore-garbage > ks.keystore
|
|
|
|
- name: Download Oculus SDK
|
|
run: sftp -i id_ed25519 -o StrictHostKeyChecking=no wivrn-bot@meumeu.org:data/ovr_openxr_mobile_sdk_46.0.zip .
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build with Gradle
|
|
run: |
|
|
./gradlew build
|
|
mkdir apk
|
|
mv build/outputs/apk/oculusNovalidationlayer/release/WiVRn-oculus-novalidationlayer-release.apk apk/WiVRn-oculus.apk
|
|
mv build/outputs/apk/oculusNovalidationlayer/debug/WiVRn-oculus-novalidationlayer-debug.apk apk/WiVRn-oculus-debug.apk
|
|
mv build/outputs/apk/oculusValidationlayer/release/WiVRn-oculus-validationlayer-release.apk apk/WiVRn-oculus-validationlayer.apk
|
|
mv build/outputs/apk/oculusValidationlayer/debug/WiVRn-oculus-validationlayer-debug.apk apk/WiVRn-oculus-validationlayer-debug.apk
|
|
|
|
- name: Archive artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: APK
|
|
path: apk/*.apk
|