Skip to content

Commit

Permalink
Merge pull request #281 from iegomez/fix/disable-buildcvs-on-release-…
Browse files Browse the repository at this point in the history
…binaries-build

Fix binary builds by disabling buildcvs.
  • Loading branch information
iegomez committed May 24, 2023
2 parents 83fa4e2 + 608a1e6 commit 9fbd607
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ env:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: download mosquitto
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ cp *.h /usr/include
cd /usr/src/mosquitto-go-auth

#build amd64 Linux
make
make without-vcs
cp go-auth.so pw /usr/src/output/linux-amd64

# build arm64 Linux
make clean
export CGO_ENABLED=1
export GOARCH=arm64
export CC=aarch64-linux-gnu-gcc
make
make without-vcs
cp go-auth.so pw /usr/src/output/linux-arm64

# build armv7 Linux
Expand All @@ -24,7 +24,7 @@ export CGO_ENABLED=1
export GOARCH=arm
export GOARM=7
export CC=arm-linux-gnueabi-gcc
make
make without-vcs
cp go-auth.so pw /usr/src/output/linux-armv7

# build armv7 Linux
Expand All @@ -33,5 +33,5 @@ export CGO_ENABLED=1
export GOARCH=arm
export GOARM=6
export CC=arm-linux-gnueabi-gcc
make
make without-vcs
cp go-auth.so pw /usr/src/output/linux-armv6
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ all:
env CGO_LDFLAGS="$(LDFLAGS)" go build -buildmode=c-shared -o go-auth.so
go build pw-gen/pw.go

without-vcs:
@echo "Bulding for $(UNAME_S)"
env CGO_CFLAGS="$(CFLAGS)" go build -buildvcs=false -buildmode=c-archive go-auth.go
env CGO_LDFLAGS="$(LDFLAGS)" go build -buildvcs=false -buildmode=c-shared -o go-auth.so
go build -buildvcs=false pw-gen/pw.go

test:
cd plugin && make
go test ./backends ./cache ./hashing -v -count=1
Expand Down

0 comments on commit 9fbd607

Please sign in to comment.