-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from IMLS/xgo_build
Xgo build
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Linux ARM build | ||
|
||
on: | ||
push: | ||
paths: | ||
# only trigger the action if things are changing | ||
# in the imls-wifi-sensor or in this yaml file | ||
- 'imls-wifi-sensor/**' | ||
- '.github/workflows/automate_arm_linux_build.yml' | ||
pull_request: | ||
paths: | ||
- 'imls-wifi-sensor/**' | ||
- '.github/workflows/automate_arm_linux_build.yml' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
# use the go.mod and go.sum files for deps and versioning | ||
go-version-file: imls-wifi-sensor/go.mod | ||
cache-dependency-path: imls-wifi-sensor/go.sum | ||
- name: build the executables | ||
run: | | ||
cd imls-wifi-sensor | ||
# there is a special Makefile just for gh-actions | ||
make -f Makefile.gh-actions all | ||
- name: Upload the session counter | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-session-counter | ||
path: imls-wifi-sensor/linux-session-counter | ||
- name: Upload the hardware search cli tool | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wifi-hardware-search-cli | ||
path: imls-wifi-sensor/wifi-hardware-search-cli | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.PHONY: all | ||
|
||
#VERSION := $(shell git describe --tags --abbrev=0) | ||
#LDFLAGS = "-X gsa.gov/18f/version.Semver=$(VERSION)" | ||
LDFLAGS = "-X gsa.gov/18f/version.Semver=v3.5" | ||
ENVVARS = GOOS=linux GOARCH=arm GOARM=7 GOBIN=/home/runner/work/estimating-wifi/estimating-wifi/imls-wifi-sensor | ||
|
||
all: session-counter wifi-hardware-search-cli | ||
|
||
deps: | ||
go mod download | ||
|
||
session-counter: deps | ||
${ENVVARS} go build -ldflags $(LDFLAGS) gsa.gov/18f/cmd/linux-session-counter | ||
|
||
wifi-hardware-search-cli: deps | ||
${ENVVARS} go build -ldflags $(LDFLAGS) gsa.gov/18f/cmd/wifi-hardware-search-cli |