-
-
Notifications
You must be signed in to change notification settings - Fork 17
179 lines (147 loc) · 5.86 KB
/
sdl2.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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
name: Build
on:
push:
branches: [ "develop", "edge", "release" ]
pull_request:
branches: [ "develop" ]
workflow_dispatch:
env:
VXT_VERSION: 1.1.1
SDL2_VERSION: 2.28.5
jobs:
linux-build:
name: Build (Linux AMD64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x
- name: Setup
run: |
sudo apt-get update
sudo apt-get install cppcheck libpcap-dev libfuse2 libasound2-dev libpulse-dev
curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default && unzip butler.zip -d butler
curl -L -o premake5.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz && mkdir premake5 && tar -xf premake5.tar.gz -C premake5
echo "${GITHUB_WORKSPACE}/butler" >> $GITHUB_PATH
echo "${GITHUB_WORKSPACE}/premake5" >> $GITHUB_PATH
curl -L -o sdl.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-${SDL2_VERSION}/SDL2-${SDL2_VERSION}.tar.gz && tar -xf sdl.tar.gz
cd SDL2-${SDL2_VERSION}
./configure --prefix="${GITHUB_WORKSPACE}/sdl_bin"
make && make install
- name: Test & Check
run: |
premake5 check
premake5 --test --sdl-config="${GITHUB_WORKSPACE}/sdl_bin/bin" gmake
make clean test
- name: Build
run: |
premake5 --sdl-config="${GITHUB_WORKSPACE}/sdl_bin/bin" gmake
make clean sdl2-frontend ebridge-tool
#- name: Package
# run: ./tools/package/itch/package.linux.sh
#- name: Deploy
# env:
# BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
# run: if [[ $GITHUB_REF_NAME =~ ^(edge|release)$ ]]; then ./tools/package/itch/push.sh; fi
windows-build:
name: Build (Windows AMD64)
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x
- name: MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: base-devel mingw-w64-x86_64-toolchain
- name: Setup
run: |
curl -L -o butler.zip https://broth.itch.ovh/butler/windows-amd64/LATEST/archive/default && unzip butler.zip -d butler
curl -L -o sdl.zip https://github.com/libsdl-org/SDL/releases/download/release-${SDL2_VERSION}/SDL2-devel-${SDL2_VERSION}-mingw.zip && unzip sdl.zip
curl -L -o premake5.zip https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip && mkdir premake5 && unzip premake5.zip -d premake5
echo "${GITHUB_WORKSPACE}/premake5" >> $GITHUB_PATH
echo "${GITHUB_WORKSPACE}/butler" >> $GITHUB_PATH
- name: Test
shell: msys2 {0}
run: |
export PATH="${GITHUB_WORKSPACE}/premake5":"$PATH"
premake5 --test --cc=gcc gmake
make clean test
- name: Build
shell: msys2 {0}
run: |
export PATH="${GITHUB_WORKSPACE}/premake5":"${GITHUB_WORKSPACE}/SDL2-${SDL2_VERSION}/x86_64-w64-mingw32/bin":"$PATH"
premake5 --cc=gcc gmake
make clean sdl2-frontend ebridge-tool
- name: Package
run: ./tools/package/itch/package.bat
- name: Deploy
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: if [[ $GITHUB_REF_NAME =~ ^(edge|release)$ ]]; then ./tools/package/itch/push.sh; fi
macos-build:
name: Build (MacOS AMD64)
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x
- name: Setup
#run: |
# brew update
# brew install rpl
# curl -L -o butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default && unzip butler.zip -d butler
# echo "${GITHUB_WORKSPACE}/butler" >> $GITHUB_PATH
run: |
curl -L -o premake5.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-macosx.tar.gz && mkdir premake5 && tar -xf premake5.tar.gz -C premake5
echo "${GITHUB_WORKSPACE}/premake5" >> $GITHUB_PATH
curl -L -o sdl.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-${SDL2_VERSION}/SDL2-${SDL2_VERSION}.tar.gz && tar -xf sdl.tar.gz
cd SDL2-${SDL2_VERSION}
./configure --prefix="${GITHUB_WORKSPACE}/sdl_bin"
make && make install
- name: Test
run: |
premake5 --test gmake
make clean test
- name: Build
run: |
premake5 --sdl-config="${GITHUB_WORKSPACE}/sdl_bin/bin" gmake
make clean sdl2-frontend ebridge-tool
#- name: Package
# run: ./tools/package/itch/package.osx.sh
#- name: Deploy
# env:
# BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
# run: if [[ $GITHUB_REF_NAME =~ ^(edge|release)$ ]]; then ./tools/package/itch/push.sh; fi
freebsd-build:
runs-on: ubuntu-latest
name: Build (FreeBSD AMD64)
env:
VXT_VERSION: 1.1.1
steps:
- uses: actions/checkout@v4
- name: Test and Build
uses: vmactions/freebsd-vm@v1
with:
envs: VXT_VERSION
release: "14.1"
usesh: true
copyback: false
prepare: |
pkg install -y premake5 gmake sdl2
run: |
git config --global --add safe.directory $(pwd)
premake5 --test gmake
gmake clean test
premake5 gmake
gmake clean sdl2-frontend ebridge-tool