-
Notifications
You must be signed in to change notification settings - Fork 8
86 lines (73 loc) · 3.35 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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