Skip to content

Commit

Permalink
add build for armv6
Browse files Browse the repository at this point in the history
  • Loading branch information
vernak2539 committed Sep 23, 2022
1 parent 6e4234e commit 8eb726a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build_and_publish.yml
Expand Up @@ -7,10 +7,8 @@ jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Install GCC Support Materials
run: sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc
- name: Install compilers
run: sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- name: Install GCC
run: sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- uses: actions/checkout@v2
- uses: rymndhng/release-on-push-action@master
env:
Expand Down
12 changes: 8 additions & 4 deletions Makefile
Expand Up @@ -3,8 +3,12 @@ run:
go run cmd/main.go

.PHONY: build_all
build_all: build_pi_zero
build_all: build_arm6 build_arm7

.PHONY: build_pi_zero
build_pi_zero:
env CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 GOOS=linux GOARM=7 GOARCH=arm go build -o build/dht_sensor_exporter-$(VERSION)-linux-armv7 ./cmd/main.go
.PHONY: build_arm7
build_arm7:
env CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 GOOS=linux GOARM=7 GOARCH=arm go build -o build/dht_sensor_exporter-$(VERSION)-linux-armv7 ./cmd/main.go

.PHONY: build_arm6
build_arm6:
env CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 GOOS=linux GOARM=6 GOARCH=arm go build -o build/dht_sensor_exporter-$(VERSION)-linux-armv7 ./cmd/main.go

0 comments on commit 8eb726a

Please sign in to comment.