-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-build.yml
More file actions
62 lines (55 loc) · 2.27 KB
/
Copy pathdocker-compose-build.yml
File metadata and controls
62 lines (55 loc) · 2.27 KB
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
services:
native-build:
image: debian:bookworm
platform: linux/amd64 # Keep amd64 for testing, use arm64 for production F-Droid builds
container_name: native-build
working_dir: /build
tty: true
environment:
DEBIAN_FRONTEND: noninteractive
ANDROID_NDK_HOME: /opt/android-ndk
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:-0}
TZ: UTC
volumes:
- .:/build
- build-cache:/build/sources # Cache source repositories
command: >
bash -c "
set -euo pipefail
echo '📦 Installing system dependencies...'
apt-get update -qq
apt-get install -y -qq --no-install-recommends ca-certificates curl wget git make pkg-config build-essential file unzip python3 gawk
echo '✅ Base dependencies installed'
echo '📦 Installing development libraries...'
apt-get install -y -qq --no-install-recommends libarchive-dev uthash-dev swig xsltproc strace
echo '✅ Development libraries installed'
echo '📦 Setting up Debian backports...'
echo 'deb http://deb.debian.org/debian bookworm-backports main' > /etc/apt/sources.list.d/backports.list
apt-get update -qq
echo '✅ Debian backports configured'
echo '📦 Installing Go from Debian backports...'
apt-get install -y -qq --no-install-recommends -t bookworm-backports golang-go
echo '✅ Go installed from Debian backports'
echo '📦 Installing Android NDK...'
if [ ! -d "/opt/android-ndk" ]; then
mkdir -p /opt
cd /opt
curl -L -o ndk.zip https://dl.google.com/android/repository/android-ndk-r26b-linux.zip
unzip -q ndk.zip
mv android-ndk-r26b android-ndk
rm ndk.zip
echo '✅ Android NDK installed'
else
echo '✅ Android NDK already exists, skipping installation'
fi
update-ca-certificates
echo '🎯 Starting build-go-binaries.sh process (includes PRoot now)...'
chmod +x /build/build-go-binaries.sh
chmod +x /build/build-native-binaries.sh
/build/build-go-binaries.sh
echo '🎯 Build completed successfully!'
"
volumes:
build-cache:
driver: local