Skip to content

Commit

Permalink
Disable CGO (#176)
Browse files Browse the repository at this point in the history
CGO is not required by pgroll, disable it so builds are more compatible

---------

Co-authored-by: Andrew Farries <[email protected]>
  • Loading branch information
exekias and andrew-farries authored Oct 6, 2023
1 parent 7abefeb commit a24eeef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ jobs:
go-version: '1.21'

- name: Build pgroll (Linux amd64)
run: GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.linux.amd64
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.linux.amd64

- name: Build pgroll (Linux arm64)
run: GOOS=linux GOARCH=arm64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.linux.arm64
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.linux.arm64

- name: Build pgroll (MacOS amd64)
run: GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.macos.amd64
run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.macos.amd64

- name: Build pgroll (MacOS arm64)
run: GOOS=darwin GOARCH=arm64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.macos.arm64
run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.macos.arm64

- name: Build pgroll (Windows)
run: GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.win.amd64
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/xataio/pgroll/cmd.Version=${PGROLL_VERSION}" -o pgroll.win.amd64

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit a24eeef

Please sign in to comment.