fix(agents): build Win7-compatible RabbitMQ agent with Go 1.20
This commit is contained in:
2 files changed
+15
-2
No files matched your search
@@ -272,7 +272,6 @@ jobs:
|
|||||||
["linux-aarch64"]="linux/arm64"
|
["linux-aarch64"]="linux/arm64"
|
||||||
["linux-x64"]="linux/amd64"
|
["linux-x64"]="linux/amd64"
|
||||||
["windows-aarch64"]="windows/arm64"
|
["windows-aarch64"]="windows/arm64"
|
||||||
["windows-x64"]="windows/amd64"
|
|
||||||
)
|
)
|
||||||
for platform in "${!TARGETS[@]}"; do
|
for platform in "${!TARGETS[@]}"; do
|
||||||
IFS=/ read -r goos goarch <<< "${TARGETS[$platform]}"
|
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" .
|
CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$output" .
|
||||||
done
|
done
|
||||||
ls -lh ../../../release-native
|
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
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: rabbitmq-native
|
name: rabbitmq-native
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module github.com/t8y2/dbx/agents/drivers/rabbitmq
|
module github.com/t8y2/dbx/agents/drivers/rabbitmq
|
||||||
|
|
||||||
go 1.22
|
go 1.20
|
||||||
|
|
||||||
require github.com/rabbitmq/amqp091-go v1.13.0
|
require github.com/rabbitmq/amqp091-go v1.13.0
|
||||||
Reference in new issue
Block a user