act icon indicating copy to clipboard operation
act copied to clipboard

feat: Allow building without docker support

Open ChristopherHX opened this issue 2 years ago • 2 comments
trafficstars

Needed by github-act-runner to compile for dragonfly, plan9, etc.

I moved the types into container_types.go without changing them.

The docker package is not compatible with dragonfly, while the rest of the code is:

| # github.com/moby/sys/mount
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:16:27: undefined: RDONLY
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:17:26: undefined: RDONLY
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:18:26: undefined: NOSUID
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:19:27: undefined: NOSUID
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:20:26: undefined: NODEV
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:21:27: undefined: NODEV
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:22:26: undefined: NOEXEC
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:23:27: undefined: NOEXEC
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:24:27: undefined: SYNCHRONOUS
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:25:26: undefined: SYNCHRONOUS
| ##[debug]Dropping file value '/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go'. Path is not under the workflow repo.
| ##[error]/home/ubuntu/go/pkg/mod/github.com/moby/sys/[email protected]/flags_unix.go:25:26: too many errors
| ##[error]Process completed with exit code 2.

This patch make this to compile successful, while the tests don't work. GOOS=dragonfly GOARCH=amd64 go build

Updated working Targets with and without this change

Fixes building

  • [x] GOOS=dragonfly GOARCH=amd64
  • [ ] GOOS=illumos GOARCH=amd64 ( * survey prevents the build of the cli package )
  • [x] GOOS=netbsd GOARCH=amd64
  • [x] GOOS=netbsd GOARCH=386
  • [x] GOOS=netbsd GOARCH=arm64
  • [x] GOOS=netbsd GOARCH=arm
  • [ ] GOOS=plan9 GOARCH=amd64 ( * survey prevents the build of the cli package )
  • [ ] GOOS=plan9 GOARCH=386 ( * survey prevents the build of the cli package )
  • [ ] GOOS=plan9 GOARCH=arm ( * survey prevents the build of the cli package )
  • [ ] GOOS=solaris GOARCH=amd64 ( * survey prevents the build of the cli package )

Targets, which builds without this change with go 1.19 but didn't in go 1.16

  • GOOS=freebsd GOARCH=amd64
  • GOOS=freebsd GOARCH=385
  • GOOS=freebsd GOARCH=arm64
  • GOOS=freebsd GOARCH=arm

ChristopherHX avatar Dec 12 '22 21:12 ChristopherHX

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 9 0 0.03s
✅ REPOSITORY gitleaks yes no 2.91s
✅ REPOSITORY git_diff yes no 0.0s
✅ REPOSITORY secretlint yes no 1.16s

See detailed report in MegaLinter reports Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

github-actions[bot] avatar Dec 12 '22 21:12 github-actions[bot]

Codecov Report

Merging #1507 (4be5759) into master (4989f44) will increase coverage by 0.04%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1507      +/-   ##
==========================================
+ Coverage   61.22%   61.27%   +0.04%     
==========================================
  Files          46       46              
  Lines        7141     7150       +9     
==========================================
+ Hits         4372     4381       +9     
  Misses       2462     2462              
  Partials      307      307              
Impacted Files Coverage Δ
pkg/container/docker_auth.go 47.61% <ø> (ø)
pkg/container/docker_build.go 58.97% <ø> (ø)
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_images.go 31.14% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/docker_pull.go 33.33% <ø> (ø)
pkg/container/docker_run.go 13.58% <ø> (ø)
pkg/container/docker_volume.go 0.00% <ø> (ø)
pkg/runner/job_executor.go 88.40% <100.00%> (+0.71%) :arrow_up:
pkg/runner/step_action_remote.go 90.96% <100.00%> (+0.05%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Dec 12 '22 21:12 codecov[bot]