Skip to content

Commit 8b24c20

Browse files
author
Release Manager
committed
gh-35108: src/doc/en/developer/portability_testing.rst: Update after migration …to GitHub (no more sagetrac-mirror) <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### 📚 Description We update the documentation on portability testing. - Instead of referring to trac and sagetrac-mirror, we direct users to use their personal fork - We remove the description of a method using pull requests because #34942 disabled it - We update according to changed defaults on GH Actions. <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> Test running at: https://github.com/mkoeppe/sage/actions/runs/4911075567/jobs/8768884045 (the "standard", "minimal" etc. jobs without "-pre" should now work). URL: #35108 Reported by: Matthias Köppe Reviewer(s): Dima Pasechnik, Matthias Köppe, Tobias Diez
2 parents d73d7d7 + c49fc13 commit 8b24c20

File tree

2 files changed

+58
-49
lines changed

2 files changed

+58
-49
lines changed

.github/workflows/ci-linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ env:
2929
TARGETS: build doc-html
3030
TARGETS_OPTIONAL: ptest
3131

32+
permissions:
33+
packages: write
34+
3235
jobs:
3336

3437
standard-pre:

src/doc/en/developer/portability_testing.rst

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -950,49 +950,70 @@ Automatic testing on multiple platforms on GitHub Actions
950950
=========================================================
951951

952952
The Sage source tree includes a default configuration for GitHub
953-
Actions that runs our portability tests with tox on a multitude of
954-
platforms on every pull request and on every push of a tag (but not of
955-
a branch) to a repository for which GitHub Actions are enabled.
953+
Actions that runs our portability tests on a multitude of platforms on
954+
every push of a tag (but not of a branch) to a repository for which
955+
GitHub Actions are enabled.
956956

957-
In particular, it automatically runs on our main repository on every
958-
release tag.
957+
In particular, it automatically runs on our main repository sagemath/sage
958+
on every release tag.
959959

960-
This is defined in the files `$SAGE_ROOT/.github/workflows/tox*.yml
961-
<https://github.com/sagemath/sage/tree/develop/.github/workflows/tox.yml>`_.
960+
This is defined in the files
962961

963-
An additional GitHub Actions workflow for testing on Cygwin, not based
964-
on tox, is defined in the files
965-
`$SAGE_ROOT/.github/workflows/ci-cygwin*.yml
966-
<https://github.com/sagemath/sage/tree/develop/.github/workflows/ci-cygwin-standard.yml>`_.
962+
- `$SAGE_ROOT/.github/workflows/ci-linux.yml
963+
<https://github.com/sagemath/sage/tree/develop/.github/workflows/ci-linux.yml>`_
964+
(which calls `$SAGE_ROOT/.github/workflows/docker.yml
965+
<https://github.com/sagemath/sage/tree/develop/.github/workflows/docker.yml>`_),
966+
967+
- `$SAGE_ROOT/.github/workflows/ci-macos.yml
968+
<https://github.com/sagemath/sage/tree/develop/.github/workflows/ci-macos.yml>`_, and
969+
970+
- `$SAGE_ROOT/.github/workflows/ci-cygwin-standard.yml
971+
<https://github.com/sagemath/sage/tree/develop/.github/workflows/ci-cygwin-standard.yml>`_
972+
(which calls `$SAGE_ROOT/.github/workflows/cygwin.yml
973+
<https://github.com/sagemath/sage/tree/develop/.github/workflows/cygwin.yml>`_).
967974

968975
GitHub Actions runs these build jobs on 2-core machines with 7 GB of
969976
RAM memory and 14 GB of SSD disk space, cf.
970977
`here <https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources>`_,
971-
and has a time limit of 6h per job. This is just barely enough for a
972-
typical ``minimal`` build followed by ``make ptest`` to succeed; and
973-
plenty of time for a typical ``standard`` build to succeed.
978+
and has a time limit of 6h per job. This could be just barely enough for a
979+
typical ``minimal`` build followed by ``make ptest`` to succeed; for
980+
added robustness, we split it into two jobs. Our workflow stores
981+
Docker images corresponding to various build phases within these two
982+
jobs on `GitHub Packages <https://github.com/features/packages>`_ (ghcr.io).
983+
984+
Build logs can be inspected during the run and become available as
985+
"artifacts" when all jobs of the workflow have finished. Each job
986+
generates one tarball. "Annotations" highlight certain top-level
987+
errors or warnings issued during the build.
988+
989+
In addition to these automatic runs in our main repository, all Sage
990+
developers can run the same tests on GitHub Actions in their personal
991+
forks of the Sage repository. To prepare this, `enable GitHub Actions <https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#managing-github-actions-permissions-for-your-repository>`_
992+
in your fork of the Sage repository.
993+
994+
As usual we assume that ``origin`` is the name of the remote
995+
corresponding to your GitHub fork of the Sage repository::
996+
997+
$ git remote -v | grep origin
998+
origin https://github.com/mkoeppe/sage.git (fetch)
999+
origin https://github.com/mkoeppe/sage.git (push)
9741000

