-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.8 KB
/
macOS.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
name: macOS workflow
on:
push:
branches: [ deploy_* ]
workflow_dispatch:
jobs:
build:
name: Build macOS dmg
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
set -x
## prepare system
brew install automake sdl2 sdl2_image sdl2_mixer protobuf-c glew boost ftgl dylibbundler create-dmg
## import build settings
. ./INFO
## get source
wget "${TARBALL}" -O source.tbz
(mkdir source; cd source; tar -xjf ../source.tbz; mv *${VERSION}* ../armagetronad)
rmdir source
rm -f source.tbz
## maybe speed up testing
#export ARMAGETRONAD_FAKERELEASE=true
# build script location varies between branches, better define it once
BUILD_BUNDLE=./desktop/os-x/build_bundle.sh
# most configure arguments are shared between builds
CONFIG_ARGS="--disable-sysinstall --disable-etc --prefix=/usr"
## build client
mkdir client
(cd client && ../armagetronad/configure ${CONFIG_ARGS} && make -j `nproc`)
(cd client && bash "${BUILD_BUNDLE}" "`pwd`/../release")
## build server
mkdir server
(cd server && ../armagetronad/configure ${CONFIG_ARGS} --disable-glout && make -j `nproc`)
(cd server && bash "${BUILD_BUNDLE}" "`pwd`/../release")
## prepare retrocycles
cp -a armagetronad retrocycles
sed < armagetronad/src/engine/ePlayer.cpp > retrocycles/src/engine/ePlayer.cpp -e "s/pr0n/cat videos/"
for f in src/tron/gLogo.cpp Makefile.am Makefile.in; do sed < armagetronad/$f > retrocycles/$f -e "s,textures/title.jpg,textures/title.png,"; done
git clone https://gitlab.com/armagetronad/steam-art
cp steam-art/good/title.png retrocycles/textures/
(cd retrocycles; ./bootstrap.sh)
## build retrocycles
mkdir retrocycles_client
#(cd retrocycles_client && progname="${PROGNAME_RC}" progtitle="${PROGTITLE_RC}" ../retrocycles/configure ${CONFIG_ARGS} && make -j `nproc`)
#(cd retrocycles_client && bash "${BUILD_BUNDLE}" "`pwd`/../release")
- name: Artifacts
uses: actions/upload-artifact@v2
with:
name: macOS images
path: release
- name: SSH Agent
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.SSH_KEY_DEPLOY }}
- name: Deploy
run: |
. ./INFO
set -x
mkdir -p ~/.ssh
cat known_hosts >> ~/.ssh/known_hosts
rsync -r release/ "${UPLOAD}"
echo "done" > release/mac_is_done.txt
rsync release/mac_is_done.txt "${UPLOAD}"/mac_is_done.txt
set +x