-
Notifications
You must be signed in to change notification settings - Fork 1
118 lines (116 loc) · 3.75 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Build GSE
on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- name: windows-x64
runner: windows-latest
shell: cmd
build_script: .\windows.bat
rid: win-x64
msvc_arch: x64
- name: windows-arm64
runner: windows-latest
shell: cmd
build_script: .\windows.bat
rid: win-arm64
msvc_arch: x64_arm64
- name: windows-x86
runner: windows-latest
shell: cmd
build_script: .\windows.bat
rid: win-x86
msvc_arch: x64_x86
- name: macos-universal
runner: macos-14
shell: sh
build_script: ./osx.sh
rid: osx
- name: linux-x64
runner: ubuntu-latest
container: debian:11
shell: sh
build_script: ./linux.sh
rid: linux-x64
- name: linux-arm64
runner: ubuntu-latest
container: debian:11
shell: sh
build_script: ./linux.sh
rid: linux-arm64
- name: linux-arm
runner: ubuntu-latest
container: ubuntu:22.04
shell: sh
build_script: ./linux.sh
rid: linux-arm
- name: android
runner: ubuntu-latest
container: debian:11
shell: sh
build_script: ./android.sh
rid: android
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.runner }}
container: ${{ matrix.platform.container }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Setup MSVC environment
if: matrix.platform.msvc_arch != ''
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.platform.msvc_arch }}
- name: Setup Xcode environment
if: matrix.platform.rid == 'osx'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup base Linux environment
if: matrix.platform.container != ''
run: apt-get update && apt-get install -y git
- name: Checkout source code
uses: actions/checkout@v4
with:
path: GSE
fetch-depth: 0
submodules: recursive
- name: Setup Android release keystore
if: matrix.platform.rid == 'android' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
env:
ANDROID_RELEASE_KEYSTORE: ${{ secrets.ANDROID_RELEASE_KEYSTORE }}
run: |
echo $ANDROID_RELEASE_KEYSTORE | base64 --decode > $HOME/gse-release-keystore.jks
- name: Setup Android upload keystore
if: matrix.platform.rid == 'android' && startsWith(github.ref, 'refs/tags/')
env:
ANDROID_UPLOAD_KEYSTORE: ${{ secrets.ANDROID_UPLOAD_KEYSTORE }}
run: |
echo $ANDROID_UPLOAD_KEYSTORE | base64 --decode > $HOME/gse-upload-keystore.jks
- name: Run CI build script
env:
TARGET_RID: ${{ matrix.platform.rid }}
ANDROID_RELEASE_STOREPASS: ${{ secrets.ANDROID_RELEASE_STOREPASS }}
ANDROID_RELEASE_KEYALIAS: ${{ secrets.ANDROID_RELEASE_KEYALIAS }}
ANDROID_RELEASE_KEYPASS: ${{ secrets.ANDROID_RELEASE_KEYPASS }}
ANDROID_UPLOAD_STOREPASS: ${{ secrets.ANDROID_UPLOAD_STOREPASS }}
ANDROID_UPLOAD_KEYALIAS: ${{ secrets.ANDROID_UPLOAD_KEYALIAS }}
ANDROID_UPLOAD_KEYPASS: ${{ secrets.ANDROID_UPLOAD_KEYPASS }}
run: |
cd GSE/.ci
${{ matrix.platform.build_script }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: GSE-${{ matrix.platform.rid }}
path: GSE/output/${{ matrix.platform.rid }}/publish/*
if-no-files-found: error