Add windows servers to smoke test by yosifkit · Pull Request #83 · docker-library/bashbrew (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation6 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Disable cgo to fix build failure on GHA windows-2022
Example failure from PRs to official-images:
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/docker-library/bashbrew/cmd/bashbrew
C:\hostedtoolcache\windows\go\1.18.10\x64\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\RUNNER1\AppData\Local\Temp\go-link-3224421645\000008.o: in function 1\AppData\Local\Temp\go-link-3224421645\000008.o: in function _cgo_preinit_init': \\_\_\runtime\cgo/gcc_libinit_windows.c:30: undefined reference to
__imp___iob_func'
C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\RUNNERx_cgo_sys_thread_create': \\_\_\runtime\cgo/gcc_libinit_windows.c:60: undefined reference to
__imp___iob_func'
C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\RUNNER1\AppData\Local\Temp\go-link-3224421645\000008.o: in function 1\AppData\Local\Temp\go-link-3224421645\000009.o: in function x_cgo_notify_runtime_init_done': \\_\_\runtime\cgo/gcc_libinit_windows.c:101: undefined reference to
__imp___iob_func'
C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\RUNNERx_cgo_thread_start': \\_\_\runtime\cgo/gcc_util.c🔞 undefined reference to
__imp___iob_func'
C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\RUNNER~1\AppData\Local\Temp\go-link-3224421645\000010.o: in function _cgo_sys_thread_start': \\_\_\runtime\cgo/gcc_windows_amd64.c:31: undefined reference to
__imp___iob_func'
collect2.exe: error: ld returned 1 exit status
Codecov Report
Merging #83 (5eb555b) into master (6334a4f) will not change coverage.
The diff coverage isn/a
.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
@@ Coverage Diff @@ ## master #83 +/- ##
Coverage 73.10% 73.10%
Files 7 7
Lines 714 714
Hits 522 522
Misses 162 162
Partials 30 30
@@ -11,6 +11,8 @@ runs: |
---|
- uses: actions/setup-go@v3 |
with: |
go-version-file: '${{ github.action_path }}/go.mod' |
env: |
CGO_ENABLED: 0 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we instead add this to
?
(with : "${CGO_ENABLED:=0}"
)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think that makes sense.
$ git grep -i cgo
Dockerfile:RUN CGO_ENABLED=0 ./bashbrew.sh --version;
Dockerfile.release:ENV CGO_ENABLED 0
action.yml: CGO_ENABLED: 0
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, now moved to bashbrew.sh
. We could drop it from the Dockerfile
but it seems fine to be explicit there and in the Dockerfile.release
.
$ git grep -i cgo
Dockerfile:RUN CGO_ENABLED=0 ./bashbrew.sh --version;
Dockerfile.release:ENV CGO_ENABLED 0
bashbrew.sh:: "${CGO_ENABLED:=0}"
bashbrew.sh:export GO111MODULE=on CGO_ENABLED
Disable cgo to fix build failure on GHA windows-2022
tianon deleted the windows-workflow branch
Is there a reason to disable for all rather than just for windows
?
Just for consistency across OS, architecture, and build pipeline. It was already disabled for the builds using Dockerfile
or Dockerfile.release
, just not the script directly on a host like GitHub Actions.