-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (94 loc) · 2.89 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
name: Build GSR
on:
push:
branches: [ master ]
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: 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: 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: GSR
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/gsr-release-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 }}
run: |
cd GSR/.ci
${{ matrix.platform.build_script }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: GSR-${{ matrix.platform.rid }}
path: GSR/output/${{ matrix.platform.rid }}/publish/*
if-no-files-found: error