All checks were successful
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 1m18s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 1m14s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 1m12s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 1m16s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 30s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 1m58s
Go Revive Lint / lint (push) Successful in 1m31s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 2m1s
Run Gosec / tests (push) Successful in 2m31s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 9m48s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 9m43s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 9m44s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 9m46s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 9m41s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 9m39s
Go Build Multi-Platform / Create Release (push) Has been skipped
86 lines
2.4 KiB
YAML
86 lines
2.4 KiB
YAML
name: Go Test Multi-Platform
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (${{ matrix.os }}, ${{ matrix.goarch }})
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# AMD64 testing on Linux
|
|
- os: ubuntu-latest
|
|
goarch: amd64
|
|
# ARM64 testing on Linux
|
|
- os: ubuntu-latest
|
|
goarch: arm64
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: https://git.quad4.io/actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
- name: Set up Go 1.25
|
|
uses: https://git.quad4.io/actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Cache Go modules
|
|
uses: https://git.quad4.io/actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
|
with:
|
|
path: |
|
|
~/go/pkg/mod
|
|
~/.cache/go-build
|
|
key: ${{ runner.os }}-go-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-${{ matrix.goarch }}-
|
|
|
|
- name: Run Go tests
|
|
run: go test -v ./...
|
|
|
|
- name: Run Go tests with race detector (Linux AMD64 only)
|
|
if: matrix.os == 'ubuntu-latest' && matrix.goarch == 'amd64'
|
|
run: go test -race -v ./...
|
|
|
|
- name: Test build (ensure compilation works)
|
|
run: |
|
|
# Test that we can build for the current platform
|
|
echo "Testing build for current platform (${{ matrix.os }}, ${{ matrix.goarch }})..."
|
|
go build -v ./cmd/reticulum-go
|
|
|
|
- name: Test binary execution
|
|
run: |
|
|
echo "Testing binary execution on (${{ matrix.os }}, ${{ matrix.goarch }})..."
|
|
timeout 5s ./reticulum-go || echo "Binary started successfully (timeout expected)"
|
|
|
|
- name: Test cross-compilation (AMD64 runners only)
|
|
if: matrix.goarch == 'amd64'
|
|
run: |
|
|
echo "Testing ARM64 cross-compilation from AMD64..."
|
|
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..."
|
|
go build -v ./cmd/reticulum-go
|
|
env:
|
|
GOOS: linux
|
|
GOARCH: arm
|
|
GOARM: 6
|