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 Cosmo" step takes 20m and is repeated for all 10 groups #57

Open
franalbani opened this issue Dec 14, 2024 · 4 comments
Open

Comments

@franalbani
Copy link

Before submitting a PR with new software, one has to fork and test that github actions work. For some things, it is impossible to test locally and iterating against the CI is a must. This is painful because the long times it takes.

I have some questions before trying to improve it:

  • do we need to use and build from scratch the latest cosmocc?
    • Can we just wget -qO $@ https://cosmo.zip/pub/cosmocc/cosmocc-3.9.2.zip?
  • Can we use intermediate docker images for:
    1. ubuntu apt-get install stuff
    2. previous + cosmocc

Am I missing something?

Thanks!

@ahgamut
Copy link
Owner

ahgamut commented Dec 14, 2024

I agree, there should be a focus on improving local testing.
Right now, I test on a local Linux machine/VM, and the only major thing to check for is the /zip requirement.

Perhaps we can have a separate github action for just PRs?

@jart
Copy link
Collaborator

jart commented Dec 14, 2024

SuperConfigure is what builds the cosmocc binaries. It also fetches an older version of cosmocc as part of its build process, to bootstrap building the cosmo repo.

If you're adding a project to a folder like editor/ or web/ then you shouldn't need to wait for GCC to compile from scratch to get feedback on your PR. @ahgamut what I would recommend doing is adding an additional GA runner for each folder, which only builds that folder. Then we just tell people, if you're adding an editor and the "editors" GA is green, then you're good to go.

@franalbani
Copy link
Author

I still don't fully understand, but while I do, I want to ask:

  1. Can this new Github action be as simple as cloning cosmopolitan and using tool/cosmocc or wget https://cosmo.zip/pub/cosmocc/cosmocc-3.9.2.zip and unzip?
  2. Can superconfigure follow this (which looks simpler than the current CI)?
  3. Is there a way to locally replicate the CI without:
  • using a VM
  • using docker
  • requiring root access in the host system (e.g., for binfmt_misc)

I usually desire to make the CI as close to "local" as possible. I know how to do it with docker, but I also feel that philosophically goes against the spirit of cosmopolitan so I would love to learn how to do it without it.

@franalbani
Copy link
Author

Also, when I try sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register" inside an ubuntu-latest docker container I get sh: 1: cannot create /proc/sys/fs/binfmt_misc/register: Directory nonexistent.

Why is it possible in the Github Action?

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

No branches or pull requests

3 participants