mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-28 20:01:15 +08:00
f45a6de20d
* update quic-go to v0.37.0 * Bump to Go 1.20 * Bump golangci-lint version, yml syntax consistency * Use skip-pkg-cache workaround * Workaround needed for both? * Seeding weakrand is no longer necessary --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com> Co-authored-by: Francis Lavoie <lavofr@gmail.com>
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
name: Cross-Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- 2.*
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- 2.*
|
|
|
|
jobs:
|
|
cross-build-test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
goos:
|
|
- 'android'
|
|
- 'linux'
|
|
- 'solaris'
|
|
- 'illumos'
|
|
- 'dragonfly'
|
|
- 'freebsd'
|
|
- 'openbsd'
|
|
- 'plan9'
|
|
- 'windows'
|
|
- 'darwin'
|
|
- 'netbsd'
|
|
go:
|
|
- '1.20'
|
|
|
|
include:
|
|
# Set the minimum Go patch version for the given Go minor
|
|
# Usable via ${{ matrix.GO_SEMVER }}
|
|
- go: '1.20'
|
|
GO_SEMVER: '~1.20.6'
|
|
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: ${{ matrix.GO_SEMVER }}
|
|
check-latest: true
|
|
|
|
- name: Print Go version and environment
|
|
id: vars
|
|
run: |
|
|
printf "Using go at: $(which go)\n"
|
|
printf "Go version: $(go version)\n"
|
|
printf "\n\nGo environment:\n\n"
|
|
go env
|
|
printf "\n\nSystem environment:\n\n"
|
|
env
|
|
|
|
- name: Run Build
|
|
env:
|
|
CGO_ENABLED: 0
|
|
GOOS: ${{ matrix.goos }}
|
|
shell: bash
|
|
continue-on-error: true
|
|
working-directory: ./cmd/caddy
|
|
run: |
|
|
GOOS=$GOOS go build -trimpath -o caddy-"$GOOS"-amd64 2> /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo "::warning ::$GOOS Build Failed"
|
|
exit 0
|
|
fi
|