mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 14:13:48 +03:00
4f3f6e35e8
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75 lines
1.7 KiB
YAML
75 lines
1.7 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:
|
|
- 'aix'
|
|
- 'android'
|
|
- 'linux'
|
|
- 'solaris'
|
|
- 'illumos'
|
|
- 'dragonfly'
|
|
- 'freebsd'
|
|
- 'openbsd'
|
|
- 'plan9'
|
|
- 'windows'
|
|
- 'darwin'
|
|
- 'netbsd'
|
|
go:
|
|
- '1.21'
|
|
|
|
include:
|
|
# Set the minimum Go patch version for the given Go minor
|
|
# Usable via ${{ matrix.GO_SEMVER }}
|
|
- go: '1.21'
|
|
GO_SEMVER: '~1.21.0'
|
|
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
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 }}
|
|
GOARCH: ${{ matrix.goos == 'aix' && 'ppc64' || 'amd64' }}
|
|
shell: bash
|
|
continue-on-error: true
|
|
working-directory: ./cmd/caddy
|
|
run: |
|
|
GOOS=$GOOS GOARCH=$GOARCH go build -trimpath -o caddy-"$GOOS"-$GOARCH 2> /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo "::warning ::$GOOS Build Failed"
|
|
exit 0
|
|
fi
|