-
Notifications
You must be signed in to change notification settings - Fork 190
94 lines (83 loc) · 3.32 KB
/
cmake-multi-platform.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
87
88
89
90
91
92
93
94
name: Build Multi Platform
on:
pull_request:
branches: [main, dev ]
push:
branches: [main, dev ]
workflow_dispatch:
jobs:
build-linux-clang:
name: Linux (Clang)
runs-on: ubuntu-latest
timeout-minutes: 15
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev libglfw3-dev
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-macos-clang:
name: macOS (arm64|x86_64)
runs-on: macos-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchain/ios.toolchain.cmake -DPLATFORM=MAC_UNIVERSAL -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S ${{ github.workspace }}/src
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-ios-clang:
name: iOS (arm64)
runs-on: macos-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S ${{ github.workspace }}/src
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-windows-mingw:
name: Windows (MSYS2)
runs-on: windows-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
- name: Set up MinGW
uses: msys2/setup-msys2@v2
- name: Configure
run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build Win shared x64 library
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-android-gradle:
name: Android (arm64-v8a)
runs-on: ubuntu-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: cd src/android/java && ./gradlew build