-
Notifications
You must be signed in to change notification settings - Fork 11
96 lines (83 loc) · 2.5 KB
/
build.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
95
96
on:
release:
types: [published]
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Build:
strategy:
fail-fast: true
matrix:
name: [linux,windows_x86,windows_x64,mac_mac,mac_ios]
include:
- name: linux
os: ubuntu-20.04
label: Linux
- name: windows_x86
os: windows-2019
label: Win_x86
- name: windows_x64
os: windows-2019
label: Win_x64
- name: mac_mac
os: macos-11
label: Mac_mac
- name: mac_ios
os: macos-11
label: Mac_ios
name: Build on ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 1
- run: |
git lfs install
git lfs pull
- name: Install Linux Dependencies
if: matrix.name == 'linux'
run: |
sudo apt-get update
sudo apt-get -y install libx11-dev libxrandr-dev libxi-dev libxinerama-dev libxcursor-dev libudev-dev libx11-xcb-dev
sudo apt-get -y install libglu1-mesa-dev mesa-common-dev libvulkan-dev
- name: Build
shell: bash
run: |
if [ "${{ matrix.name }}" = "mac_mac" ];
then
cmake -S . -B build -DBUILD_TEST=ON -DBUILD_EXAMPLE=ON
fi
if [ "${{ matrix.name }}" = "mac_ios" ];
then
cmake -S . -B build -DCMAKE_SYSTEM_NAME=iOS "-DCMAKE_OSX_ARCHITECTURES=armv7;armv7s;arm64;i386;x86_64"
fi
if [ "${{ matrix.name }}" = "linux" ];
then
cmake -S . -B build -DBUILD_TEST=ON -DBUILD_VULKAN=ON -DBUILD_VULKAN_COMPILER=ON -DBUILD_EXAMPLE=ON -DBUILD_TOOL=ON
fi
if [ "${{ matrix.name }}" = "windows_x86" ];
then
cmake -S . -B build -A Win32 -DBUILD_TEST=ON -DBUILD_EXAMPLE=OFF
fi
if [ "${{ matrix.name }}" = "windows_x64" ];
then
cmake -S . -B build -DBUILD_TEST=ON -DBUILD_EXAMPLE=ON
fi
cmake --build build --config Release
- name: Test
if: matrix.name == 'windows_x64'
run: |
mkdir test_ci
cp build/src_test/Release/LLGI_Test.exe test_ci/
cd test_ci
./LLGI_Test.exe test
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Test_Result_Windows
path: test_ci