Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split out base and toolchain and ensure CI tests the current PR #194

Merged
merged 33 commits into from
Jan 15, 2023

Conversation

zeripath
Copy link
Collaborator

@zeripath zeripath commented Jan 11, 2023

This PR substantially restructures the xgo dockers creating a separate toolchain container, go-version container and then a merged container with the build.sh and xgo. This should in future allow for more caching and allows pr test cases to avoid rebuilding the whole toolchain.

In doing this I've noticed and fixed a number of bugs:

  1. Yet another bug relating to remote paths that would cause a Why xgo add /build/ prefix in front of module name? And goland IDE can not access this path in MAC #181 and go: go.mod file not found in current directory or any parent directory #109
  2. The default naming for "packages" on module builds is incorrect and unhelpful. (Building with --pkg names the executable after the module instead of the package #174) The default name will now be: modulename/pack-...
  3. Use mkdir -p /deps instead of /deps to permit reuse of the /deps dir

Fix #174
Fix #181
Fix #164
Fix #109

Signed-off-by: Andrew Thornton [email protected]

Verified

This commit was signed with the committer’s verified signature.
There was another bug needing to be fixed in techknowlogick#187 - /source/go.mod
does not exist in go-gettable modules therefore the NAME determination
will fail.

Fix techknowlogick#187

Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Bootstrapping of arm-5, -6 and -7 currently happens in build.sh because Go will install
std to /usr/local/go/pkg/linux_arm. This PR simply bootstraps these in bootstrap and moves
them to /usr/local/go/pkg/linux_arm-x as appropriate with build.sh creating a symbolic link
as needed.

This should slightly speed up arm builds using xgo.

Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
This PR substantially restructures the xgo dockers creating a separate
toolchain container, go-version container and then a merged container
with the build.sh and xgo. This should in future allow for more caching
and to be able to avoid rebuilding the whole toolchain.

Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>
oci try2

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
try again

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath force-pushed the split-out-toolchain branch from afd47b7 to 5ac47e4 Compare January 14, 2023 13:36

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
…elevant to the toolchain

Signed-off-by: Andrew Thornton <[email protected]>
again

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Collaborator Author

Hopefully this might actually work in 0f2e6ff

I've noticed another bug whilst working on this - I can extract out the fix if preferred.

@zeripath
Copy link
Collaborator Author

@techknowlogick would you be able to take a look at this?

I've split base into a toolchain container containing the compilers. This toolchain is then used as the base for a bootstrapped go container which is finally then used to add xgo and the build.sh

The test.yml has been extensively rewritten to ensure that the tests are run on the built container but it attempts to cache the toolchain docker if it's docker directory is unchanged.

In doing this and running the tests I've noticed another bug and have also fixed that.

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
…ULE="auto"

Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Collaborator Author

OK I'm convinced that this is now working and is a substantial improvement on the previous situation and fixes a number of issues therefore I'm gonna merge.

@zeripath zeripath merged commit e94791e into techknowlogick:main Jan 15, 2023
@zeripath zeripath deleted the split-out-toolchain branch January 15, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment