server: Ignore net.ErrClosed errors when shutting down #306
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
name: Build | |
on: [push, pull_request] | |
jobs: | |
coredhcp: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ['1.20', '1.21'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# clone in the gopath | |
path: src/github.com/${{ github.repository }} | |
- uses: actions/setup-go@v5 | |
with: | |
stable: false | |
go-version: ${{ matrix.go }} | |
- name: setup environment | |
run: | | |
# `env` doesn't allow for variable expansion, so we use the GITHUB_ENV | |
# trick. | |
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GO111MODULE=on" >> $GITHUB_ENV | |
- name: build coredhcp | |
run: | | |
set -exu | |
cd $GITHUB_WORKSPACE/src/github.com/${{ github.repository }}/cmds/coredhcp | |
go build | |
coredhcp-generator: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ['1.20', '1.21'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# clone in the gopath | |
path: src/github.com/${{ github.repository }} | |
- uses: actions/setup-go@v5 | |
with: | |
stable: false | |
go-version: ${{ matrix.go }} | |
- name: setup environment | |
run: | | |
# `env` doesn't allow for variable expansion, so we use the GITHUB_ENV | |
# trick. | |
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GOBIN=$GITHUB_WORKSPACE/bin" >> $GITHUB_ENV | |
- name: build coredhcp-generator | |
run: | | |
set -exu | |
cd "${GITHUB_WORKSPACE}"/src/github.com/${{ github.repository }}/cmds/coredhcp-generator | |
go build | |
builddir=$(./coredhcp-generator -f core-plugins.txt) | |
cd "${builddir}" | |
ls -l | |
go mod init "coredhcp" | |
go mod edit -replace "github.com/coredhcp/coredhcp=${GITHUB_WORKSPACE}/src/github.com/${{ github.repository }}" | |
go mod tidy | |
go build | |
gofmt -w "${builddir}/coredhcp.go" | |
diff -u "${builddir}/coredhcp.go" "${GITHUB_WORKSPACE}"/src/github.com/${{ github.repository }}/cmds/coredhcp/main.go |