-
Notifications
You must be signed in to change notification settings - Fork 46
140 lines (108 loc) · 3.84 KB
/
main.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Build MasterPlan
on:
workflow_dispatch:
push:
branches: [ sdl-rework ]
# pull_request:
# branches: [ sdl-rework ]
jobs:
buildLinux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Download Pre-reqs
run: |
sudo apt update
sudo apt-get install libsdl2-dev -y
sudo apt-get install libsdl2-image-dev -y
sudo apt-get install libsdl2-mixer-dev -y
sudo apt-get install libsdl2-ttf-dev -y
sudo apt-get install libsdl2-gfx-dev -y
sudo apt-get install libxss-dev -y
- name: Build
run: go run ./build_script/main.go -b -os linux -c
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-Linux-Release-v0.8.0.a4
path: ./bin/linux-0.8-Release-64.tar.gz
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-Linux-Demo-v0.8.0.a4
path: ./bin/linux-0.8-Demo-64.tar.gz
# For some reason, building on Windows creates a terminal window despite specifying -H=windowsgui in the build settings. For now, I'll crosscompile on my machine.
buildWindows:
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git
- name: Download SDL2 Dependencies
run: pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2{,_image,_ttf,_gfx} mingw-w64-x86_64-go --noconfirm
- name: Build
run: go run ./build_script/main.go -b -os windows -c
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-Windows-Release-v0.8.0.a4
path: ./bin/windows-0.8-Release-64.zip
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-Windows-Demo-v0.8.0.a4
path: ./bin/windows-0.8-Demo-64.zip
buildMac:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Download Pre-reqs
run: brew install sdl2{,_image,_mixer,_ttf,_gfx} pkg-config dylibbundler
- name: Build
run: go run ./build_script/main.go -b -os darwin
- name: Bundle Dependencies
run: dylibbundler -od -b -x ./bin/macos-0.8-Release-64/MasterPlan.app/Contents/MacOS/masterplan -d ./bin/macos-0.8-Release-64/MasterPlan.app/Contents/libs -p @executable_path/../libs
- name: Compress
run: go run ./build_script/main.go -c
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-MacOS-Release-v0.8.0.a4
path: bin/macos-0.8-Release-64.tar.gz
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-MacOS-Demo-v0.8.0.a4
path: bin/macos-0.8-Demo-64.tar.gz
buildMac12:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Download Pre-reqs
run: brew install sdl2{,_image,_mixer,_ttf,_gfx} pkg-config dylibbundler
- name: Build
run: go run ./build_script/main.go -b
- name: Bundle Dependencies
run: dylibbundler -od -b -x ./bin/macos-0.8-Release-64/MasterPlan.app/Contents/MacOS/masterplan -d ./bin/macos-0.8-Release-64/MasterPlan.app/Contents/libs -p @executable_path/../libs
- name: Compress
run: go run ./build_script/main.go -c
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-MacOS-12-Release-v0.8.0.a4
path: bin/macos-0.8-Release-64.tar.gz
- uses: actions/upload-artifact@v2
with:
name: _GH-Actions-MasterPlan-MacOS-12-Demo-v0.8.0.a4
path: bin/macos-0.8-Demo-64.tar.gz