-
Notifications
You must be signed in to change notification settings - Fork 21
166 lines (156 loc) · 5.22 KB
/
binaries.yaml
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Build binaries
on:
workflow_dispatch:
# also test this workflow and build scripts in CI when changed
push:
paths:
- '.github/workflows/binaries.yaml'
- 'macosx/*.sh'
pull_request:
paths:
- '.github/workflows/binaries.yaml'
- 'macosx/*.sh'
jobs:
build-ubuntu:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install coreutils build-essential libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev p7zip libgtest-dev
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build RELEASE
run: make native CONF=RELEASE -j2
- name: Run tests
run: make test CONF=RELEASE
- name: Get version
run: |
echo "POP_VERSION=`./build/linux-x86_64/poptracker --version`" >> $GITHUB_ENV
echo "POP_NAME=poptracker_`./build/linux-x86_64/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV
- name: Build DIST # this builds a release ZIP, maybe .deb in the future
run: make CONF=DIST
- name: Store DIST
uses: actions/upload-artifact@v4
with:
name: ubuntu-22-04-dist
path: dist
build-appimage:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install coreutils build-essential libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev p7zip wget libgtest-dev
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get appimage-builder
run: |
wget -q -O appimage-builder https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder
./appimage-builder --appimage-extract
echo -e '#/bin/sh\n./squashfs-root/AppRun "$@"' > appimage-builder
- name: Build AppImage
run: |
./appimage-builder --recipe linux/AppImageBuilder.yml
- name: Store AppImage
uses: actions/upload-artifact@v4
with:
name: AppImage
path: "*.AppImage"
if-no-files-found: error
build-macos:
runs-on: macos-13
steps:
- name: Install dependencies
run: |
brew install coreutils SDL2 sdl2_ttf sdl2_image [email protected] automake libtool autoconf googletest || true
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build RELEASE
run: make native CONF=RELEASE -j3
- name: Run tests
run: make test CONF=RELEASE
- name: Get version
run: |
echo "POP_VERSION=`./build/darwin-x86_64/poptracker --version`" >> $GITHUB_ENV
echo "POP_NAME=poptracker_`./build/darwin-x86_64/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV
- name: Build DIST # this builds the app bundle, zips it and maybe .dmg in the future
run: make CONF=DIST
- name: Check DIST
run: |
du -sh ./build/darwin-x86_64/poptracker.app
cd ./build/darwin-x86_64/poptracker.app/Contents/MacOS
otool -L ./poptracker
./poptracker --version
./poptracker --list-packs
- name: Store app bundle
uses: actions/upload-artifact@v4
with:
name: ${{ env.POP_NAME }}_macos
path: build/darwin-x86_64/poptracker.app
- name: Store ZIP/DMG
uses: actions/upload-artifact@v4
with:
name: macos-dist
path: dist
build-msys:
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
coreutils
make
mingw-w64-x86_64-toolchain
mingw64/mingw-w64-x86_64-SDL2
mingw64/mingw-w64-x86_64-SDL2_image
mingw64/mingw-w64-x86_64-SDL2_ttf
mingw64/mingw-w64-x86_64-freetype
mingw64/mingw-w64-x86_64-openssl
mingw64/mingw-w64-x86_64-gtest
p7zip
- name: Fix dependencies
shell: msys2 {0}
run: |
# static svt-av1 2.3.0-1 lib seems to be currently broken
wget https://quantum-mirror.hu/mirrors/pub/msys2/mingw/mingw64/mingw-w64-x86_64-svt-av1-2.2.1-1-any.pkg.tar.zst
pacman -U --noconfirm mingw-w64-x86_64-svt-av1-2.2.1-1-any.pkg.tar.zst
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build RELEASE
shell: msys2 {0}
run: make native CONF=RELEASE -j2
- name: Run tests
shell: msys2 {0}
run: make test CONF=RELEASE
- name: Get version
shell: msys2 {0}
run: |
echo "POP_VERSION=`./build/win64/poptracker --version`" >> $GITHUB_ENV
echo "POP_NAME=poptracker_`./build/win64/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV
- name: Build DIST # this builds a release ZIP
shell: msys2 {0}
run: make CONF=DIST
- name: Store DIST
uses: actions/upload-artifact@v4
with:
name: win64-msys-dist
path: dist
- name: Build DEBUG
shell: msys2 {0}
run: |
make clean
make native CONF=DEBUG -j2
7z a -mx=9 dist/poptracker-win64-debug.zip build/win64/poptracker.exe
- name: Store DEBUG
uses: actions/upload-artifact@v4
with:
name: win64-msys-debug
path: dist/poptracker-win64-debug.zip