-
Notifications
You must be signed in to change notification settings - Fork 2
117 lines (97 loc) · 3.1 KB
/
makeobj.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
name: Nightly build makeobj
on:
push:
tags:
- 'Nightly_'
jobs:
makeobj_windows-nightly:
name: makeobj Windows
runs-on: windows-2022
steps:
- name: Setup Mingw
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: false
install: base-devel mingw-w64-i686-toolchain mingw-w64-i686-gcc mingw-w64-i686-libpng
- name: Checkout code
uses: actions/checkout@v4
- name: build
shell: msys2 {0}
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
printf 'BACKEND := posix\nOSTYPE := mingw\nOPTIMISE := 1\nSTATIC := 1\n' | cat >config.default
cd src/makeobj
make
cd ../../build/default/makeobj
strip makeobj.exe
- name: zip result
shell: pwsh
run: Compress-Archive build\default\makeobj\makeobj.exe build\default\makeobj\makeobj-windows-nightly.zip
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build\default\makeobj\makeobj-windows-nightly.zip
asset_name: makeobj-win-nightly.zip
tag: Nightly
overwrite: true
makeobj_linux-x64-nightly:
name: makeobj Linux x64
runs-on: ubuntu-20.04
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.zip
tag: Nightly
overwrite: true
makeobj-mac:
name: makeobj macOS arm
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: install_dependencies
run: |
brew reinstall cmake pkg-config libpng
- name: build
run: |
printf "#define REVISION %i\n" $(tools/get_revision.sh) > src/simutrans/revision.h
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build/src/makeobj
- name: distribute
run: |
cd build/src/makeobj
zip -r makeobj-arm-nightly.zip makeobj
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/src/makeobj/makeobj-arm-nightly.zip
asset_name: makeobj-arm-nightly.zip
tag: Nightly
overwrite: true