Feature/detect dxvk (#41) #169
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: | |
# on any push | |
pull_request: | |
# on pull request | |
workflow_dispatch: | |
# allows manual trigger | |
jobs: | |
job: | |
name: ${{ matrix.os }}-${{ matrix.platform }}-cmake-build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
platform: [x32, x64] | |
exclude: | |
- os: macos-latest | |
platform: x32 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- uses: lukka/get-cmake@latest | |
- name: Linux tests (x64) | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.platform == 'x64' }} | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev | |
cmake ${{ github.workspace }}/CMakeLists.txt -DINGAMEOVERLAY_BUILD_TESTS=ON -DIMGUI_USER_CONFIG=${{github.workspace}}/tests/common/ingameoverlay_imconfig.h -S . -B build | |
cmake --build build -v | |
#find build | |
- name: Linux tests (x32) | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.platform == 'x32' }} | |
shell: bash | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt install -y gcc-multilib g++-multilib # needed for 32-bit builds | |
sudo apt-get install libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcursor-dev:i386 libxi-dev:i386 | |
# write a cmake toolchain file to force 32-bit compilation | |
cat >cmake_32_build.toolchain <<EOL | |
set( CMAKE_C_FLAGS_INIT "-m32" ) | |
set( CMAKE_CXX_FLAGS_INIT "-m32" ) | |
set( CMAKE_SIZEOF_VOID_P 4 ) | |
EOL | |
cmake ${{ github.workspace }}/CMakeLists.txt -DCMAKE_TOOLCHAIN_FILE="cmake_32_build.toolchain" -DINGAMEOVERLAY_BUILD_TESTS=ON -DIMGUI_USER_CONFIG=${{github.workspace}}/tests/common/ingameoverlay_imconfig.h -S . -B build | |
cmake --build build -v | |
#find build | |
- name: MacOS tests (x64) | |
if: ${{ matrix.os == 'macos-latest' && matrix.platform == 'x64' }} | |
shell: bash | |
run: | | |
cmake ${{ github.workspace }}/CMakeLists.txt -DINGAMEOVERLAY_BUILD_TESTS=ON -DIMGUI_USER_CONFIG=${{github.workspace}}/tests/common/ingameoverlay_imconfig.h -S . -B build | |
cmake --build build -v | |
#find build | |
- name: Windows tests (x64) | |
if: ${{ matrix.os == 'windows-latest' && matrix.platform == 'x64' }} | |
shell: powershell | |
run: | | |
cmake ${{ github.workspace }}\CMakeLists.txt -DINGAMEOVERLAY_BUILD_TESTS=ON -DIMGUI_USER_CONFIG=${{github.workspace}}\tests\common\ingameoverlay_imconfig.h -S . -B build -A x64 | |
cmake --build build -v | |
#Get-ChildItem -Recurse build | |
- name: Windows tests (x32) | |
if: ${{ matrix.os == 'windows-latest' && matrix.platform == 'x32' }} | |
shell: powershell | |
run: | | |
cmake ${{ github.workspace }}\CMakeLists.txt -DINGAMEOVERLAY_BUILD_TESTS=ON -DIMGUI_USER_CONFIG=${{github.workspace}}\tests\common\ingameoverlay_imconfig.h -S . -B build -A Win32 | |
cmake --build build -v | |
#Get-ChildItem -Recurse build | |