diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2322d56..933e278 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,11 +4,11 @@ on: release: types: ["published"] pull_request: - branches: ["main"] + branches: ["armhv"] env: GOLANG_VERSION: "1.22" - + jobs: build: name: Build OS-Agent @@ -19,6 +19,16 @@ jobs: with: fetch-depth: 0 # Needed for changelog generation + - name: Install gnueabihf + run: | + sudo apt-get -y update \ + && sudo apt-get -y install \ + gcc-arm-linux-gnueabihf \ + wget \ + curl \ + git \ + build-essential + - name: Setup go ${{ env.GOLANG_VERSION }} uses: actions/setup-go@v5 with: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 0bbeaab..aef17e5 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -4,7 +4,7 @@ on: push: # branches to consider in the event; optional, defaults to all branches: - - main + - armhv jobs: update_release_draft: diff --git a/.gitignore b/.gitignore index 849ddff..79e4d90 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ dist/ +/.idea/vcs.xml +/.idea/.gitignore +/.idea/modules.xml +/.idea/os-agent.iml +/.idea/inspectionProfiles/Project_Default.xml diff --git a/.goreleaser.yml b/.goreleaser.yml index 6fc57c4..25e5820 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -7,7 +7,9 @@ before: - go generate ./... builds: - env: - - CGO_ENABLED=0 + - CGO_ENABLED=1 + - CC=arm-linux-gnueabihf-gcc + - CC_FOR_TARGET=gcc-arm-linux-gnueabihf binary: os-agent ldflags: - -s -w @@ -16,13 +18,8 @@ builds: goos: - linux goarch: - - 386 - - amd64 - arm - - arm64 goarm: - - 5 - - 6 - 7 checksum: @@ -49,7 +46,7 @@ nfpms: {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else if eq .Arch "arm64" }}aarch64 - {{- else }}{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }} + {{- else }}armhf {{ with .Mips }}_{{ . }}{{ end }} {{ end }} contents: