Rename to .gitea instaed of .github
Some checks failed
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 41s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 40s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 42s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 37s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 46s
Go Revive Lint / lint (push) Successful in 54s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 41s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 42s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 35s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 43s
CodeQL Advanced / Analyze (go) (autobuild, go) (push) Failing after 34s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 39s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 37s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 58s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 1m17s
Run Gosec / tests (push) Successful in 1m14s
Go Build Multi-Platform / Create Release (push) Has been skipped
Go Test Multi-Platform / Test (macos-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (windows-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (macos-latest, arm64) (push) Has been cancelled
Some checks failed
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 41s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 40s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 42s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 37s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 46s
Go Revive Lint / lint (push) Successful in 54s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 41s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 42s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 35s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 43s
CodeQL Advanced / Analyze (go) (autobuild, go) (push) Failing after 34s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 39s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 37s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 58s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 1m17s
Run Gosec / tests (push) Successful in 1m14s
Go Build Multi-Platform / Create Release (push) Has been skipped
Go Test Multi-Platform / Test (macos-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (windows-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (macos-latest, arm64) (push) Has been cancelled
This commit is contained in:
87
.gitea/workflows/build.yml
Normal file
87
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,87 @@
|
||||
name: Go Build Multi-Platform
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "master" ]
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches: [ "main", "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [linux, windows, darwin, freebsd]
|
||||
goarch: [amd64, arm64, arm]
|
||||
exclude:
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
build_complete: ${{ steps.build_step.outcome == 'success' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
|
||||
with:
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Build
|
||||
id: build_step
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
GOARM: ${{ matrix.goarch == 'arm' && '6' || '' }}
|
||||
run: |
|
||||
output_name="reticulum-go-${GOOS}-${GOARCH}"
|
||||
if [ "$GOOS" = "windows" ]; then
|
||||
output_name+=".exe"
|
||||
fi
|
||||
go build -v -ldflags="-s -w" -o "${output_name}" ./cmd/reticulum-go
|
||||
echo "Built: ${output_name}"
|
||||
|
||||
- name: Calculate SHA256 Checksum
|
||||
run: |
|
||||
output_name="reticulum-go-${{ matrix.goos }}-${{ matrix.goarch }}"
|
||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||
output_name+=".exe"
|
||||
fi
|
||||
sha256sum "${output_name}" > "${output_name}.sha256"
|
||||
echo "Calculated SHA256 for ${output_name}"
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5
|
||||
with:
|
||||
name: reticulum-go-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
path: reticulum-go-${{ matrix.goos }}-${{ matrix.goarch }}*
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Download All Build Artifacts
|
||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
|
||||
with:
|
||||
path: ./release-assets
|
||||
|
||||
- name: List downloaded files (for debugging)
|
||||
run: ls -R ./release-assets
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
|
||||
with:
|
||||
files: ./release-assets/*/*
|
||||
42
.gitea/workflows/codeql.yml
Normal file
42
.gitea/workflows/codeql.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main", "tinygo"]
|
||||
pull_request:
|
||||
branches: ["main", "tinygo"]
|
||||
schedule:
|
||||
- cron: "30 21 * * 6"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (go)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
packages: read
|
||||
actions: read
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [go]
|
||||
build-mode: [autobuild]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@cf1bb45a277cb3c205638b2cd5c984db1c46a412
|
||||
with:
|
||||
category: "/language:${{ matrix.language }}"
|
||||
|
||||
103
.gitea/workflows/go-test.yml
Normal file
103
.gitea/workflows/go-test.yml
Normal file
@@ -0,0 +1,103 @@
|
||||
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 across major platforms
|
||||
- os: ubuntu-latest
|
||||
goarch: amd64
|
||||
- os: windows-latest
|
||||
goarch: amd64
|
||||
- os: macos-latest
|
||||
goarch: amd64
|
||||
# ARM64 testing on supported platforms
|
||||
- os: ubuntu-latest
|
||||
goarch: arm64
|
||||
- os: macos-latest
|
||||
goarch: arm64
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Set up Go 1.25
|
||||
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
|
||||
with:
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: 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 (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..."
|
||||
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
|
||||
27
.gitea/workflows/gosec.yml
Normal file
27
.gitea/workflows/gosec.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Run Gosec
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run Gosec Security Scanner
|
||||
uses: securego/gosec@master
|
||||
with:
|
||||
args: ./...
|
||||
29
.gitea/workflows/revive.yml
Normal file
29
.gitea/workflows/revive.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Go Revive Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "master" ]
|
||||
pull_request:
|
||||
branches: [ "main", "master" ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
|
||||
with:
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Install revive
|
||||
run: go install github.com/mgechev/revive@latest
|
||||
|
||||
- name: Run revive
|
||||
run: |
|
||||
revive -config revive.toml -formatter stylish ./...
|
||||
24
.gitea/workflows/slsa-go-releaser.yml
Normal file
24
.gitea/workflows/slsa-go-releaser.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: SLSA Go releaser
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
actions: read
|
||||
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v2.1.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
config-file: .slsa-goreleaser.yml
|
||||
upload-assets: true
|
||||
|
||||
64
.gitea/workflows/tinygo.yml
Normal file
64
.gitea/workflows/tinygo.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
name: TinyGo Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "tinygo" ]
|
||||
pull_request:
|
||||
branches: [ "tinygo" ]
|
||||
|
||||
jobs:
|
||||
tinygo-build:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: tinygo-default
|
||||
target: ""
|
||||
output: reticulum-go-tinygo
|
||||
make_target: tinygo-build
|
||||
- name: tinygo-wasm
|
||||
target: wasm
|
||||
output: reticulum-go.wasm
|
||||
make_target: tinygo-wasm
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
build_complete: ${{ steps.build_step.outcome == 'success' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
|
||||
with:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Install TinyGo
|
||||
run: |
|
||||
wget https://github.com/tinygo-org/tinygo/releases/download/v0.37.0/tinygo_0.37.0_amd64.deb
|
||||
sudo dpkg -i tinygo_0.37.0_amd64.deb
|
||||
|
||||
- name: Build with TinyGo
|
||||
id: build_step
|
||||
run: |
|
||||
make ${{ matrix.make_target }}
|
||||
output_name="${{ matrix.output }}"
|
||||
if [ -f "bin/${output_name}" ]; then
|
||||
sha256sum "bin/${output_name}" | cut -d' ' -f1 > "bin/${output_name}.sha256"
|
||||
echo "Built: ${output_name}"
|
||||
echo "Generated checksum: bin/${output_name}.sha256"
|
||||
else
|
||||
echo "Build output not found: bin/${output_name}"
|
||||
ls -la bin/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: bin/${{ matrix.output }}*
|
||||
Reference in New Issue
Block a user