@marcel91200 / caddy Mirror · read-only / commits / 399eff41
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

ci: Include tracking of GOOS for which Caddy fails to build (#3617)

* ci: include tracking of GOOS for which Caddy fails to build * ci: split cross-build check into separate workflow * ci: cross-build check: make it clear the cross-build check is not a blocker * ci: cross-build check: set annotation instead of failing the build * ci: cross-build check: explicitly set continue-on-error to force success marker * ci: cross-build check: send stderr to /dev/null * ci: Simplify workflow names Co-authored-by: Francis Lavoie <lavofr@gmail.com> Co-authored-by: Francis Lavoie <lavofr@gmail.com> Co-authored-by: Matt Holt <mholt@users.noreply.github.com>

Mohammed Al Sahaf committed Aug 1, 2020 at 23:23 UTC 399eff415ca530c02b21506949526ca7fd0698fe
2 files changed +57 -1
.github/workflows/ci.yml
+1 -1
@@ -1,6 +1,6 @@
1 # Used as inspiration: https://github.com/mvdan/github-actions-golang
2
3 -name: Cross-Platform
3 +name: Tests
4
5 on:
6 push:
.github/workflows/cross-build.yml new
+56
@@ -0,0 +1,56 @@
1 +name: Cross-Build
2 +
3 +on:
4 + push:
5 + branches:
6 + - master
7 + pull_request:
8 + branches:
9 + - master
10 +
11 +jobs:
12 + cross-build-test:
13 + strategy:
14 + fail-fast: false
15 + matrix:
16 + goos: ['android', 'linux', 'solaris', 'illumos', 'dragonfly', 'freebsd', 'openbsd', 'plan9', 'windows', 'darwin', 'netbsd']
17 + go-version: [ 1.14.x ]
18 + runs-on: ubuntu-latest
19 + continue-on-error: true
20 + steps:
21 + - name: Install Go
22 + uses: actions/setup-go@v2
23 + with:
24 + go-version: ${{ matrix.go-version }}
25 + - name: Print Go version and environment
26 + id: vars
27 + run: |
28 + printf "Using go at: $(which go)\n"
29 + printf "Go version: $(go version)\n"
30 + printf "\n\nGo environment:\n\n"
31 + go env
32 + printf "\n\nSystem environment:\n\n"
33 + env
34 + echo "::set-output name=go_cache::$(go env GOCACHE)"
35 + - name: Cache the build cache
36 + uses: actions/cache@v1
37 + with:
38 + path: ${{ steps.vars.outputs.go_cache }}
39 + key: cross-build-go-${{ matrix.goos }}-${{ hashFiles('**/go.sum') }}
40 + restore-keys: |
41 + cross-build-go-${{ matrix.goos }}
42 + - name: Checkout code into the Go module directory
43 + uses: actions/checkout@v2
44 + - name: Run Build
45 + env:
46 + CGO_ENABLED: 0
47 + GOOS: ${{ matrix.goos }}
48 + shell: bash
49 + continue-on-error: true
50 + working-directory: ./cmd/caddy
51 + run: |
52 + GOOS=$GOOS go build -trimpath -o caddy-"$GOOS"-amd64 2> /dev/null
53 + if [ $? -ne 0 ]; then
54 + echo "::warning ::$GOOS Build Failed"
55 + exit 0
56 + fi