3 Commits

Author SHA1 Message Date
Adrian Zürcher
c47a664f1f simplify code by adding matrix
Some checks failed
Build Process Supervisor / build (amd64, , linux) (push) Failing after 4m42s
Build Process Supervisor / build (amd64, .exe, windows) (push) Failing after 4m43s
Build Process Supervisor / build (arm, 6, , linux) (push) Has been cancelled
Build Process Supervisor / build (arm64, , linux) (push) Failing after 5m12s
2025-08-05 13:43:22 +02:00
9a1bb814ee .gitea/workflows/build.yaml aktualisiert
All checks were successful
Build Process Supervisor / build (push) Successful in 13m4s
2025-08-05 13:11:24 +02:00
d2a563588c Remove dir change
Some checks failed
Build Process Supervisor / build (push) Failing after 7m14s
2025-08-05 12:38:10 +02:00

View File

@@ -1,59 +1,58 @@
name: Build Process Supervisor name: Build Process Supervisor
on: [push] on:
push:
env: tags:
APP_NAME: processSupervisor - '*'
jobs: env:
build: APP_NAME: processSupervisor
runs-on: ubuntu-latest
jobs:
steps: build:
- name: Checkout repo runs-on: ubuntu-latest
uses: actions/checkout@v4
strategy:
- name: Set up Go matrix:
uses: actions/setup-go@v4 include:
with: - os: windows
go-version: 'stable' arch: amd64
ext: .exe
- name: Build for Windows amd64 - os: linux
run: | arch: amd64
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o bin/${APP_NAME}-windows-amd64.exe ./... ext: ""
- os: linux
- name: Upload Windows amd64 binary arch: arm64
uses: actions/upload-artifact@v3 ext: ""
with: - os: linux
name: ${{env.APP_NAME}}-windows-amd64.exe arch: arm
path: bin/${{env.APP_NAME}}-windows-amd64.exe arm_version: 6
ext: ""
- name: Build for Linux amd64
run: | steps:
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o bin/${APP_NAME}-linux-amd64 ./... - name: Checkout repo
uses: actions/checkout@v4
- name: Upload Linux amd64
uses: actions/upload-artifact@v3 - name: Set up Go
with: uses: actions/setup-go@v4
name: ${{env.APP_NAME}}-linux-amd64 with:
path: bin/${{env.APP_NAME}}-linux-amd64 go-version: 'stable'
- name: Build for Linux arm64 - name: Build binaries
run: | run: |
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -trimpath -o bin/${APP_NAME}-linux-arm64 ./... OUTPUT="bin/${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}"
if [ "${{ matrix.arm_version }}" != "" ]; then
- name: Upload Linux arm64 OUTPUT="${OUTPUT}v${{ matrix.arm_version }}"
uses: actions/upload-artifact@v3 fi
with: OUTPUT="${OUTPUT}${{ matrix.ext }}"
name: ${{env.APP_NAME}}-linux-arm64 echo "Building $OUTPUT"
path: bin/${{env.APP_NAME}}-linux-arm64 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} \
{{ matrix.arm_version && format('GOARM={0}', matrix.arm_version) || '' }} \
- name: Build for Linux armv6 (Raspberry Pi) go build -ldflags="-s -w" -trimpath -o "$OUTPUT"
run: | shell: bash
GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -trimpath -o bin/${APP_NAME}-linux-armv6 ./...
- name: Upload artifacts
- name: Upload Linux armv6 (Raspberry Pi) uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v3 with:
with: name: ${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.arm_version && format('v{0}', matrix.arm_version) || '' }}${{ matrix.ext }}
name: ${{env.APP_NAME}}-linux-armv6 path: bin/${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.arm_version && format('v{0}', matrix.arm_version) || '' }}${{ matrix.ext }}
path: bin/${{env.APP_NAME}}-linux-armv6