Files
Reticulum-Go/.gitea/workflows/go-test.yml
Sudo-Ivan 1ad1f3cfd2
Some checks failed
Bearer / scan (push) Successful in 42s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 40s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 39s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 37s
Go Build Multi-Platform / build (wasm, js) (push) Successful in 49s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 52s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 53s
TinyGo Build / tinygo-build (tinygo-build, tinygo-default, reticulum-go-tinygo, ) (pull_request) Failing after 54s
TinyGo Build / tinygo-build (tinygo-wasm, tinygo-wasm, reticulum-go.wasm, wasm) (pull_request) Failing after 1m0s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 57s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Failing after 1m45s
Go Revive Lint / lint (push) Successful in 49s
Run Gosec / tests (push) Successful in 1m44s
Go Build Multi-Platform / Create Release (push) Has been cancelled
Go Build Multi-Platform / build (amd64, darwin) (push) Has been cancelled
Go Build Multi-Platform / build (arm64, freebsd) (push) Has been cancelled
Go Build Multi-Platform / build (arm64, darwin) (push) Has been cancelled
Go Build Multi-Platform / build (arm, windows) (push) Has been cancelled
Go Build Multi-Platform / build (amd64, linux) (push) Has been cancelled
Go Build Multi-Platform / build (arm, freebsd) (push) Has been cancelled
feat: enhance CI workflow by adding Node.js setup and WebAssembly test/build steps for Linux AMD64
2025-12-30 19:18:53 -06:00

106 lines
3.1 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: Setup Task
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
with:
version: '3.46.3'
- 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: Set up Node.js
if: matrix.os == 'ubuntu-latest' && matrix.goarch == 'amd64'
uses: https://git.quad4.io/actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version: '22'
- name: Run tests
run: task test
- name: Run tests with race detector (Linux AMD64 only)
if: matrix.os == 'ubuntu-latest' && matrix.goarch == 'amd64'
run: task test-race
- name: Run WebAssembly tests (Linux AMD64 only)
if: matrix.os == 'ubuntu-latest' && matrix.goarch == 'amd64'
run: |
chmod +x misc/wasm/go_js_wasm_exec
task test-wasm
- name: Test build (ensure compilation works)
run: |
echo "Testing build for current platform (${{ matrix.os }}, ${{ matrix.goarch }})..."
task build
- name: Test WebAssembly build (Linux AMD64 only)
if: matrix.os == 'ubuntu-latest' && matrix.goarch == 'amd64'
run: task build-wasm
- name: Test binary execution
run: |
echo "Testing binary execution on (${{ matrix.os }}, ${{ matrix.goarch }})..."
timeout 5s ./bin/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..."
GOOS=linux GOARCH=arm64 task build
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 task build
env:
GOOS: linux
GOARCH: arm
GOARM: 6