-
Notifications
You must be signed in to change notification settings - Fork 2
203 lines (173 loc) · 6.13 KB
/
linux64.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
name: Nightly build Linux x64
on:
push:
tags:
- 'Nightly'
jobs:
set-revision:
name: set revision
runs-on: ubuntu-20.04
outputs:
output1: ${{ steps.out1.outputs.revision }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: detect revision
run: |
read text < ./src/simutrans/revision.h
revision=${text:17:5}
echo "revision=$revision" >> $GITHUB_ENV
- id: out1
run: echo "revision=$revision" >> $GITHUB_OUTPUT
makeobj_linux-x64-nightly:
name: makeobj
runs-on: ubuntu-20.04
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: install_dependencies
run: |
sudo apt-get -y update
sudo apt-get -ym install autoconf
sudo apt-get -ym install libpng-dev
sudo apt-get -ym install libbz2-dev
- name: setup
run: |
autoconf
./configure
echo "STATIC = 1" >>config.default
cat config.default >>/dev/stderr
- name: make makeobj
run: |
cd src/makeobj
make
- name: zip result
run: |
cd src/makeobj
zip -r -9 makeobj_linux-x64-nightly.zip makeobj
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/makeobj/makeobj_linux-x64-nightly.zip
asset_name: makeobj_linux-x64-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
simulinux-x64-nightly:
name: simutrans SDL2
runs-on: ubuntu-20.04
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: install_dependencies
run: |
sudo apt-get -y update
sudo apt-get -ym install libsdl2-dev
sudo apt-get -ym install libfreetype6-dev
sudo apt-get -ym install libfontconfig-dev
sudo apt-get -ym install libbz2-dev
sudo apt-get -ym install libminiupnpc-dev
sudo apt-get -ym install libzstd-dev
# We build fluidsynth with the minimum set of options we need to keep dependencies low
sudo apt-get -ym install libsndfile1-dev
wget https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.0.tar.gz
tar xf v*.tar.gz
cd fluidsynth*
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -Denable-aufile=0 -Denable-dbus=0 -Denable-ipv6=0 -Denable-jack=0 -Denable-ladspa=0 -Denable-midishare=0 -Denable-opensles=0 -Denable-oboe=0 -Denable-oss=0 -Denable-readline=0 -Denable-winmidi=0 -Denable-waveout=0 -Denable-network=0 -Denable-pulseaudio=0 -Denable-dsound=0 -Denable-alsa=0 -Denable-libinstpatch=0 -Denable-portaudio=0 -Denable-wasapi=0 -Denable-openmp=1 -Denable-libsndfile=1 -Denable-sdl2=1
cmake --build build -j $(nproc)
sudo cmake --install build
- name: setup
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DOPTION_BUNDLE_LIBRARIES=ON
cp ./revision.h ./build/revision.h
cmake --build build -j$(nproc) --target install
- name: distribute
run: |
chmod -v 755 ./tools/lang_files_standard.sh
./tools/lang_files_standard.sh
cp simutrans/text/* build/simutrans/text
cd build
zip -r simulinux-x64-nightly.zip simutrans
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/simulinux-x64-nightly.zip
asset_name: simulinux-x64-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
simulinux-posix-x64_nightly:
name: simutrans posix
runs-on: ubuntu-20.04
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: install_dependencies
run: |
sudo apt-get -y update
sudo apt-get -ym install autoconf
sudo apt-get -ym install libbz2-dev
- name: setup
run: |
cd libs/zstd-1.5.2/lib
make
cd ../../../
autoconf
./configure
echo "CFLAGS += -std=c++2a " >>config.default
echo "STATIC := 1" >>config.default
echo "BACKEND = posix" >>config.default
cat config.default >>/dev/stderr
- name: make
run: |
make
- name: distribute
run: |
chmod -v 755 ./tools/lang_files_standard.sh
./tools/lang_files_standard.sh
zip -r simulinux_posix-x64-nightly.zip simutrans
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: simulinux_posix-x64-nightly.zip
asset_name: simulinux_posix-x64-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
nettool-linux:
name: Nettool
runs-on: ubuntu-20.04
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: install_dependencies
run: |
sudo apt-get -y update
sudo apt-get -ym install autoconf
- name: setup
run: |
autoconf
./configure
echo "CFLAGS += -std=c++2a " >>config.default
echo "STATIC = 1" >>config.default
cat config.default >>/dev/stderr
- name: make
run: |
cd src/nettool
make
- name: zip result
run: |
cd src/nettool
zip -r -9 nettool_linux-x64-nightly.zip nettool
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/nettool/nettool_linux-x64-nightly.zip
asset_name: nettool_linux-x64-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true