-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.7 KB
/
.github.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
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest]
build-type: [debug, release]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Verify submodules
run: |
ls ${{ github.workspace }}
- name: Set strings
id: strings
run: |
echo "build-dir=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
- name: Bootstrap vcpkg
run: |
chmod +x ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh
${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh
- name: Install CMake on Ubuntu
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y cmake
- name: Install CMake on macOS
if: matrix.platform == 'macos-latest'
run: |
brew install cmake
- name: Install EMSDK
shell: base
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
echo "EMSDK="${{ github.workspace }}/emsdk" >> $GITHUB_ENV
- name: CMake Configure
run: >
cmake -S ${{ github.workspace }}
-B ${{ steps.strings.outputs.build-dir }}
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
- name: CMake Build
run: cmake --build ${{ steps.strings.outputs.build-dir }}