-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (95 loc) · 2.94 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: "Build"
on:
push:
# Only run on branches
branches:
- '**'
jobs:
linux:
runs-on: ubuntu-18.04
steps:
- name: "Install dependencies"
run: |
sudo apt update -y
sudo apt install -y libsdl2-dev libsdl2-image-dev
- name: "Checkout sources"
uses: actions/checkout@v2
- name: "Compile"
run: |
make bin/brogue
- name: "Create artifact"
run: |
make RapidBrogue-linux
tar -czvf RapidBrogue-linux-x86_64.tar.gz RapidBrogue-linux
- name: "Upload artifact"
uses: actions/upload-artifact@v2
with:
name: linux-x86_64
path: RapidBrogue-linux-x86_64.tar.gz
macos:
runs-on: macos-latest
steps:
- name: "Checkout sources"
uses: actions/checkout@v2
- name: "Prepare"
run: |
make macos/sdl2.rb
- name: "Cache SDL2"
uses: actions/cache@v2
with:
path: sdl2-cellar
key: sdl2-${{hashFiles('macos/sdl2.rb')}}
- name: "Compile and install dependencies"
run: |
if [ -d sdl2-cellar ]; then
cp -r sdl2-cellar $(brew --cellar)/sdl2
brew link sdl2
else
brew install --build-from-source ./macos/sdl2.rb
cp -r $(brew --cellar)/sdl2 sdl2-cellar
fi
brew install sdl2_image dylibbundler
- name: "Compile"
run: |
make MAC_APP=YES Brogue.app
env:
MACOSX_DEPLOYMENT_TARGET: "10.7"
- name: "Fix and bundle dylib references"
run: |
cd Brogue.app/Contents && dylibbundler -cd -b -x MacOS/brogue
- name: "Create artifact"
run: |
make RapidBrogue-macos
zip -rll RapidBrogue-macos-x86_64.zip RapidBrogue-macos
- name: "Upload artifact"
uses: actions/upload-artifact@v2
with:
name: macos-x86_64
path: RapidBrogue-macos-x86_64.zip
windows:
runs-on: windows-latest
steps:
- name: "Checkout sources"
uses: actions/checkout@v2
- name: "Install dependencies"
run: |
.\.github\get-deps-mingw.ps1
- name: "Compile"
shell: powershell
run: |
$env:path = $env:path + ";" + (Join-Path $pwd.Drive.Root "opt/local/x86_64-w64-mingw32/bin")
$env:path = $env:path + ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64'
mingw32-make CC=gcc bin/brogue.exe
- name: "Create artifact"
run: |
mingw32-make RapidBrogue-windows
cp SDL2\x86_64-w64-mingw32\bin\SDL2.dll RapidBrogue-windows
cp SDL2_image\x86_64-w64-mingw32\bin\zlib1.dll RapidBrogue-windows
cp SDL2_image\x86_64-w64-mingw32\bin\SDL2_image.dll RapidBrogue-windows
cp SDL2_image\x86_64-w64-mingw32\bin\libpng16-16.dll RapidBrogue-windows
7z a RapidBrogue-windows-x86_64.zip RapidBrogue-windows
- name: "Upload artifact"
uses: actions/upload-artifact@v2
with:
name: windows-x86_64
path: RapidBrogue-windows-x86_64.zip