yrnkrn / zapcc

zapcc is a caching C++ compiler based on clang, designed to perform faster compilations
Other
1.25k stars 61 forks source link

Use GitHub Actions to build binaries #38

Closed kramred closed 4 years ago

kramred commented 4 years ago

Hello,

this is similar to https://github.com/yrnkrn/zapcc/pull/31 and https://github.com/yrnkrn/zapcc/pull/30, except that it is using the free (beta) GitHub Actions workflows – see also this Overview on Automating your workflow with GitHub Actions

You currently have to sign up to enable beta access.

The yaml file in the PR is configured to trigger the workflow (i.e. currently the builds for Ubuntu Linux and macOS) only on push events to branches captured by release/* - feel free to change that however you see fit (e.g. all push events and also pull requests)

The tests did not all pass in my trial runs, there may be some more work necessary to capture the output of the ninja check-all run.

Windows would also be available as one of the Supported virtual environments and hardware resources

I have not tested the binaries as I was mainly trying to get the workflows to run, you can find the uploaded artifacts in the top right corner of the respective workflows (see image) - link to example workflow with artifacts

github_com_kramred_zapcc_commit_034e1ad7e7d12c1eaca30de07ec3396defa23310_checks_check_suite_id_256114198_Laptop_with_MDPI_screen_

Also, it currently publishes the whole build folder, which might be a bit too much.

~ Mark

yrnkrn commented 4 years ago

Thanks for implementing this! I'd like to see Github Actions out of beta before committing to master branch. Specifically, if the usage limits are enough (when out of beta) as building & testing zapcc is quite heavy.

kramred commented 4 years ago

Yes, I agree that the current limitations (up to 20 workflows concurrently per repository, up to 1000 API requests in an hour across all actions, each job in a workflow can run for up to 6 hours of execution time, up to 20 jobs concurrently per repository) sound almost too generous – let's see if they keep it that way. The build times were 1 h 34 min on Ubuntu and 39 min on macOS, but the mac VM has 4 vCPUs and 12 GB RAM, whereas the Linux VM has 2 vCPUs and ~7 GB RAM The size of the zipped build folder was ~3.1 GB for Ubuntu and ~2.2 GB for macOS.

yrnkrn commented 4 years ago

Thanks!

kramred commented 4 years ago

What a coincidence in timing. I was just going over the build instructions again. I restructured the yaml file a bit and fixed some bugs. Will open new PR.