| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- name: CMake
- on:
- workflow_run:
- workflows: [tests]
- branches: [main]
- types: [completed]
- workflow_dispatch:
- jobs:
- build-x11:
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
- strategy:
- matrix:
- 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.
- # 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: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: true
- # cache some build information
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.build_type }} # Eg. "some_build-ubuntu-latest"
- - name: Install dependencies
- 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
- - name: Install dependencies
- if: matrix.os == 'ubuntu-24.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 libmpv2 libpulse-dev libpulse0 libfftw3-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=${{matrix.build_type}} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
- - name: Build
- # Build your program with the given configuration
- run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- build-x11-wayland:
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
- permissions:
- actions: read
- contents: read
- security-events: write
- strategy:
- matrix:
- 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.
- # 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: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: true
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.build_type }} # Eg. "some_build-ubuntu-latest"
- - name: Initialize CodeQL
- # Initializes the CodeQL tools for scanning.
- uses: github/codeql-action/init@v3
- if: ${{ matrix.os == 'ubuntu-24.04' && matrix.build_type == 'Debug' }}
- with:
- languages: 'cpp'
- - name: Install dependencies
- 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 wayland-scanner++ wayland-protocols libwayland-dev
- - name: Install dependencies
- if: matrix.os == 'ubuntu-24.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 libmpv2 libpulse-dev libpulse0 libfftw3-dev wayland-scanner++ wayland-protocols libwayland-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=${{matrix.build_type}} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
- - name: Build
- # Build your program with the given configuration
- run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- - name: Perform CodeQL Analysis
- if: ${{ matrix.os == 'ubuntu-24.04' && matrix.build_type == 'Debug' }}
- uses: github/codeql-action/analyze@v3
- build-wayland:
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
- strategy:
- matrix:
- 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.
- # 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: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: true
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.build_type }} # Eg. "some_build-ubuntu-latest"
- - name: Install dependencies
- 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
- - name: Install dependencies
- if: matrix.os == 'ubuntu-24.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 libmpv2 libpulse-dev libpulse0 libfftw3-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=${{matrix.build_type}} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
- - name: Build
- # Build your program with the given configuration
- run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
|