fix: unbreak the build for platforms w/o docker support #1294

Merged
mfenniak merged 1 commit from alexrp/runner:netbsd-fix into main 2026-01-14 20:20:05 +00:00
Contributor

Such as NetBSD.

  • bug fixes
    • PR: fix: unbreak the build for platforms w/o docker support
Such as NetBSD. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1294): <!--number 1294 --><!--line 0 --><!--description Zml4OiB1bmJyZWFrIHRoZSBidWlsZCBmb3IgcGxhdGZvcm1zIHcvbyBkb2NrZXIgc3VwcG9ydA==-->fix: unbreak the build for platforms w/o docker support<!--description--> <!--end release-notes-assistant-->
Member

There's a forgejo-runner.x86_64-netbsd in the PR.

There's a `forgejo-runner.x86_64-netbsd` in the PR.
Author
Contributor

Oops. Would you mind if I changed the .gitignore entry to forgejo-runner*? We cross-compile the runner for many targets, which is why we use binary names like that.

Oops. Would you mind if I changed the `.gitignore` entry to `forgejo-runner*`? We cross-compile the runner for many targets, which is why we use binary names like that.
alexrp force-pushed netbsd-fix from 71e0fc340d
Some checks failed
issue-labels / release-notes (pull_request_target) Successful in 7s
checks / validate pre-commit-hooks file (pull_request) Successful in 1m11s
checks / validate mocks (pull_request) Successful in 1m19s
checks / Build Forgejo Runner (pull_request) Successful in 1m42s
checks / runner exec tests (pull_request) Successful in 1m19s
checks / integration tests (docker-latest) (pull_request) Has been cancelled
checks / integration tests (docker-stable) (pull_request) Has been cancelled
to 26320bbce9
Some checks failed
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 6s
checks / Build Forgejo Runner (pull_request) Successful in 34s
checks / validate mocks (pull_request) Successful in 42s
checks / validate pre-commit-hooks file (pull_request) Successful in 50s
checks / runner exec tests (pull_request) Successful in 51s
checks / integration tests (docker-latest) (pull_request) Has been cancelled
checks / integration tests (docker-stable) (pull_request) Has been cancelled
2026-01-14 18:43:38 +00:00
Compare
Member

@alexrp wrote in #1294 (comment):

Oops. Would you mind if I changed the .gitignore entry to forgejo-runner*? We cross-compile the runner for many targets, which is why we use binary names like that.

Makes sense to me.

Asking, because I currently don't have the capacity to investigate that myself right now: Would cross compiling Forgejo Runner on Linux help to prevent such issues?

@alexrp wrote in https://code.forgejo.org/forgejo/runner/pulls/1294#issuecomment-73372: > Oops. Would you mind if I changed the `.gitignore` entry to `forgejo-runner*`? We cross-compile the runner for many targets, which is why we use binary names like that. Makes sense to me. Asking, because I currently don't have the capacity to investigate that myself right now: Would cross compiling Forgejo Runner on Linux help to prevent such issues?
alexrp force-pushed netbsd-fix from 26320bbce9
Some checks failed
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 6s
checks / Build Forgejo Runner (pull_request) Successful in 34s
checks / validate mocks (pull_request) Successful in 42s
checks / validate pre-commit-hooks file (pull_request) Successful in 50s
checks / runner exec tests (pull_request) Successful in 51s
checks / integration tests (docker-latest) (pull_request) Has been cancelled
checks / integration tests (docker-stable) (pull_request) Has been cancelled
to 70249af0e5
All checks were successful
issue-labels / release-notes (pull_request_target) Successful in 7s
checks / Build Forgejo Runner (pull_request) Successful in 34s
checks / validate mocks (pull_request) Successful in 36s
checks / validate pre-commit-hooks file (pull_request) Successful in 44s
checks / runner exec tests (pull_request) Successful in 43s
checks / integration tests (docker-latest) (pull_request) Successful in 10m6s
checks / integration tests (docker-stable) (pull_request) Successful in 12m30s
cascade / forgejo (pull_request_target) Successful in 1m8s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 5s
2026-01-14 18:51:10 +00:00
Compare
Author
Contributor

