Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit b327485

Browse files
author
Release Manager
committed
Trac #29534: Trigger CI workflows on GitHub Actions by pushing tags
1. If a developers wants to run the standard set of CI tests, just pushing a tag is a simpler interface than creating a pull request: `git tag -f "ci" && git push --force github "ci"` 2. Also this ensures that releases always trigger a CI test. Follow-up (wishlist): #29535 Customize CI workflows on !GitHub Actions using specially structured tag names URL: https://trac.sagemath.org/29534 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Dima Pasechnik
2 parents a738646 + 81fa6c3 commit b327485

File tree

4 files changed

+37
-3
lines changed

4 files changed

+37
-3
lines changed

.github/workflows/ci-cygwin.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: windows-latest
33
on:
44
pull_request:
55
types: [opened, synchronize]
6+
push:
7+
tags:
8+
- '*'
69

710
env:
811
MAKE: make -j8

.github/workflows/tox-optional.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ name: Run SAGE_ROOT/tox.ini TARGETS_OPTIONAL
2020
on:
2121
pull_request:
2222
types: [opened, synchronize]
23+
push:
24+
tags:
25+
- '*'
2326

2427
env:
2528
TARGETS_PRE: build/make/Makefile

.github/workflows/tox.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ name: Run SAGE_ROOT/tox.ini
2020
on:
2121
pull_request:
2222
types: [opened, synchronize]
23+
push:
24+
tags:
25+
- '*'
2326

2427
env:
2528
TARGETS_PRE: sagelib-build-deps

src/doc/en/developer/portability_testing.rst

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,8 @@ Automatic parallel tox runs on GitHub Actions
916916

917917
The Sage source tree includes a default configuration for GitHub
918918
Actions that runs tox on a multitude of platforms on every pull
919-
request to a repository for which GitHub Actions are enabled.
919+
request and on every push of a tag (but not of a branch) to a
920+
repository for which GitHub Actions are enabled.
920921

921922
This is defined in the file ``$SAGE_ROOT/.github/workflows/tox.yml``.
922923

@@ -936,8 +937,29 @@ workflow have finished. Each job generates one tarball.
936937
"Annotations" highlight certain top-level errors or warnings issued
937938
during the build.
938939

939-
The following procedure seems to work well for testing branches during
940-
development:
940+
The following procedure triggers a run of tests with the default set of
941+
system configurations. Let's assume that ``github`` is the name of
942+
the remote corresponding to your GitHub fork of the Sage repository::
943+
944+
$ git remote -v | grep /my-github
945+
my-github https://github.com/mkoeppe/sage.git (fetch)
946+
my-github https://github.com/mkoeppe/sage.git (push)
947+
948+
- Create a ("lightweight", not "annotated") tag with an arbitrary
949+
name, say ``ci`` (for "Continuous Integration")::
950+
951+
git tag -f ci
952+
953+
- Then push the tag to your GitHub repository::
954+
955+
git push -f my-github ci
956+
957+
(In both commands, the "force" option (``-f``) allows overwriting a
958+
previous tag of that name.)
959+
960+
For testing branches against a custom set of system configurations
961+
during development, the following procedure seems to work well. It
962+
avoids changing the CI configuration on your development branch:
941963

942964
- Create a branch from a recent beta release that contains the default
943965
GitHub Actions configuration; name it ``TESTER``, say.
@@ -951,6 +973,9 @@ development:
951973
pull request against the ``TESTER`` branch. This will trigger the
952974
GitHub Actions workflow.
953975

976+
You will find a workflow status page in the "Actions" tab of your
977+
repository.
978+
954979
Here is how to read it. Each of the items in the left pane represents
955980
a full build of Sage on a particular system configuration. A test
956981
item in the left pane is marked with a green checkmark in the left

0 commit comments

Comments
 (0)