-
Notifications
You must be signed in to change notification settings - Fork 34
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
Run checks against pull requests #26
Conversation
4acc198
to
3f086b0
Compare
3f086b0
to
878b532
Compare
Checks are really slow due to the QEMU builds. Kind of annoying because it'll just eat up all the jobs in the allowed concurrent job limit if we get a lot of pushes. We can "skip" the QEMU jobs with - name: Skip non native builds on non master pushes
if: github.ref != 'master' && matrix.arch != 'amd64'
run: exit 1 It resolves the issue of eating up all the concurrent jobs but technically that's a job fail so it pollutes check output with loads of "failed" jobs. Massively reduces the usefulness of the checks though because the overall status will show as failed. We have to manually check all the amd64 builds passed to be sure nothing actually failed. |
After some digging it seems like it's currently just not possible to conditionally skip a matrix job with GitHub Actions. It's a shame because you can do that on most other CI systems. Looks like there was a "neutral" exit code in GitHub Action beta which would've allowed us to skip jobs. We could However it was removed because some programs could actually return that exit code in legitimate errors: https://twitter.com/ethomson/status/1163899559279497217 That tweet implies GitHub Actions still plans to support a neutral exit code but I can't find any documentation on it so doesn't look possible for now. |
TL;DR: Options are:
😕 @meeDamian let me know how you want me to proceed. |
.github/workflows/test.yml
Outdated
@@ -31,6 +28,10 @@ jobs: | |||
- amd64 | |||
|
|||
steps: | |||
- name: Skip non native builds on non master pushes | |||
if: github.ref != 'master' && matrix.arch != 'amd64' | |||
run: exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will cause the job to always be red on PRs, quite not ideal I'd say.
I think that's by far the best solution. |
Also maybe we can go with sth like: on:
pull_request:
- '*' And all arch-specific stuff can be removed too, making the workflow quite small, and nice. |
Let's keep |
So you don't wanna run tests on feature branches? PRs only? |
I intentionally left the two files as similar as possible so the git diffs should be almost identical. e.g I've left the My reasoning was that this makes it much easier to maintain them both and keep them in sync, we can just diff them and see that there are only the minimal trigger/matrix changes we want. Happy to clean up the PR version if you want but this might make maintaining them in parallel going forward more difficult. |
be68072
to
5e18ac1
Compare
Without the arch stuff, the file becomes really, simple: name: Build bitcoind on pull request
on: pull_request
jobs:
build:
name: Build Bitcoind
runs-on: ubuntu-18.04
env:
DOCKER_BUILDKIT: 1
strategy:
fail-fast: false
matrix:
subver:
- '0.16'
- '0.17'
- '0.18'
- '0.19'
steps:
- uses: actions/checkout@v1.0.0
- name: Build Bitcoind
run: docker build -t bitcoind ${{matrix.subver}}/
- name: Print Bitcoind version
run: |
docker run --rm --entrypoint=uname bitcoind -a
docker run --rm bitcoind --version And because of that, simple-to-read might be better here than simple-to-compare? |
We don't have any, will be thinking about it once we do :P And even if we do, if there's a PR open for it to |
79ca593
to
0c29254
Compare
After you change workflow description, I'm happy with it :). |
Fixed before you even commented 😛 Let's just wait for the builds to complete just to make sure I didn't bork anything. |
Now I wonder why |
Does it not run on cron:
https://github.com/lncm/docker-bitcoind/actions?query=workflow%3A%22Perf-check+qemu+versions%22 |
#27 ^^ |
So all these builds were triggered manually? https://github.com/lncm/docker-bitcoind/actions?query=workflow%3A%22Perf-check+qemu+versions%22 |
Lol, no - I'm just a bonehead 😂. |
Now checks will run against every feature branch and PR push instead of just pushes to master.
Resolves #21