-
Notifications
You must be signed in to change notification settings - Fork 371
228 lines (227 loc) · 9.01 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
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
name: Build Binaries
on: [push, pull_request]
jobs:
build-win64:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git make mingw-w64-x86_64-toolchain mingw-w64-x86_64-libelf mingw-w64-x86_64-avr-toolchain mingw-w64-x86_64-freeglut
- name: CI-Build
run: |
echo 'Running in MSYS2!'
make build-simavr V=1
mkdir simavr_installed
make -k install DESTDIR=$(pwd)/simavr_installed/ || true
mv simavr_installed/bin/simavr simavr_installed/bin/simavr.exe
file simavr_installed/bin/*
- uses: actions/upload-artifact@v4
with:
name: Windows 64-bit
path: simavr_installed
build-win32:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: git make mingw-w64-i686-toolchain mingw-w64-i686-libelf mingw-w64-i686-freeglut unzip
- name: Install AVR toolchain
run: |
wget "https://github.com/ZakKemble/avr-gcc-build/releases/download/v14.1.0-1/avr-gcc-14.1.0-x86-windows.zip"
unzip avr-gcc-14.1.0-x86-windows.zip
ls -l
rm avr-gcc-14.1.0-x86-windows.zip
echo "$(pwd)/avr-gcc-14.1.0-x86-windows/avr-gcc-14.1.0-x86-windows/bin" >> $GITHUB_PATH
- name: CI-Build
run: |
make build-simavr V=1
mkdir simavr_installed
make -k install DESTDIR=$(pwd)/simavr_installed/ || true
mv simavr_installed/bin/simavr simavr_installed/bin/simavr.exe
file simavr_installed/bin/*
- uses: actions/upload-artifact@v4
with:
name: Windows 32-bit
path: simavr_installed
build-lin64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependenncies
run: |
sudo apt-get update
sudo apt-get install -y build-essential git make gcc-avr avr-libc libelf-dev freeglut3-dev patchelf
- name: CI-Build
run: |
make build-simavr V=1 RELEASE=1
mkdir simavr_installed
make install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/
file simavr_installed/bin/*
patchelf --remove-needed ./libsimavr.so.1 simavr_installed/bin/simavr || true
patchelf --add-needed libsimavr.so.1 simavr_installed/bin/simavr
patchelf --set-rpath '$ORIGIN/../lib/' simavr_installed/bin/simavr
ldd simavr_installed/bin/*
simavr_installed/bin/simavr --list-cores || true
- name: Tar files
run: tar -cvf simavr.tar.gz -C simavr_installed .
- uses: actions/upload-artifact@v4
with:
name: Linux 64-bit
path: simavr.tar.gz
build-lin32:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Dependenncies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 gcc-9:i386 binutils:i386 cpp-9:i386 libelf-dev:i386 freeglut3-dev:i386 gcc-avr avr-libc patchelf
ls -l /usr/bin/*gcc*
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
- name: CI-Build
run: |
make build-simavr V=1 RELEASE=1
mkdir simavr_installed
make install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/
file simavr_installed/bin
patchelf --remove-needed ./libsimavr.so.1 simavr_installed/bin/simavr || true
patchelf --add-needed libsimavr.so.1 simavr_installed/bin/simavr
patchelf --set-rpath '$ORIGIN/../lib/' simavr_installed/bin/simavr
ldd simavr_installed/bin/*
simavr_installed/bin/simavr --list-cores || true
- name: Tar files
run: tar -cvf simavr.tar.gz -C simavr_installed .
- uses: actions/upload-artifact@v4
with:
name: Linux 32-bit
path: simavr.tar.gz
build-armv7l:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pguyot/arm-runner-action@v2
id: build_image
with:
cpu: cortex-a7
base_image: raspios_lite:latest
copy_artifact_path: simavr.tar.gz
image_additional_mb: 1024
commands: |
df -h /
sudo apt-get update
sudo apt-get install -y build-essential git make gcc-avr avr-libc libelf-dev freeglut3-dev patchelf file
make -j4 build-simavr V=1 RELEASE=1
mkdir simavr_installed
make -j4 install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/
file simavr_installed/bin/*
patchelf --remove-needed ./libsimavr.so.1 simavr_installed/bin/simavr || true
patchelf --add-needed libsimavr.so.1 simavr_installed/bin/simavr
patchelf --set-rpath '$ORIGIN/../lib/' simavr_installed/bin/simavr
ldd simavr_installed/bin/*
simavr_installed/bin/simavr --list-cores || true
tar -cvf simavr.tar.gz -C simavr_installed .
- uses: actions/upload-artifact@v4
with:
name: Linux ARMv7l
path: simavr.tar.gz
build-armv6l:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pguyot/arm-runner-action@v2
id: build_image
with:
cpu: arm1176
base_image: raspios_lite:latest
copy_artifact_path: simavr.tar.gz
image_additional_mb: 1024
commands: |
df -h /
sudo apt-get update
sudo apt-get install -y build-essential git make gcc-avr avr-libc libelf-dev freeglut3-dev patchelf file
make build-simavr V=1 RELEASE=1
mkdir simavr_installed
make install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/
file simavr_installed/bin/*
patchelf --remove-needed ./libsimavr.so.1 simavr_installed/bin/simavr || true
patchelf --add-needed libsimavr.so.1 simavr_installed/bin/simavr
patchelf --set-rpath '$ORIGIN/../lib/' simavr_installed/bin/simavr
ldd simavr_installed/bin/*
simavr_installed/bin/simavr --list-cores || true
tar -cvf simavr.tar.gz -C simavr_installed .
- uses: actions/upload-artifact@v4
with:
name: Linux ARMv6l
path: simavr.tar.gz
build-aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pguyot/arm-runner-action@v2
id: build_image
with:
cpu: cortex-a53
base_image: raspios_lite_arm64:latest
copy_artifact_path: simavr.tar.gz
image_additional_mb: 1024
commands: |
df -h /
sudo apt-get install -y build-essential git make gcc-avr avr-libc libelf-dev freeglut3-dev patchelf file
make -j4 build-simavr V=1 RELEASE=1
mkdir simavr_installed
make -j4 install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/
file simavr_installed/bin/*
patchelf --remove-needed ./libsimavr.so.1 simavr_installed/bin/simavr || true
patchelf --add-needed libsimavr.so.1 simavr_installed/bin/simavr
patchelf --set-rpath '$ORIGIN/../lib/' simavr_installed/bin/simavr
ldd simavr_installed/bin/*
simavr_installed/bin/simavr --list-cores || true
tar -cvf simavr.tar.gz -C simavr_installed .
- uses: actions/upload-artifact@v4
with:
name: Linux AArch64
path: simavr.tar.gz
build-darwin-x64:
# this is currently macos-11, Big Sur
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependenncies
run: |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install make libelf freeglut patchelf
HOMEBREW_NO_INSTALL_FROM_API=1 brew tap osx-cross/avr
HOMEBREW_NO_INSTALL_FROM_API=1 brew install avr-gcc@9 avr-binutils
export PATH="/usr/local/opt/avr-gcc@9/bin:$PATH"
- name: CI-Build
run: |
avr-gcc --version || true
clang --version
export CFLAGS="-DGL_SILENCE_DEPRECATION"
make -j4 build-simavr V=1 RELEASE=1
mkdir simavr_installed
make -k -j4 install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/ || true
file simavr_installed/bin/*
otool -L simavr_installed/bin/*
simavr_installed/bin/simavr --list-cores || true
- name: Tar files
run: tar -cvf simavr.tar.gz -C simavr_installed .
- uses: actions/upload-artifact@v4
with:
name: Mac OS Intel 64-bit
path: simavr.tar.gz