diff options
| author | Nicolas Paul <n@nc0.fr> | 2023-05-31 22:08:07 +0200 |
|---|---|---|
| committer | Nicolas Paul <n@nc0.fr> | 2023-05-31 22:08:07 +0200 |
| commit | ea09988177f57cfa3a06069454512b09808b0b5e (patch) | |
| tree | 76b3dc5a15d67c0917967186897553dd19da6bcb | |
| parent | a0976d22e8ec247f80759f44b1d2ce606bf59d2d (diff) | |
Add CI with cross-compilation
Signed-off-by: Nicolas Paul <n@nc0.fr>
| -rw-r--r-- | .build.yml | 62 | ||||
| -rw-r--r-- | .gitignore | 28 | ||||
| -rw-r--r-- | testdata/dst/gitlab/bar.html | 7 | ||||
| -rw-r--r-- | testdata/dst/index.html | 5 |
4 files changed, 70 insertions, 32 deletions
diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..bac223a --- /dev/null +++ b/.build.yml @@ -0,0 +1,62 @@ +image: alpine/latest +arch: x86_64 +packages: + - go +sources: + - https://git.sr.ht/~n1c00o/svgu +artifacts: + - svgu/testdata/dst.tar.gz + - svgu/dst/svgu-linux-amd64 + - svgu/dst/svgu-linux-arm64 + - svgu/dst/svgu-linux-riscv64 + - svgu/dst/svgu-linux-ppc64le + - svgu/dst/svgu-linux-ppc64 + - svgu/dst/svgu-darwin-amd64 + - svgu/dst/svgu-darwin-arm64 + - svgu/dst/svgu-windows-amd64 + - svgu/dst/svgu-windows-arm64 + - svgu/dst/svgu-freebsd-amd64 + - svgu/dst/svgu-freebsd-arm64 + - svgu/dst/svgu-freebsd-riscv64 + - svgu/dst/svgu-openbsd-amd64 + - svgu/dst/svgu-openbsd-arm64 + - svgu/dst/svgu-netbsd-amd64 + - svgu/dst/svgu-netbsd-arm64 + - svgu/dst/svgu-solaris-amd64 + - svgu/dst/svgu-dragonfly-amd64 + - svgu/dst/svgu-plan9-amd64 +tasks: + - fmt: | + cd svgu + gofmt -d -e -l -s cmd src + - test: | + cd svgu/tesdata + go run ../cmd/svgu/svgu.go -o=dst -v -c=DOMAINS.star + tar -czvf dst.tar.gz dst + - build: | + cd svgu + mkdir dst + + GOOS=linux GOARCH=amd64 go build -o dst/svgu-linux-amd64 cmd/svgu/svgu.go + GOOS=linux GOARCH=arm64 go build -o dst/svgu-linux-arm64 cmd/svgu/svgu.go + GOOS=linux GOARCH=riscv64 go build -o dst/svgu-linux-riscv64 cmd/svgu/svgu.go + GOOS=linux GOARCH=ppc64le go build -o dst/svgu-linux-ppc64le cmd/svgu/svgu.go + GOOS=linux GOARCH=ppc64 go build -o dst/svgu-linux-ppc64 cmd/svgu/svgu.go + GOOS=darwin GOARCH=amd64 go build -o dst/svgu-darwin-amd64 cmd/svgu/svgu.go + GOOS=darwin GOARCH=arm64 go build -o dst/svgu-darwin-arm64 cmd/svgu/svgu.go + GOOS=windows GOARCH=amd64 go build -o dst/svgu-windows-amd64 cmd/svgu/svgu.go + GOOS=windows GOARCH=arm64 go build -o dst/svgu-windows-arm64 cmd/svgu/svgu.go + GOOS=freebsd GOARCH=amd64 go build -o dst/svgu-freebsd-amd64 cmd/svgu/svgu.go + GOOS=freebsd GOARCH=arm64 go build -o dst/svgu-freebsd-arm64 cmd/svgu/svgu.go + GOOS=freebsd GOARCH=riscv64 go build -o dst/svgu-freebsd-riscv64 cmd/svgu/svgu.go + GOOS=openbsd GOARCH=amd64 go build -o dst/svgu-openbsd-amd64 cmd/svgu/svgu.go + GOOS=openbsd GOARCH=arm64 go build -o dst/svgu-openbsd-arm64 cmd/svgu/svgu.go + GOOS=netbsd GOARCH=amd64 go build -o dst/svgu-netbsd-amd64 cmd/svgu/svgu.go + GOOS=netbsd GOARCH=arm64 go build -o dst/svgu-netbsd-arm64 cmd/svgu/svgu.go + GOOS=solaris GOARCH=amd64 go build -o dst/svgu-solaris-amd64 cmd/svgu/svgu.go + GOOS=dragonfly GOARCH=amd64 go build -o dst/svgu-dragonfly-amd64 cmd/svgu/svgu.go + GOOS=plan9 GOARCH=amd64 go build -o dst/svgu-plan9-amd64 cmd/svgu/svgu.go +triggers: + - action: email + condition: always + to: "~n1c00o/svgu@lists.sr.ht"
\ No newline at end of file @@ -1,24 +1,12 @@ /.vscode/ /.idea/ - -# build output -dist/ -# generated types -.astro/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - - -# environment variables +/dst/ .env -.env.production - -# macOS-specific files .DS_Store +/testdata/dst/ +*.exe +*.o +*.out +*.so +*.a +*.dll
\ No newline at end of file diff --git a/testdata/dst/gitlab/bar.html b/testdata/dst/gitlab/bar.html deleted file mode 100644 index 67b8815..0000000 --- a/testdata/dst/gitlab/bar.html +++ /dev/null @@ -1,7 +0,0 @@ -<!DOCTYPE html> -<meta charset="UTF-8"> -<meta content="example.com/gitlab/bar git https://gitlab.com/example/bar.git" name="go-import"> -<meta content="example.com/gitlab/bar https://gitlab.com/example/bar.git https://gitlab.com/example/bar.git/-/tree/main{/dir} https://gitlab.com/example/bar.git/-/blob/main{/dir}/{file}#L{line}" - name="go-source"> -<meta content="width=device-width,initial-scale=1" name="viewport"> -<p>There is nothing to see, redirecting <a href="https://pkg.go.dev/example.com/gitlab/bar">here</a>.
\ No newline at end of file diff --git a/testdata/dst/index.html b/testdata/dst/index.html deleted file mode 100644 index c05f8d8..0000000 --- a/testdata/dst/index.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<meta charset="UTF-8"> -<meta content="2; url='https://pkg.go.dev'" http-equiv="refresh"> -<meta content="width=device-width,initial-scale=1" name="viewport"> -<p>Nothing to see, redirecting <a href="https://pkg.go.dev">here</a>.
\ No newline at end of file |
