fix(agents): build Win7-compatible RabbitMQ agent with Go 1.20

This commit is contained in:
zipg authored and GitHub committed 2026-08-24 13:27:12 +08:00
1 parent 29b527fd3a
commit bd9f10cb5a
2 files changed
+15 -2

No files matched your search

+14 -1
View File
@@ -272,7 +272,6 @@ jobs:
["linux-aarch64"]="linux/arm64"
["linux-x64"]="linux/amd64"
["windows-aarch64"]="windows/arm64"
["windows-x64"]="windows/amd64"
)
for platform in "${!TARGETS[@]}"; do
IFS=/ read -r goos goarch <<< "${TARGETS[$platform]}"
@@ -284,6 +283,20 @@ jobs:
CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$output" .
done
ls -lh ../../../release-native
# Go 1.20 is the last release that supports Windows 7; keep other targets on Go 1.22.
- name: Set up Go for Windows 7-compatible RabbitMQ agent
uses: actions/setup-go@v5
with:
go-version: "1.20.14"
cache-dependency-path: agents/drivers/rabbitmq/go.sum
- name: Build Windows 7-compatible RabbitMQ agent
shell: bash
working-directory: agents/drivers/rabbitmq
run: |
output="../../../release-native/dbx-agent-rabbitmq-windows-x64.exe"
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o "$output" .
go version -m "$output" | tee /tmp/rabbitmq-windows-x64-build-info.txt
grep -q ': go1\.20\.14$' /tmp/rabbitmq-windows-x64-build-info.txt
- uses: actions/upload-artifact@v4
with:
name: rabbitmq-native