2022-08-05 16:43:01 +03:00
|
|
|
distributable:
|
2022-12-06 20:18:20 +03:00
|
|
|
url: https://go.dev/dl/go{{version.raw}}.src.tar.gz
|
2022-08-05 16:43:01 +03:00
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: golang/go/tags
|
|
|
|
strip: /^go/
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/go
|
2023-01-16 19:26:37 +03:00
|
|
|
- bin/gofmt
|
2022-08-05 16:43:01 +03:00
|
|
|
|
|
|
|
interprets:
|
2022-11-25 19:03:11 +03:00
|
|
|
extensions: go
|
|
|
|
args: [go, run]
|
2022-08-05 16:43:01 +03:00
|
|
|
|
2022-10-18 17:18:36 +03:00
|
|
|
dependencies:
|
2022-10-19 18:37:30 +03:00
|
|
|
openssl.org: 1 # for ca-certificates
|
2022-10-18 17:18:36 +03:00
|
|
|
|
2022-12-12 18:27:20 +03:00
|
|
|
companions:
|
|
|
|
|
2022-08-05 16:43:01 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
gnu.org/m4: 1
|
2022-09-25 16:06:11 +03:00
|
|
|
go.dev: '*'
|
|
|
|
working-directory: src
|
2023-10-23 17:25:35 +03:00
|
|
|
# will only segfault if updated with patchelf
|
|
|
|
skip: fix-patchelf
|
2023-08-15 01:32:16 +03:00
|
|
|
script:
|
|
|
|
- ./make.bash
|
2022-08-05 16:43:01 +03:00
|
|
|
|
|
|
|
# cleanup
|
2023-08-15 01:32:16 +03:00
|
|
|
- rm *.{bash,bat,rc} Make.dist
|
|
|
|
- run: find . -mindepth 1 -delete
|
|
|
|
working-directory: ${{ prefix }}
|
2023-09-06 20:57:21 +03:00
|
|
|
- run: |
|
|
|
|
cp -a api bin doc lib misc pkg src test "{{prefix}}"
|
|
|
|
if test -f go.env; then
|
|
|
|
cp go.env "{{prefix}}"
|
|
|
|
fi
|
2023-08-15 01:32:16 +03:00
|
|
|
working-directory: $SRCROOT
|
2022-09-25 16:06:11 +03:00
|
|
|
env:
|
2023-08-15 01:32:16 +03:00
|
|
|
# `make.bash` complains about unset GOCACHE and HOME otherwise
|
|
|
|
GOCACHE: "$SRCROOT/.gocache"
|
2022-09-25 16:06:11 +03:00
|
|
|
GOROOT_FINAL: ${{ prefix }}
|
|
|
|
GOROOT_BOOTSTRAP: ${{ deps.go.dev.prefix }}
|
|
|
|
|
|
|
|
bootstrap:
|
|
|
|
dependencies:
|
|
|
|
curl.se: '*'
|
|
|
|
env:
|
|
|
|
'*/aarch64': {GOARCH: arm64}
|
|
|
|
'*/x86-64': {GOARCH: amd64}
|
|
|
|
script: |
|
|
|
|
curl -L "$URL" | tar xzf - -C "{{ prefix }}" --strip-components=1
|
2022-08-05 16:43:01 +03:00
|
|
|
|
|
|
|
test:
|
|
|
|
script: |
|
|
|
|
mv $FIXTURE $FIXTURE.go
|
|
|
|
OUTPUT=$(go run $FIXTURE.go)
|
|
|
|
test "Hello World" = "$OUTPUT"
|
2023-09-27 21:58:22 +03:00
|
|
|
go build -o my-artifact $FIXTURE.go
|
|
|
|
ls -la $FIXTURE.go
|
2022-08-05 16:43:01 +03:00
|
|
|
fixture: |
|
|
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
2022-09-02 18:00:33 +03:00
|
|
|
fmt.Println("Hello World")
|
|
|
|
}
|