975-
Build logs become available as "artifacts" when all jobs of the
976-
workflow have finished. Each job generates one tarball.
977-
"Annotations" highlight certain top-level errors or warnings issued
978-
during the build.
1001+
Then the following procedure triggers a run of tests with the default set
1002+
of system configurations.
9791003

980-
The following procedure triggers a run of tests with the default set of
981-
system configurations.
1004+
- Push your branch to ``origin`` (your fork).
9821005

983-
- Push your changes to trac.
984-
- Go to the `Actions page on the GitHub mirror <https://github.com/sagemath/sagetrac-mirror/actions>`_ and select the workflow you would like to run.
985-
- Click on "Run workflow" above the list of workflow runs and select the branch where the workflow will run.
1006+
- Go to the Actions tab of your fork and select the workflow you would like to run,
1007+
for example "CI Linux".
9861008

987-
For more information, see the `GitHub documentation <https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow>`_.
1009+
- Click on "Run workflow" above the list of workflow runs and select
1010+
your branch as the branch on which the workflow will run.
9881011

989-
Alternatively, you can create and push a custom tag in order to trigger a run of tests as follows.
990-
Let's assume that ``my-github`` is the name of
991-
the remote corresponding to your GitHub fork of the Sage repository::
1012+
For more information, see the `GitHub documentation
1013+
<https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow>`_.
9921014

993-
$ git remote -v | grep /my-github
994-
my-github https://github.com/mkoeppe/sage.git (fetch)
995-
my-github https://github.com/mkoeppe/sage.git (push)
1015+
Alternatively, you can trigger a run of tests by creating and pushing
1016+
a custom tag as follows.
9961017

9971018
- Create a ("lightweight", not "annotated") tag with an arbitrary
9981019
name, say ``ci`` (for "Continuous Integration")::
@@ -1001,36 +1022,21 @@ the remote corresponding to your GitHub fork of the Sage repository::
10011022

10021023
- Then push the tag to your GitHub repository::
10031024

1004-
git push -f my-github ci
1025+
git push -f origin ci
10051026

10061027
(In both commands, the "force" option (``-f``) allows overwriting a
10071028
previous tag of that name.)
10081029

1009-
For testing branches against a custom set of system configurations
1010-
during development, the following procedure seems to work well. It
1011-
avoids changing the CI configuration on your development branch:
1012-
1013-
- Create a branch from a recent beta release that contains the default
1014-
GitHub Actions configuration; name it ``TESTER``, say.
1015-
1016-
- Edit ``$SAGE_ROOT/.github/workflows/tox.yml`` to include the system
1017-
config you wish to test.
1018-
1019-
- Commit and push the branch to your GitHub fork of sage.
1020-
1021-
- Push your development branch to your GitHub repository and create a
1022-
pull request against the ``TESTER`` branch. This will trigger the
1023-
GitHub Actions workflow.
1024-
1025-
You will find a workflow status page in the "Actions" tab of your
1030+
Either way, when the workflow has been triggered, you can inspect it
1031+
by using the workflow status page in the "Actions" tab of your
10261032
repository.
10271033

10281034
Here is how to read it. Each of the items in the left pane represents
10291035
a full build of Sage on a particular system configuration. A test
10301036
item in the left pane is marked with a green checkmark in the left
10311037
pane if ``make build doc-html`` finished without error. (It also runs
10321038
package testsuites and the Sage doctests but failures in these are not
1033-
in reflected in the left pane; see below.)
1039+
reflected in the left pane; see below.)
10341040

10351041
The right pane ("Artifacts") offers archives of the logs for download.
10361042

0 commit comments

Comments
 (0)