-
Notifications
You must be signed in to change notification settings - Fork 32
92 lines (83 loc) · 2.39 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
name: build
on:
push:
paths:
- 'src/**'
- 'build-*/**'
- '.github/workflows/**.yml'
pull_request:
paths:
- 'src/**'
- 'build-*/**'
- '.github/workflows/**.yml'
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libgl-dev libglew-dev libxss-dev libxxf86vm-dev libasound2-dev libudev-dev libcurl4-openssl-dev libpng-dev libjpeg-dev libfreetype6-dev libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev cmake ninja-build
- name: Build
run: |
mkdir build
cd build
cmake .. -G Ninja
ninja -j4
windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
mingw-w64-x86_64-toolchain
autotools
mingw-w64-x86_64-curl
mingw-w64-x86_64-gtk3
mingw-w64-x86_64-libpng
mingw-w64-x86_64-libjpeg-turbo
mingw-w64-x86_64-freetype
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL2_image
mingw-w64-x86_64-SDL2_mixer
mingw-w64-x86_64-SDL2_ttf
mingw-w64-x86_64-nsis
- name: Build
run: |
cd build-windows/
./autogen.sh
./configure
./go --silent --release
- name: Bundle together
run: |
cd build-windows/
bash make_release.sh
- name: Upload output as artifact
uses: actions/upload-artifact@v3
with:
name: principia-setup.exe
path: build-windows/principia-setup.exe
android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends openjdk-11-jdk-headless
- name: Build with gradle
run: |
cd build-android
./gradlew assemblerelease
- name: Save apk artifact
uses: actions/upload-artifact@v3
with:
name: principia-release-unsigned.apk
path: build-android/principia/build/outputs/apk/release/principia-release-unsigned.apk