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

CI: Build binaries using GitHub Actions #3

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft

Conversation

aminya
Copy link

@aminya aminya commented Sep 21, 2020

This uses GitHub Actions to build build2.

The running actions: https://github.com/aminya/build2-toolchain/actions

This fails currently with some errors that I can't find the root cause of. So, you may help with that part.

@aminya

This comment has been minimized.

@boris-kolpackov
Copy link
Member

GitHub is not able to clone this submodule.

Hm, I am not sure what we can do about it.

@aminya aminya force-pushed the CI branch 3 times, most recently from 01f2407 to 73aaa81 Compare January 21, 2021 06:38
@aminya

This comment has been minimized.

@aminya
Copy link
Author

aminya commented Jan 21, 2021

The new error

On Ubuntu:
https://github.com/aminya/build2-toolchain/runs/1740067407?check_suite_focus=true#step:8:13

> sudo sh ./build.sh.in --sudo sudo clang++ ~/dist-ubuntu-clang
...
host x86_64-pc-linux-gnu
+ build2/b-boot config.cxx=clang++ config.bin.lib=static build2/exe{b}
This is free software released under the MIT license.
error: no build/bootstrap.build in ../libodb/
Error: Process completed with exit code 1.

On Mac:
https://github.com/aminya/build2-toolchain/runs/1740067424?check_suite_focus=true#step:9:13

build2 99999.99999.99999
libbutl 99999.99999.99999
host x86_64-apple-darwin19.6.0
This is free software released under the MIT license.
+ build2/b-boot config.cxx=clang++ config.bin.lib=static build2/exe{b}
error: no build/bootstrap.build in ../libodb-sqlite/
Error: Process completed with exit code 1.

@boris-kolpackov
Copy link
Member

The build2-toolchain project is not meant to be built directly after cloning. Rather, it must be dist'ed (which generates all the necessary scripts, etc). Also, currently, some things have to be generated manually (documentation, ODB-generated source files).

I would suggest you consider using the pre-generated package instead of cloning, at least as a first step (once you get this working, you can always try to go back to cloning). The version for the latest release can always be programmatically discovered from this file: https://download.build2.org/toolchain.sha256

If you want to use the latest stuff, then the same for the staged version: https://stage.build2.org/0/toolchain.sha256

@aminya
Copy link
Author

aminya commented Mar 20, 2021

I don't know how you expect the users to install build2 while the friction of installation is so high, I doubt people will adopt this very good technology without binaries available.

I was trying to follow what is in this instruction, but I have a hard time replicating it in the CI. That's the same experience I had when I needed to install build2 locally.

https://www.build2.org/install.xhtml

@gl-yziquel
Copy link

The build2-toolchain project is not meant to be built directly after cloning. Rather, it must be dist'ed (which generates all the necessary scripts, etc).

I like to try get my source continually rebuilt in an automated way. So I'd be curious as to how one may "dist" the git repo. As of today, I only got past the bootstrapping stage, and am at a loss as to how to use the git repo on HEAD.

Instructions as to how one may "dist" the git repo would be very nice.

@boris-kolpackov
Copy link
Member

Instructions as to how one may "dist" the git repo would be very nice.

To be able to prepare a distribution of the build2-toolchain you will need a development build of build2 (with all the build-time dependencies like cli and odb). This is quite an involved process which is described in https://github.com/build2/HOWTO/blob/master/entries/setup-build2-for-development.md

I like to try get my source continually rebuilt in an automated way.

Due to the complexity, if you want the latest snapshots of build2, the recommended approach is to use the staged toolchain via this metadata file: https://stage.build2.org/0/toolchain.sha256 The file format is described here: https://download.build2.org/README This is the approach we use on our CI bots.

@gl-yziquel
Copy link

Thank you very much for the references. I tend to like to go for the involved process when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants