|
|
|
@@ -13,7 +13,7 @@ env:
|
|
|
|
|
# The go version to use for builds. We set check-latest to true when
|
|
|
|
|
# installing, so we get the latest patch version that matches the
|
|
|
|
|
# expression.
|
|
|
|
|
GO_VERSION: "~1.24.0"
|
|
|
|
|
GO_VERSION: "~1.25.0"
|
|
|
|
|
|
|
|
|
|
# Optimize compatibility on the slow architectures.
|
|
|
|
|
GOMIPS: softfloat
|
|
|
|
@@ -26,7 +26,8 @@ env:
|
|
|
|
|
BUILD_USER: builder
|
|
|
|
|
BUILD_HOST: github.syncthing.net
|
|
|
|
|
|
|
|
|
|
TAGS: "netgo osusergo sqlite_omit_load_extension sqlite_dbstat"
|
|
|
|
|
TAGS: "sqlite_omit_load_extension sqlite_dbstat"
|
|
|
|
|
TAGS_LINUX: "sqlite_omit_load_extension sqlite_dbstat netgo osusergo"
|
|
|
|
|
|
|
|
|
|
# A note on actions and third party code... The actions under actions/ (like
|
|
|
|
|
# `uses: actions/checkout`) are maintained by GitHub, and we need to trust
|
|
|
|
@@ -102,7 +103,7 @@ jobs:
|
|
|
|
|
runner: ["windows-latest", "ubuntu-latest", "macos-latest"]
|
|
|
|
|
# The oldest version in this list should match what we have in our go.mod.
|
|
|
|
|
# Variables don't seem to be supported here, or we could have done something nice.
|
|
|
|
|
go: ["~1.23.0", "~1.24.0"]
|
|
|
|
|
go: ["~1.24.0", "~1.25.0"]
|
|
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
|
|
steps:
|
|
|
|
|
- name: Set git to use LF
|
|
|
|
@@ -310,19 +311,19 @@ jobs:
|
|
|
|
|
run: |
|
|
|
|
|
sudo apt-get install -y gcc-mips64-linux-gnuabi64 gcc-mips64el-linux-gnuabi64
|
|
|
|
|
for tgt in syncthing stdiscosrv strelaysrv ; do
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch amd64 -cc "zig cc -target x86_64-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch 386 -cc "zig cc -target x86-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch arm -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch arm64 -cc "zig cc -target aarch64-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch mips -cc "zig cc -target mips-linux-musleabi" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch mipsle -cc "zig cc -target mipsel-linux-musleabi" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch mips64 -cc mips64-linux-gnuabi64-gcc tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch mips64le -cc mips64el-linux-gnuabi64-gcc tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch riscv64 -cc "zig cc -target riscv64-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch s390x -cc "zig cc -target s390x-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch loong64 -cc "zig cc -target loongarch64-linux-musl" tar "$tgt"
|
|
|
|
|
# go run build.go -tags "${{env.TAGS}}" -goos linux -goarch ppc64 -cc "zig cc -target powerpc64-linux-musl" tar "$tgt" # fails with linkmode not supported
|
|
|
|
|
go run build.go -tags "${{env.TAGS}}" -goos linux -goarch ppc64le -cc "zig cc -target powerpc64le-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch amd64 -cc "zig cc -target x86_64-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch 386 -cc "zig cc -target x86-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch arm -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch arm64 -cc "zig cc -target aarch64-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch mips -cc "zig cc -target mips-linux-musleabi" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch mipsle -cc "zig cc -target mipsel-linux-musleabi" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch mips64 -cc mips64-linux-gnuabi64-gcc tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch mips64le -cc mips64el-linux-gnuabi64-gcc tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch riscv64 -cc "zig cc -target riscv64-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch s390x -cc "zig cc -target s390x-linux-musl" tar "$tgt"
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch loong64 -cc "zig cc -target loongarch64-linux-musl" tar "$tgt"
|
|
|
|
|
# go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch ppc64 -cc "zig cc -target powerpc64-linux-musl" tar "$tgt" # fails with linkmode not supported
|
|
|
|
|
go run build.go -tags "${{env.TAGS_LINUX}}" -goos linux -goarch ppc64le -cc "zig cc -target powerpc64le-linux-musl" tar "$tgt"
|
|
|
|
|
done
|
|
|
|
|
env:
|
|
|
|
|
CGO_ENABLED: "1"
|
|
|
|
@@ -704,10 +705,10 @@ jobs:
|
|
|
|
|
- name: Package for Debian (CGO)
|
|
|
|
|
run: |
|
|
|
|
|
for tgt in syncthing stdiscosrv strelaysrv ; do
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS}}" -goos linux -goarch amd64 -cc "zig cc -target x86_64-linux-musl" deb "$tgt"
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS}}" -goos linux -goarch armel -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" deb "$tgt"
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS}}" -goos linux -goarch armhf -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" deb "$tgt"
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS}}" -goos linux -goarch arm64 -cc "zig cc -target aarch64-linux-musl" deb "$tgt"
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS_LINUX}}" -goos linux -goarch amd64 -cc "zig cc -target x86_64-linux-musl" deb "$tgt"
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS_LINUX}}" -goos linux -goarch armel -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" deb "$tgt"
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS_LINUX}}" -goos linux -goarch armhf -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" deb "$tgt"
|
|
|
|
|
go run build.go -no-upgrade -installsuffix=no-upgrade -tags "${{env.TAGS_LINUX}}" -goos linux -goarch arm64 -cc "zig cc -target aarch64-linux-musl" deb "$tgt"
|
|
|
|
|
done
|
|
|
|
|
env:
|
|
|
|
|
BUILD_USER: debian
|
|
|
|
@@ -993,15 +994,15 @@ jobs:
|
|
|
|
|
- name: Build binaries (CGO)
|
|
|
|
|
run: |
|
|
|
|
|
# amd64
|
|
|
|
|
go run build.go -goos linux -goarch amd64 -tags "${{env.TAGS}}" -cc "zig cc -target x86_64-linux-musl" -no-upgrade build ${{ matrix.pkg }}
|
|
|
|
|
go run build.go -goos linux -goarch amd64 -tags "${{env.TAGS_LINUX}}" -cc "zig cc -target x86_64-linux-musl" -no-upgrade build ${{ matrix.pkg }}
|
|
|
|
|
mv ${{ matrix.pkg }} ${{ matrix.pkg }}-linux-amd64
|
|
|
|
|
|
|
|
|
|
# arm64
|
|
|
|
|
go run build.go -goos linux -goarch arm64 -tags "${{env.TAGS}}" -cc "zig cc -target aarch64-linux-musl" -no-upgrade build ${{ matrix.pkg }}
|
|
|
|
|
go run build.go -goos linux -goarch arm64 -tags "${{env.TAGS_LINUX}}" -cc "zig cc -target aarch64-linux-musl" -no-upgrade build ${{ matrix.pkg }}
|
|
|
|
|
mv ${{ matrix.pkg }} ${{ matrix.pkg }}-linux-arm64
|
|
|
|
|
|
|
|
|
|
# arm
|
|
|
|
|
go run build.go -goos linux -goarch arm -tags "${{env.TAGS}}" -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" -no-upgrade build ${{ matrix.pkg }}
|
|
|
|
|
go run build.go -goos linux -goarch arm -tags "${{env.TAGS_LINUX}}" -cc "zig cc -target arm-linux-musleabi -mcpu=arm1136j_s" -no-upgrade build ${{ matrix.pkg }}
|
|
|
|
|
mv ${{ matrix.pkg }} ${{ matrix.pkg }}-linux-arm
|
|
|
|
|
env:
|
|
|
|
|
CGO_ENABLED: "1"
|
|
|
|
|