|
@@ -19,15 +19,12 @@ on:
|
|
|
- 'protocols/**'
|
|
- 'protocols/**'
|
|
|
branches: [ "main" ]
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
-env:
|
|
|
|
|
- # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
|
|
|
- BUILD_TYPE: Release
|
|
|
|
|
-
|
|
|
|
|
jobs:
|
|
jobs:
|
|
|
build-x11:
|
|
build-x11:
|
|
|
strategy:
|
|
strategy:
|
|
|
matrix:
|
|
matrix:
|
|
|
os: [ubuntu-22.04, ubuntu-24.04]
|
|
os: [ubuntu-22.04, ubuntu-24.04]
|
|
|
|
|
+ build_type: [Release, Debug]
|
|
|
|
|
|
|
|
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
|
# 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.
|
|
# You can convert this to a matrix build if you need cross-platform coverage.
|
|
@@ -39,6 +36,12 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
submodules: true
|
|
submodules: true
|
|
|
|
|
|
|
|
|
|
+ # cache some build information
|
|
|
|
|
+ - name: ccache
|
|
|
|
|
+ uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
|
+ with:
|
|
|
|
|
+ key: ${{ github.job }}-${{ matrix.os }} # Eg. "some_build-ubuntu-latest"
|
|
|
|
|
+
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
|
if: matrix.os == 'ubuntu-22.04'
|
|
if: matrix.os == 'ubuntu-22.04'
|
|
|
run: sudo apt-get update && sudo apt-get -y install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxxf86vm-dev libglm-dev libglfw3-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0 libfftw3-dev
|
|
run: sudo apt-get update && sudo apt-get -y install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxxf86vm-dev libglm-dev libglfw3-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0 libfftw3-dev
|
|
@@ -49,11 +52,11 @@ jobs:
|
|
|
- name: Configure CMake
|
|
- 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.
|
|
# 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
|
|
# 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}}
|
|
|
|
|
|
|
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache'
|
|
|
|
|
|
|
|
- name: Build
|
|
- name: Build
|
|
|
# Build your program with the given configuration
|
|
# Build your program with the given configuration
|
|
|
- run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
|
|
|
|
|
|
+ run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
|
|
|
|
|
|
|
|
build-x11-wayland:
|
|
build-x11-wayland:
|
|
|
permissions:
|
|
permissions:
|
|
@@ -64,6 +67,7 @@ jobs:
|
|
|
strategy:
|
|
strategy:
|
|
|
matrix:
|
|
matrix:
|
|
|
os: [ubuntu-22.04, ubuntu-24.04]
|
|
os: [ubuntu-22.04, ubuntu-24.04]
|
|
|
|
|
+ build_type: [Release, Debug]
|
|
|
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
|
# 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.
|
|
# 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
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
@@ -74,6 +78,11 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
submodules: true
|
|
submodules: true
|
|
|
|
|
|
|
|
|
|
+ - name: ccache
|
|
|
|
|
+ uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
|
+ with:
|
|
|
|
|
+ key: ${{ github.job }}-${{ matrix.os }} # Eg. "some_build-ubuntu-latest"
|
|
|
|
|
+
|
|
|
- name: Initialize CodeQL
|
|
- name: Initialize CodeQL
|
|
|
# Initializes the CodeQL tools for scanning.
|
|
# Initializes the CodeQL tools for scanning.
|
|
|
uses: github/codeql-action/init@v3
|
|
uses: github/codeql-action/init@v3
|
|
@@ -92,11 +101,11 @@ jobs:
|
|
|
- name: Configure CMake
|
|
- 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.
|
|
# 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
|
|
# 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}}
|
|
|
|
|
|
|
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache'
|
|
|
|
|
|
|
|
- name: Build
|
|
- name: Build
|
|
|
# Build your program with the given configuration
|
|
# Build your program with the given configuration
|
|
|
- run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
|
|
|
|
|
|
+ run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
|
|
|
|
|
|
|
|
- name: Perform CodeQL Analysis
|
|
- name: Perform CodeQL Analysis
|
|
|
if: matrix.os == 'ubuntu-24.04'
|
|
if: matrix.os == 'ubuntu-24.04'
|
|
@@ -106,6 +115,7 @@ jobs:
|
|
|
strategy:
|
|
strategy:
|
|
|
matrix:
|
|
matrix:
|
|
|
os: [ubuntu-22.04, ubuntu-24.04]
|
|
os: [ubuntu-22.04, ubuntu-24.04]
|
|
|
|
|
+ build_type: [Release, Debug]
|
|
|
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
|
# 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.
|
|
# 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
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
@@ -116,6 +126,11 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
submodules: true
|
|
submodules: true
|
|
|
|
|
|
|
|
|
|
+ - name: ccache
|
|
|
|
|
+ uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
|
+ with:
|
|
|
|
|
+ key: ${{ github.job }}-${{ matrix.os }} # Eg. "some_build-ubuntu-latest"
|
|
|
|
|
+
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
|
if: matrix.os == 'ubuntu-22.04'
|
|
if: matrix.os == 'ubuntu-22.04'
|
|
|
run: sudo apt-get update && sudo apt-get -y install wayland-scanner++ wayland-protocols libwayland-dev libwayland-egl-backend-dev libglfw3-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libglm-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0 libfftw3-dev
|
|
run: sudo apt-get update && sudo apt-get -y install wayland-scanner++ wayland-protocols libwayland-dev libwayland-egl-backend-dev libglfw3-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libglm-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0 libfftw3-dev
|
|
@@ -127,8 +142,8 @@ jobs:
|
|
|
- name: Configure CMake
|
|
- 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.
|
|
# 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
|
|
# 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}}
|
|
|
|
|
|
|
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache'
|
|
|
|
|
|
|
|
- name: Build
|
|
- name: Build
|
|
|
# Build your program with the given configuration
|
|
# Build your program with the given configuration
|
|
|
- run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
|
|
|
|
|
|
+ run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
|