ci: unify workflows - split build per component, single tag-triggered pipeline
CI / server-core-test (push) Failing after 4s
CI / device-agent-test (push) Failing after 4s
CI / dashboard-test (push) Failing after 4s
CI / build-docs (push) Failing after 9s
CI / build-server-core (push) Has been skipped
CI / build-device-agent (push) Has been skipped
CI / build-dashboard (push) Has been skipped
CI / release (push) Has been skipped
CI / server-core-test (push) Failing after 4s
CI / device-agent-test (push) Failing after 4s
CI / dashboard-test (push) Failing after 4s
CI / build-docs (push) Failing after 9s
CI / build-server-core (push) Has been skipped
CI / build-device-agent (push) Has been skipped
CI / build-dashboard (push) Has been skipped
CI / release (push) Has been skipped
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
name: Build Device Agent
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
cross-build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [linux, windows]
|
||||
goarch: [amd64, arm64]
|
||||
exclude:
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
defaults:
|
||||
run:
|
||||
working-directory: apps/device-agent
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.26'
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
CGO_ENABLED: '0'
|
||||
GOOS: ${{ matrix.goos }}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
run: |
|
||||
EXT=""
|
||||
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
|
||||
go build -o bin/nexus-device-agent-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} .
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: nexus-device-agent-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
path: apps/device-agent/bin/nexus-device-agent-*
|
||||
Reference in New Issue
Block a user