-
Notifications
You must be signed in to change notification settings - Fork 149
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: Add GitHub Actions based CI #1591
ci: Add GitHub Actions based CI #1591
Conversation
Use GitHub Actions to add a CI workflow that runs on: * push events to master or on tags * pull request events targeting master * a weekly CRON job that runs every Sunday at 01:23 UTC * on GitHub releases * on demand against any branch through workflow dispatch Using concurrency groups if an event triggers another run of the workflow while a previous run in ongoing, the older run will be automaticcally canceled to avoid wasting resources. The jobs targeti CentOS based workflow to start off with: * Building with CMake like a user would and then running some libXrdCl tests. This build is a shorter build. * Building with CMake like a user would but with Python 3 pip, setuptools, and wheel updated to the latest releases to check that users running with modern releases won't hit breaking changes. * Building in full RPM. * Building a Python sdist with the publishing workflow scripts. * Building a Python sdist with the publishing workflow scripts, but with Python 3 pip, setuptools, and wheel updated to the latest releases to check that users running with modern releases won't hit breaking changes.
Travis CI is essentially deprecated
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true |
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.
This concurrency group will automatically cancel previous runs if a run on the same branch is triggered.
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: |
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.
GitHub Actions is a bit verbose, so there isn't much of a way to simplify this at the moment.
# Need to use v1 of action as image Git is too old | ||
- name: Clone repository now that Git is available | ||
uses: actions/checkout@v1 |
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.
The faster/nicer v2
of this action requires Git 2.18, and CentOS 7 ships v1.8.3.1
, so fall back to the old version here which still works.
# ./common/test-runner ./XrdClTests/libXrdClTests.so 'All Tests/PostMasterTest/' | ||
# ./common/test-runner ./XrdClTests/libXrdClTests.so 'All Tests/FileSystemTest/' | ||
# ./common/test-runner ./XrdClTests/libXrdClTests.so 'All Tests/LocalFileHandlerTest/' |
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.
These tests failed, so I left them in here as a TODO of sorts.
git \ | ||
cppunit-devel | ||
yum clean all | ||
python3 -m pip --no-cache-dir install --upgrade pip setuptools wheel |
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.
I've added these updated-python
jobs as it is important to check for changes that have happened in the pip
and setuptools
world that happen since CentOS 7 ships very old releases. Future Debian jobs will do a better job of checking this, as they have newer CPython releases while CentOS's Python 3.6 is capped out at setuptools
59.6.0
as setuptools
59.7.0
+ is Python 3.7+.
@simonmichal This is ready for review. To see this run in full please take a look at https://github.com/matthewfeickert/xrootd/runs/4819530943?check_suite_focus=true on my fork where I've just forced things to run $ git diff origin/ci/add-build-ci-workflow 86d8ef3
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2a93fd474..2959276fe 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -2,10 +2,10 @@ name: build
on:
push:
- branches:
- - master
- tags:
- - v*
+ # branches:
+ # - master
+ # tags:
+ # - v*
pull_request:
branches:
- master |
container: gitlab-registry.cern.ch/linuxsupport/cc7-base:latest | ||
|
||
steps: | ||
- name: Install external dependencies with yum |
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.
I'll note that these jobs fail sometimes infrequently because a mirror fails to be found in time. If these get restarted they pass.
Resolves #1589
Use GitHub Actions to add a CI workflow that runs on:
Using concurrency groups if an event triggers another run of the workflow while a previous run in ongoing, the older run will be automatically canceled to avoid wasting resources.
The jobs target CentOS based workflow to start off with:
At the moment only CentOS based jobs are added as Debian based jobs will fail for installation of the Python bindings given the Issues related to Issue #1579 and PR #1585 and #1586. Debian based jobs can be added along with fixes to these.