Opengl test fixes #111
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
strategy: | |
fail-fast: false | |
matrix: | |
#os: [ubuntu-latest] | |
os: [ubuntu-latest, windows-latest] | |
#os: [windows-latest] | |
build_type: [Release] | |
include: | |
- os: windows-latest | |
arch: 'win64_msvc2019_64' | |
host: 'windows' | |
shell: 'powershell' | |
#shell: 'cmd' | |
#shell: 'msys2 {0}' | |
- os: ubuntu-latest | |
arch: 'gcc_64' | |
host: 'linux' | |
shell: 'bash' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Install ninja-build tool (must be after Qt due PATH changes) | |
uses: turtlesec-no/get-ninja@main | |
- name: Make sure MSVC is found when Ninja generator is in use | |
if: matrix.os == 'windows-latest' | |
uses: ilammy/msvc-dev-cmd@v1 | |
#- name: Install MSYS2 | |
#if: matrix.os == 'windows-latest' | |
#uses: msys2/setup-msys2@v2 | |
#with: | |
#install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake git | |
#msystem: mingw64 | |
#release: false | |
- name: Install Linux Dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install -y build-essential libgl1-mesa-dev libxcb-cursor-dev xorg-dev libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev xvfb libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 | |
- name: Install 7zip | |
if: matrix.os == 'windows-latest' | |
run: choco install 7zip.install | |
- name: Install Mesa | |
if: matrix.os == 'windows-latest' | |
run: | | |
curl.exe -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/20.3.2/mesa3d-20.3.2-release-msvc.7z | |
"C:\Program Files\7-Zip\7z.exe" x mesa.7z | |
mklink opengl32.dll "x64\opengl32.dll" | |
mklink libglapi.dll "x64\libglapi.dll" | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: '==3.1.*' | |
version: '6.6.1' | |
host: ${{ matrix.host }} | |
target: 'desktop' | |
arch: ${{ matrix.arch }} | |
dir: '${{github.workspace}}/qt' | |
install-deps: 'true' | |
modules: 'qtcharts qtpositioning' | |
- name: Configure | |
env: | |
CMAKE_PREFIX_PATH: ${{env.Qt6_Dir}}/lib/cmake | |
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DALP_ENABLE_POSITIONING=false -B ./build | |
- name: Build | |
run: cmake --build ./build | |
- name: Unittests on Linux | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
QT_QPA_PLATFORM: offscreen | |
QT_DEBUG_PLUGINS: 1 | |
DISPLAY: :1 | |
run: | | |
./build/alp_external/radix/unittests/unittests_radix | |
./build/unittests/nucleus/unittests_nucleus | |
Xvfb :1 -screen 0 1024x768x16 & | |
./build/unittests/gl_engine/unittests_gl_engine # doesn't work | |
- name: Unittests on Windows | |
if: matrix.os == 'windows-latest' | |
env: | |
QT_DEBUG_PLUGINS: 1 | |
run: | | |
./build/alp_external/radix/unittests/unittests_radix.exe | |
./build/unittests/unittests_nucleus.exe | |
./build/unittests/unittests_gl_engine.exe | |