@aahlenst wrote in #1294 (comment):

Asking, because I currently don't have the capacity to investigate that myself right now: Would cross compiling Forgejo Runner on Linux help to prevent such issues?

Probably; that's what I do for Zig. All of these are built from x86_64-linux: https://codeberg.org/ziglang/runner/releases/tag/v12.1.0-zsf

Specifically:

GOARCH=amd64 GOOS=freebsd go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-freebsd

GOARCH=arm64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.aarch64-linux
GOARCH=loong64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.loongarch64-linux
GOARCH=mips64le GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.mips64el-linux
GOARCH=ppc64le GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.powerpc64le-linux
GOARCH=riscv64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.riscv64-linux
GOARCH=s390x GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.s390x-linux
GOARCH=amd64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-linux

GOARCH=arm64 GOOS=darwin go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.aarch64-macos

GOARCH=amd64 GOOS=netbsd go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-netbsd

GOARCH=amd64 GOOS=openbsd go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-openbsd

GOARCH=arm64 GOOS=windows go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.aarch64-windows.exe
GOARCH=amd64 GOOS=windows go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-windows.exe
@aahlenst wrote in https://code.forgejo.org/forgejo/runner/pulls/1294#issuecomment-73374: > Asking, because I currently don't have the capacity to investigate that myself right now: Would cross compiling Forgejo Runner on Linux help to prevent such issues? Probably; that's what I do for Zig. All of these are built from `x86_64-linux`: https://codeberg.org/ziglang/runner/releases/tag/v12.1.0-zsf Specifically: ``` GOARCH=amd64 GOOS=freebsd go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-freebsd GOARCH=arm64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.aarch64-linux GOARCH=loong64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.loongarch64-linux GOARCH=mips64le GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.mips64el-linux GOARCH=ppc64le GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.powerpc64le-linux GOARCH=riscv64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.riscv64-linux GOARCH=s390x GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.s390x-linux GOARCH=amd64 GOOS=linux go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-linux GOARCH=arm64 GOOS=darwin go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.aarch64-macos GOARCH=amd64 GOOS=netbsd go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-netbsd GOARCH=amd64 GOOS=openbsd go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-openbsd GOARCH=arm64 GOOS=windows go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.aarch64-windows.exe GOARCH=amd64 GOOS=windows go build -v -tags 'netgo osusergo' -ldflags '-X "code.forgejo.org/forgejo/runner/v12/internal/pkg/ver.version=v12.1.0-zsf"' -o forgejo-runner.x86_64-windows.exe ```
mfenniak approved these changes 2026-01-14 20:19:42 +00:00
Owner

@alexrp Thanks for the fix!

@alexrp Thanks for the fix!
Member

@mfenniak Would you be on board with cross-compiling during CI, without actually publishing binaries?

@mfenniak Would you be on board with cross-compiling during CI, without actually publishing binaries?
Owner

I'd be interested in trying it -- without it being a commitment to support those platforms.

This kind of compilation error is easily avoidable during a PR if it's noticed, and we could at least hit that level of support. If other more complex situations come up where the value versus effort isn't as clear, we could discuss the situation in an informed way rather than blunder into breaking something.

I'd be interested in trying it -- without it being a commitment to support those platforms. This kind of compilation error is easily avoidable during a PR if it's noticed, and we could at least hit that level of support. If other more complex situations come up where the value versus effort isn't as clear, we could discuss the situation in an informed way rather than blunder into breaking something.
Owner

sounds also good to me. should be documented too, so it's clear we only check for compile errors, but not for runtime breaking issues

sounds also good to me. should be documented too, so it's clear we only check for compile errors, but not for runtime breaking issues
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!1294
No description provided.