From 0ac2a8d200ed30126469c8bc498d268a4fed9407 Mon Sep 17 00:00:00 2001 From: Ivan Date: Sat, 27 Sep 2025 05:54:30 -0500 Subject: [PATCH] Add binary execution tests for Linux, macOS, and Windows in CI workflow. Enhance ARM cross-compilation testing with specific environment variables. --- .github/workflows/go-test.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 1b6147e..93689bc 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -64,11 +64,38 @@ jobs: echo "Testing build for current platform (${{ matrix.os }}, ${{ matrix.goarch }})..." go build -v ./cmd/reticulum-go + - name: Test binary execution (Linux/macOS) + if: matrix.os != 'windows-latest' + run: | + echo "Testing binary execution on (${{ matrix.os }}, ${{ matrix.goarch }})..." + timeout 5s ./reticulum-go || echo "Binary started successfully (timeout expected)" + + - name: Test binary execution (Windows) + if: matrix.os == 'windows-latest' + run: | + echo "Testing binary execution on (${{ matrix.os }}, ${{ matrix.goarch }})..." + # Start the binary and kill after 5 seconds to verify it can start + Start-Process -FilePath ".\reticulum-go.exe" -NoNewWindow + Start-Sleep -Seconds 5 + Stop-Process -Name "reticulum-go" -Force -ErrorAction SilentlyContinue + echo "Binary started successfully" + shell: pwsh + - name: Test cross-compilation (AMD64 runners only) if: matrix.goarch == 'amd64' run: | echo "Testing ARM64 cross-compilation from AMD64..." - GOOS=linux GOARCH=arm64 go build -v ./cmd/reticulum-go + go build -v ./cmd/reticulum-go + env: + GOOS: linux + GOARCH: arm64 + - name: Test ARMv6 cross-compilation (AMD64 runners only) + if: matrix.goarch == 'amd64' + run: | echo "Testing ARMv6 cross-compilation from AMD64..." - GOOS=linux GOARCH=arm GOARM=6 go build -v ./cmd/reticulum-go + go build -v ./cmd/reticulum-go + env: + GOOS: linux + GOARCH: arm + GOARM: 6