Skip to content

Commit

Permalink
add go mod tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachard committed Feb 19, 2024
1 parent 92d38f0 commit 0ae9af7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
go-freebsd:
runs-on: ubuntu-latest
Expand All @@ -71,7 +73,9 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: build binary
run: CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
# for macos and window, limit the build to the latest version
go-macos:
Expand All @@ -88,7 +92,9 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: build binary
run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
go-win:
runs-on: windows-latest
Expand All @@ -106,6 +112,7 @@ jobs:
- name: build binary
run: |
set CGO_ENABLED=0
go mod tidy
go build -ldflags="-s -w" -o go-dnscollector.exe .
docker:
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/testing-dnstap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
python-version: 3.12

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
- name: Deploy docker image
run: |
Expand Down Expand Up @@ -72,7 +74,9 @@ jobs:
python-version: 3.12

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
- name: Deploy coredns docker image
run: |
Expand Down Expand Up @@ -104,7 +108,9 @@ jobs:
python-version: 3.12

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
- name: Generate certificate
run: |
Expand Down Expand Up @@ -149,7 +155,9 @@ jobs:
python-version: 3.12

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
- name: add pdns user
run: |
Expand Down Expand Up @@ -185,7 +193,9 @@ jobs:
python-version: 3.12

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
- name: download q
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/testing-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ jobs:
python-version: '3.12'

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o go-dnscollector *.go
- name: Test ${{ matrix.package }}
run: |
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/testing-powerdns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
- uses: actions/setup-python@v5

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
- name: Deploy dnsdist docker image
run: |
Expand Down Expand Up @@ -65,7 +67,9 @@ jobs:
- uses: actions/setup-python@v5

- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
run: |
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
- name: Deploy recursor docker image
run: |
Expand Down

0 comments on commit 0ae9af7

Please sign in to comment.