3434 GO_VERSION : ${{ inputs.go-version }}
3535
3636 steps :
37+ # https://github.com/orgs/community/discussions/44185
38+ # - name: "Init: zero"
39+ # id: init
40+ # run: |
41+ # echo "summary=${{ runner.temp }}/summary.md" >> $GITHUB_OUTPUT
42+
3743 - name : " Init: checkout"
3844 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3945 with :
@@ -42,10 +48,13 @@ jobs:
4248 - if : ${{ inputs.canary }}
4349 name : " Init (canary): retrieve GO_VERSION"
4450 run : |
51+ ./hack/github/action-helpers.sh
4552 latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
4653 printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
4754 [ "$latest_go" != "" ] || \
48- echo "::warning title=No canary go::There is currently no canary go version to test. Steps will not run."
55+ github::log::warning "No canary go" "There is currently no canary go version to test. Steps will not run."
56+
57+ echo "_begin="canary $(date +%s)\n" >> $GITHUB_OUTPUT
4958
5059 - if : ${{ env.GO_VERSION != '' }}
5160 name : " Init: install go"
@@ -57,13 +66,44 @@ jobs:
5766 - if : ${{ env.GO_VERSION != '' }}
5867 name : " Run: make binaries"
5968 run : |
69+ ./hack/github/formatting.sh
70+
71+ github::md::h1 "Lint: building" > ${{ steps.setup.outputs.summary }}
72+
73+ failure=
74+
75+ build(){
76+ local goos="$1"
77+ local goarch="${2:-amd64}"
78+ local goarm="${3:-}"
79+ local result
80+
81+ github::timer::begin
82+
83+ GOOS="$goos" GOARCH="$goarch" GOARM="$goarm" make binaries \
84+ && result="$decorator_success" \
85+ || {
86+ failure=true
87+ result="$decorator_failure"
88+ }
89+
90+ [ ! "$goarm" ] || goarch="$goarch/v$goarm"
91+ github::md::table::line "$goos" "$goarch" "$result" "$(github::timer::format <(github::timer::tick))" >> "$GITHUB_STEP_SUMMARY"
92+ }
93+
94+ github::md::h1 "Builds" >> "$GITHUB_STEP_SUMMARY"
95+ github::md::table::header "OS" "Arch" "Result" "Time" >> "$GITHUB_STEP_SUMMARY"
96+
6097 # We officially support these
61- GOOS=linux make binaries
62- GOOS=windows make binaries
63- GOOS=freebsd make binaries
64- GOOS=darwin make binaries
65- GOARCH=arm GOARM=6 make binaries
98+ build linux
99+ build linux arm64
100+ build windows
101+ build freebsd
102+ build darwin
103+ build linux arm 6
66104 # These architectures are not released, but we still verify that we can at least compile
67- GOARCH=ppc64le make binaries
68- GOARCH=riscv64 make binaries
69- GOARCH=s390x make binaries
105+ build linux ppc64le
106+ build linux riscv64
107+ build linux s390x
108+
109+ [ ! "$failure" ] || exit 1
0 commit comments