-
Notifications
You must be signed in to change notification settings - Fork 247
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
Build status-go on windows and macos #4486
Comments
Probably MacOS build is a good idea too? |
The way we should build And the Which appears to be simply building the Lines 229 to 248 in 551af54
With one special case for Darwin aarch64 where STATUSGO_MAKE_PARAMS are overridden:https://github.com/status-im/status-desktop/blob/0645ed47123f742faa2e110bc6daf1f2320dedd8/Makefile#L203 |
Considering we should probably build both status-go/_assets/ci/Jenkinsfile.linux Lines 52 to 63 in 551af54
The only tricky part I can see is the use of statically defined Jenkins slave labels:
One way to work around that is to do what we do in /* This way we run the same Jenkinsfile on different platforms. */
agent { label params.AGENT_LABEL } The string(
name: 'AGENT_LABEL',
description: 'Label for targetted CI slave host: linux/macos',
defaultValue: params.AGENT_LABEL ?: getAgentLabel(),
) Which generates job labels based off of the Jenkins job path tokens: /* This allows us to use one Jenkinsfile and run
* jobs on different platforms based on job name. */
def getAgentLabel() {
if (params.AGENT_LABEL) { return params.AGENT_LABEL }
/* We extract the name of the job from currentThread because
* before an agent is picket env is not available. */
def tokens = Thread.currentThread().getName().split('/')
def labels = []
/* Check if the job path contains any of the valid labels. */
['linux', 'macos', 'x86_64', 'aarch64', 'arm64'].each {
if (tokens.contains(it)) { labels.add(it) }
}
return labels.join(' && ')
} This probably means that the path of |
For clarity of purpose for the shared Jenkinsfile we cold also include symlinks like so:
It could also be called |
One issue with re-using the status-go/_assets/ci/Jenkinsfile.linux Lines 72 to 76 in 551af54
Which currently gets the nix.shell(
"""
s5cmd ${flags.join(" ")} ${path} s3://${opts.bucket}/
""",
packages: ['s5cmd'],
pure: false,
) One difficult solution to this problem might be use of NixOS-WSL image to use Nix on Windows, but that's something that not been researched yet. Might be cool to try though. Another option would be to modify You can find an example of how that can be done in Or you could simply use |
The status-go/_assets/ci/Jenkinsfile.linux Line 35 in 551af54
Since it informs the platform column in comments made by github-comment-manager service:https://github.com/status-im/status-jenkins-lib/blob/ab9aa93c13eb42fb524b2f8e54521c73da140c9c/vars/ghcmgr.groovy#L20 |
Since WSL is problematic due to issues with paths, as well as possibly being equal to cross-compiling from Linux, it might be simpler to just do what we do in Windows Desktop builds and simply override $(MAKE) -C vendor/status-go statusgo-shared-library SHELL=/bin/sh \
$(STATUSGO_MAKE_PARAMS) $(HANDLE_OUTPUT) Since in the context of a Nix shell within WSL we would simply be using the same tooling as on Linux, even if local system tooling is available from the Windows host system. |
Would it be possible to add a build of status-go on CI on windows? it happened that status-go could not be built on windows, and we only realised when integrating with desktop.
cc @jakubgs
The text was updated successfully, but these errors were encountered: