From 0019b0af43b9e381e2f0b14753d1bf40ce204490 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Nov 2021 20:08:49 -0500 Subject: Require Python 3.7 or later. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6aad7f11..5424298d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: python: - - 3.6 + - 3.7 - 3.9 - "3.10" platform: -- cgit v1.2.1 From b9a562a9b6c268d0a3f4cc261d1b28ea91b081d7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 27 Nov 2021 21:21:31 -0800 Subject: .github/workflows/main.yml: Add test_cygwin --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 265be849..d326b635 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,6 +40,25 @@ jobs: ${{ runner.os }}, ${{ matrix.python }} + test_cygwin: + strategy: + matrix: + distutils: + - stdlib + - local + runs-on: windows-latest + env: + SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} + steps: + - uses: actions/checkout@v2 + - name: Install Cygwin with Python and tox + run: | + choco install git gcc-core python38-devel python38-pip --source cygwin + C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' + - name: Run tests + run: | + C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && tox -- --cov-report xml' + release: needs: test if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') -- cgit v1.2.1 From a9e48a650be03781cba76de2b2863c7136219bcf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 17 Dec 2021 22:14:27 -0500 Subject: Try using pypy-3.7 as that's what the readme suggests. Fixes #2931. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07c560e3..6b546dc4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: - stdlib - local python: - - pypy3 + - pypy-3.7 - 3.7 - 3.9 - "3.10" -- cgit v1.2.1 From 2a95a48dcee29f2396bee63de34e2ad0ef1247a3 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 18 Dec 2021 09:14:03 +0100 Subject: CI: add a CI job for testing under Cygwin There are some tests skipped because of missing docutils, but cygwin currently is missing a docutils package for Python 3.9 --- .github/workflows/main.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 947b8551..bd0e1992 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,6 +21,30 @@ jobs: - name: Run tests run: tox + test_cygwin: + strategy: + matrix: + python: [39] + platform: [windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - name: Install Cygwin + uses: cygwin/cygwin-install-action@v1 + with: + platform: x86_64 + packages: >- + python${{ matrix.python }}, + python${{ matrix.python }}-devel, + python${{ matrix.python }}-pytest, + gcc-core, + gcc-g++, + ncompress + - name: Run tests + shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0} + run: | + pytest -rs + ci_setuptools: # Integration testing with setuptools strategy: -- cgit v1.2.1 From 266b905b898c80c70bce0f0ed694e53900803fb2 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 8 Nov 2021 14:19:20 +0000 Subject: Run integration tests before release on CI --- .github/workflows/main.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a01e9a5..cb524369 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,9 +59,37 @@ jobs: run: | C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && tox -- --cov-report xml' - release: + integration-test: needs: test if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + # To avoid long times and high resource usage, we assume that: + # 1. The setuptools APIs used by packages don't vary too much with OS or + # Python implementation + # 2. Any circumstance for which the previous assumption is not valid is + # already tested via unit tests (or other tests not classified here as + # "integration") + # With that in mind, the integration tests can run for a single setup + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install OS-level dependencies + run: | + sudo apt-get update + sudo apt-get install build-essential gfortran libopenblas-dev + - name: Setup Python + uses: actions/setup-python@v2 + with: + # Use a release that is not very new but still have a long life: + python-version: "3.8" + - name: Install tox + run: | + python -m pip install tox + - name: Run integration tests + run: tox -e integration + + release: + needs: [test, integration-test] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: -- cgit v1.2.1 From 79f6a3fa77407405259242cbdd85d4ff78ed7193 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 Dec 2021 15:24:39 -0500 Subject: Use line-based matrix values for nicer diffs. Remove Python 3.6 and bump to Python 3.10, matching jaraco/skeleton and pypa/setuptools approaches. --- .github/workflows/main.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd0e1992..bd2dc8f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,8 +6,14 @@ jobs: test: strategy: matrix: - python: [3.6, 3.8, 3.9] - platform: [ubuntu-latest, macos-latest, windows-latest] + python: + - 3.7 + - 3.9 + - "3.10" + platform: + - ubuntu-latest + - macos-latest + - windows-latest runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -24,8 +30,10 @@ jobs: test_cygwin: strategy: matrix: - python: [39] - platform: [windows-latest] + python: + - "3.10" + platform: + - windows-latest runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -49,8 +57,10 @@ jobs: # Integration testing with setuptools strategy: matrix: - python: [3.9] - platform: [ubuntu-latest] + python: + - "3.10" + platform: + - ubuntu-latest runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: local @@ -89,7 +99,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.10" - name: Install tox run: | python -m pip install tox -- cgit v1.2.1 From ddafa7b8aa83c2596391dcf65723e6e3b39ca1a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Dec 2021 13:01:32 -0500 Subject: Disable setuptools installation. Fixes pypa/distutils#99. --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd2dc8f2..d9e219ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,6 +2,10 @@ name: tests on: [push, pull_request] +env: + # pypa/distutils#99 + VIRTUALENV_NO_SETUPTOOLS: 1 + jobs: test: strategy: -- cgit v1.2.1 From eb337f6440da3d9aaedf6ba92674c283ca34e2e2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Dec 2021 13:09:56 -0500 Subject: Also use PEP 517 to build things like pytest-virtualenv. --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9e219ae..60d07948 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: [push, pull_request] env: # pypa/distutils#99 VIRTUALENV_NO_SETUPTOOLS: 1 + PIP_USE_PEP517: 1 jobs: test: -- cgit v1.2.1 From 2842e802a42c7eb9fd8fc80336cb65f077dfd49c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Dec 2021 13:15:09 -0500 Subject: 39 is actually required to get the right packages. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 60d07948..dcd8b901 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: python: - - "3.10" + - 3.9 platform: - windows-latest runs-on: ${{ matrix.platform }} @@ -47,9 +47,9 @@ jobs: with: platform: x86_64 packages: >- - python${{ matrix.python }}, - python${{ matrix.python }}-devel, - python${{ matrix.python }}-pytest, + python${{ matrix.python//.// }}, + python${{ matrix.python//.// }}-devel, + python${{ matrix.python//.// }}-pytest, gcc-core, gcc-g++, ncompress -- cgit v1.2.1 From 9f2b840b218b6f46ede9d75b3c79db1042b433dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Dec 2021 13:17:53 -0500 Subject: Unset VIRTUALENV_NO_SETUPTOOLS for ci_setuptools because pytest-virtualenv can't install without it. Ref man-group/pytest-plugins#190 --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dcd8b901..e404559b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,6 @@ on: [push, pull_request] env: # pypa/distutils#99 VIRTUALENV_NO_SETUPTOOLS: 1 - PIP_USE_PEP517: 1 jobs: test: @@ -93,6 +92,8 @@ jobs: run: | cd integration/setuptools tox + env: + VIRTUALENV_NO_SETUPTOOLS: null release: needs: test -- cgit v1.2.1 From 0dfbfb81c67708aa55aa35bf612bd6769eb4eaa4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Dec 2021 13:19:59 -0500 Subject: It really must be literally 39. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e404559b..37087511 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: strategy: matrix: python: - - 3.9 + - 39 platform: - windows-latest runs-on: ${{ matrix.platform }} @@ -46,9 +46,9 @@ jobs: with: platform: x86_64 packages: >- - python${{ matrix.python//.// }}, - python${{ matrix.python//.// }}-devel, - python${{ matrix.python//.// }}-pytest, + python${{ matrix.python }}, + python${{ matrix.python }}-devel, + python${{ matrix.python }}-pytest, gcc-core, gcc-g++, ncompress -- cgit v1.2.1 From d8e82cbefdde64aad947f196477312f82e06ac1e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Dec 2021 17:24:22 -0500 Subject: Include Python 3.8 in tests. Ref pypa/distutils#100. --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37087511..35685723 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ jobs: matrix: python: - 3.7 + - 3.8 - 3.9 - "3.10" platform: -- cgit v1.2.1 From 2c9205f5befee894ce3233958464633bfb79ce19 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 6 Jan 2022 18:55:43 +0000 Subject: Add SETUPTOOLS_USE_DISTUTILS configuration to integration tests --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa51eeaf..a9f37c5a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,6 +61,11 @@ jobs: C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && tox -- --cov-report xml' integration-test: + strategy: + matrix: + distutils: + - stdlib + - local needs: test if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') # To avoid long times and high resource usage, we assume that: @@ -71,6 +76,8 @@ jobs: # "integration") # With that in mind, the integration tests can run for a single setup runs-on: ubuntu-latest + env: + SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} steps: - uses: actions/checkout@v2 - name: Install OS-level dependencies -- cgit v1.2.1 From 818a6d973a86f43d60188b36e9f3b59781a94a37 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 6 Jan 2022 18:56:08 +0000 Subject: Allow integration tests to be manually triggered in GitHub Actions --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a9f37c5a..e2441363 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: tests -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: test: @@ -67,7 +67,7 @@ jobs: - stdlib - local needs: test - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/')) # To avoid long times and high resource usage, we assume that: # 1. The setuptools APIs used by packages don't vary too much with OS or # Python implementation -- cgit v1.2.1 From 9c7e59c1e4f14c504b1c9016e35cec549d9f6b81 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 6 Jan 2022 21:58:27 +0000 Subject: Ensure test_cygwin pass before CI release action It seems that the release action in the CI was running even when the cygwin tests did not pass... It is likely we want it to pass first. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2441363..dd6cef70 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -96,7 +96,7 @@ jobs: run: tox -e integration release: - needs: [test, integration-test] + needs: [test, test_cygwin, integration-test] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') runs-on: ubuntu-latest -- cgit v1.2.1 From 464568d64469fb1ca9794ef26fe2288f16c15598 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Jan 2022 16:43:07 -0500 Subject: Disable cygwin tests for now. Ref #3016. --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd6cef70..6ae4a264 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,7 @@ jobs: ${{ matrix.python }} test_cygwin: + if: ${{ false }} # failing #3016 strategy: matrix: distutils: -- cgit v1.2.1 From 78aa84b23fe2ea8a2c041d99f80ec0a86d0ce588 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 17 Jan 2022 18:38:24 +0100 Subject: CI/cygwin: use cygwin/cygwin-install-action instead of choco Use the official GH action for installing cygwin instead of going through choco. See #3016 --- .github/workflows/main.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ae4a264..3a15246e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,13 +53,24 @@ jobs: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} steps: - uses: actions/checkout@v2 - - name: Install Cygwin with Python and tox + - name: Install Cygwin with Python + uses: cygwin/cygwin-install-action@v1 + with: + platform: x86_64 + packages: >- + git, + gcc-core, + python38, + python38-devel, + python38-pip + - name: Install tox + shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0} run: | - choco install git gcc-core python38-devel python38-pip --source cygwin - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' + python3.8 -m pip install tox - name: Run tests + shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0} run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && tox -- --cov-report xml' + tox -- --cov-report xml integration-test: strategy: -- cgit v1.2.1 From 0a647139866d97c469fa436bccfd4bbae594ab53 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 17 Jan 2022 19:57:18 +0100 Subject: CI: re-enable the cygwin jobs again --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a15246e..821cf883 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,7 +42,6 @@ jobs: ${{ matrix.python }} test_cygwin: - if: ${{ false }} # failing #3016 strategy: matrix: distutils: -- cgit v1.2.1 From 05bd74c933c1471525e50b1e21d4d4ed1f492343 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jan 2022 20:21:51 -0500 Subject: Replace IRC link with Discord. Restore default for blank issues. --- .github/ISSUE_TEMPLATE/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index dde102ca..6d62a68b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,3 @@ -# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser -blank_issues_enabled: false # default: true contact_links: - name: 🤔 Have questions or need support? url: https://github.com/pypa/setuptools/discussions @@ -9,7 +7,6 @@ contact_links: about: | Please ask typical Q&A here: general ideas for Python packaging, questions about structuring projects and so on -- name: >- - 💬 IRC: #pypa @ Freenode - url: https://webchat.freenode.net/#pypa +- name: 💬 Discord (chat) + url: https://discord.com/channels/803025117553754132/815945031150993468 about: Chat with devs -- cgit v1.2.1 From 23ce525c5c4294b703a1ff8dd3cc5bc71365306b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jan 2022 20:24:18 -0500 Subject: Use the generic invite link to pypa discord. Has better redirect behavior. --- .github/ISSUE_TEMPLATE/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 6d62a68b..ebc2d339 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -8,5 +8,5 @@ contact_links: Please ask typical Q&A here: general ideas for Python packaging, questions about structuring projects and so on - name: 💬 Discord (chat) - url: https://discord.com/channels/803025117553754132/815945031150993468 + url: https://discord.com/invite/pypa about: Chat with devs -- cgit v1.2.1 From 6b58198db2ed3e3a60a83457c28f229d31c7c529 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jan 2022 20:30:19 -0500 Subject: Remove CoC checkbox as unnecessary friction. [ref](https://discuss.python.org/t/what-to-do-with-contributors-who-refuse-code-of-conduct/13287) --- .github/ISSUE_TEMPLATE/bug-report.yml | 11 ----------- 1 file changed, 11 deletions(-) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 73911ec8..672acd18 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -115,15 +115,4 @@ body: validations: required: true - -- type: checkboxes - attributes: - label: Code of Conduct - description: | - Read the [PSF Code of Conduct][CoC] first. - - [CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md - options: - - label: I agree to follow the PSF Code of Conduct - required: true ... -- cgit v1.2.1 From cae41c6a5546bfa9a80bda5841505331e566cdc1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 Dec 2021 11:36:25 -0800 Subject: .github/workflows/ci-sage.yml: New --- .github/workflows/ci-sage.yml | 155 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 .github/workflows/ci-sage.yml (limited to '.github') diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml new file mode 100644 index 00000000..191564fa --- /dev/null +++ b/.github/workflows/ci-sage.yml @@ -0,0 +1,155 @@ +name: Run Sage CI for Linux + +## This GitHub Actions workflow provides: +## +## - portability testing, by building and testing this project on many platforms +## +## - continuous integration, by building and testing other software +## that depends on this project. +## +## It runs on every pull request and push of a tag to the GitHub repository. +## +## The testing can be monitored in the "Actions" tab of the GitHub repository. +## +## After all jobs have finished (or are canceled) and a short delay, +## tar files of all logs are made available as "build artifacts". +## +## This GitHub Actions workflow uses the portability testing framework +## of SageMath (https://www.sagemath.org/). For more information, see +## https://doc.sagemath.org/html/en/developer/portability_testing.html + +## The workflow consists of two jobs: +## +## - First, it builds a source distribution of the project +## and generates a script "update-pkgs.sh". It uploads them +## as a build artifact named upstream. +## +## - Second, it checks out a copy of the SageMath source tree. +## It downloads the upstream artifact and replaces the project's +## package in the SageMath distribution by the newly packaged one +## from the upstream artifact, by running the script "update-pkgs.sh". +## Then it builds a small portion of the Sage distribution. +## +## Many copies of the second step are run in parallel for each of the tested +## systems/configurations. + +#on: [push, pull_request] + +on: + pull_request: + types: [opened, synchronize] + push: + tags: + - '*' + workflow_dispatch: + # Allow to run manually + +env: + # Ubuntu packages to install so that the project's "setup.py sdist" can succeed + DIST_PREREQ: python3 + # Name of this project in the Sage distribution + SPKG: setuptools + # Sage distribution packages to build + TARGETS_PRE: build/make/Makefile + TARGETS: setuptools pyzmq + TARGETS_OPTIONAL: build/make/Makefile + # Standard setting: Test the current beta release of Sage: + SAGE_REPO: sagemath/sage + SAGE_REF: develop + # Temporarily test with the branch from sage ticket + # (this is a no-op after that ticket is merged) + #SAGE_TRAC_GIT: https://github.com/sagemath/sagetrac-mirror.git + #SAGE_TICKET: 32579 + REMOVE_PATCHES: "*" + +jobs: + + dist: + runs-on: ubuntu-latest + steps: + - name: Check out ${{ env.SPKG }} + uses: actions/checkout@v2 + with: + path: build/pkgs/${{ env.SPKG }}/src + - name: Install prerequisites + run: | + sudo DEBIAN_FRONTEND=noninteractive apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install $DIST_PREREQ + python3 -m pip install build + - name: Run make dist, prepare upstream artifact + run: | + (cd build/pkgs/${{ env.SPKG }}/src && python3 -m bootstrap && python3 -m build --sdist) \ + && mkdir -p upstream && cp build/pkgs/${{ env.SPKG }}/src/dist/*.tar.gz upstream/${{ env.SPKG }}-git.tar.gz \ + && echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \ + && if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \ + && ls -l upstream/ + - uses: actions/upload-artifact@v2 + with: + path: upstream + name: upstream + + docker: + runs-on: ubuntu-latest + needs: [dist] + strategy: + fail-fast: false + max-parallel: 32 + matrix: + tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, ubuntu-impish, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-8, gentoo, gentoo-python3.7, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386, raspbian-buster-armhf] + tox_packages_factor: [minimal, standard] + env: + TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} + LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} + DOCKER_TARGETS: configured with-targets with-targets-optional + steps: + - name: Check out SageMath + uses: actions/checkout@v2 + with: + repository: ${{ env.SAGE_REPO }} + ref: ${{ env.SAGE_REF }} + fetch-depth: 2000 + if: env.SAGE_REPO != '' + - name: Check out git-trac-command + uses: actions/checkout@v2 + with: + repository: sagemath/git-trac-command + path: git-trac-command + if: env.SAGE_TRAC_GIT != '' + - name: Check out SageMath from trac.sagemath.org + shell: bash {0} + run: | + git config --global user.email "ci-sage@example.com" + git config --global user.name "ci-sage workflow" + if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac fetch $SAGE_TICKET; then git merge FETCH_HEAD || echo "(ignored)"; exit 0; fi; sleep 40; done; exit 1 + if: env.SAGE_TRAC_GIT != '' + - uses: actions/download-artifact@v2 + with: + path: upstream + name: upstream + - name: Install test prerequisites + run: | + sudo DEBIAN_FRONTEND=noninteractive apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install tox python3-setuptools + - name: Update Sage packages from upstream artifact + run: | + (export PATH=$(pwd)/build/bin:$PATH; (cd upstream && bash -x update-pkgs.sh) && sed -i.bak '/upstream/d' .dockerignore && echo "/:toolchain:/i ADD upstream upstream" | sed -i.bak -f - build/bin/write-dockerfile.sh && git diff) + - name: Configure and build Sage distribution within a Docker container + run: | + set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;" + - name: Copy logs from the Docker image or build container + run: | + mkdir -p "artifacts/$LOGS_ARTIFACT_NAME" + cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME" + if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi + if [ -n "$CONTAINERS" ]; then for CONTAINER in $CONTAINERS; do for ARTIFACT in /sage/logs; do docker cp $CONTAINER:$ARTIFACT artifacts/$LOGS_ARTIFACT_NAME && HAVE_LOG=1; done; if [ -n "$HAVE_LOG" ]; then break; fi; done; fi + if: always() + - uses: actions/upload-artifact@v2 + with: + path: artifacts + name: ${{ env.LOGS_ARTIFACT_NAME }} + if: always() + - name: Print out logs for immediate inspection + # and markup the output with GitHub Actions logging commands + run: | + .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME" + if: always() -- cgit v1.2.1 From 96947f4e5c44f1972b1f1359b90dc1529f862fd4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 30 Jan 2022 16:23:33 -0800 Subject: .github/workflows/ci-sage.yml: Remove flaky platforms, add new platforms --- .github/workflows/ci-sage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 191564fa..3df4617b 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -95,7 +95,7 @@ jobs: fail-fast: false max-parallel: 32 matrix: - tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, ubuntu-impish, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-8, gentoo, gentoo-python3.7, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386, raspbian-buster-armhf] + tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, fedora-36, centos-7, centos-8, gentoo-python3.9, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386] tox_packages_factor: [minimal, standard] env: TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} -- cgit v1.2.1 From 0d5caf2c42cff3641466b4c9f0898ab235ac9fb7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 30 Jan 2022 22:24:57 -0800 Subject: .github/workflows/ci-sage.yml: Remove fedora-36, not ready --- .github/workflows/ci-sage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 3df4617b..892d13df 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -95,7 +95,7 @@ jobs: fail-fast: false max-parallel: 32 matrix: - tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, fedora-36, centos-7, centos-8, gentoo-python3.9, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386] + tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-8, gentoo-python3.9, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386] tox_packages_factor: [minimal, standard] env: TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} -- cgit v1.2.1 From a53b404fce7f50874ff8cb7c40d2f2e744d125fb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 4 Feb 2022 11:43:02 -0800 Subject: .github/workflows/ci-sage.yml: Use https://trac.sagemath.org/ticket/33288 for CI fixes --- .github/workflows/ci-sage.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 892d13df..ef1e95fc 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -56,10 +56,11 @@ env: # Standard setting: Test the current beta release of Sage: SAGE_REPO: sagemath/sage SAGE_REF: develop - # Temporarily test with the branch from sage ticket - # (this is a no-op after that ticket is merged) - #SAGE_TRAC_GIT: https://github.com/sagemath/sagetrac-mirror.git - #SAGE_TICKET: 32579 + # Test with the branch from https://trac.sagemath.org/ticket/33288 + # This may provide hotfixes for the CI that have not been merged into + # the sage develop branch yet. + SAGE_TRAC_GIT: https://github.com/sagemath/sagetrac-mirror.git + SAGE_TICKET: 33288 REMOVE_PATCHES: "*" jobs: -- cgit v1.2.1 From 68fb3883e155a7fd133474d17f0034b072d47745 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 4 Feb 2022 11:43:22 -0800 Subject: .github/workflows/ci-sage.yml: Replace centos-8 (EOL) by centos-stream-8, centos-stream-9 --- .github/workflows/ci-sage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index ef1e95fc..573b269b 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -96,7 +96,7 @@ jobs: fail-fast: false max-parallel: 32 matrix: - tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-8, gentoo-python3.9, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386] + tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-stream-8, centos-stream-9, gentoo-python3.9, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386] tox_packages_factor: [minimal, standard] env: TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} -- cgit v1.2.1 From f38d13906be5f3cfe3dadc0333c5ef01badaf777 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 10 Feb 2022 22:21:47 -0500 Subject: Disable running of sage-ci tests except on tagged commits. Ref #3093. --- .github/workflows/ci-sage.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 573b269b..b802a58c 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -7,7 +7,7 @@ name: Run Sage CI for Linux ## - continuous integration, by building and testing other software ## that depends on this project. ## -## It runs on every pull request and push of a tag to the GitHub repository. +## It runs on every push of a tag to the GitHub repository. ## ## The testing can be monitored in the "Actions" tab of the GitHub repository. ## @@ -33,11 +33,7 @@ name: Run Sage CI for Linux ## Many copies of the second step are run in parallel for each of the tested ## systems/configurations. -#on: [push, pull_request] - on: - pull_request: - types: [opened, synchronize] push: tags: - '*' -- cgit v1.2.1 From aa525e4b61c8cea24c244b85235726af0d3b8811 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 11 Feb 2022 15:28:28 -0600 Subject: Update main.yml --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 821cf883..1b015551 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,6 +2,10 @@ name: tests on: [push, pull_request, workflow_dispatch] +concurrency: + group: tests-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: test: strategy: -- cgit v1.2.1 From 6d59c76ee856cc7bb9ae0d3892a2f92fa3204d2e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 11 Feb 2022 16:53:53 -0600 Subject: Update .github/workflows/main.yml Co-authored-by: Dustin Ingram --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1b015551..62373734 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,8 +2,8 @@ name: tests on: [push, pull_request, workflow_dispatch] -concurrency: - group: tests-${{ github.head_ref || github.run_id }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true jobs: -- cgit v1.2.1 From 357292252c188c7b9288e81dc68038cd43ca52e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Feb 2022 15:51:36 -0500 Subject: Remove invocation of bootstrap script, no longer needed. Fixes #3100. --- .github/workflows/ci-sage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index b802a58c..425681d7 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -75,7 +75,7 @@ jobs: python3 -m pip install build - name: Run make dist, prepare upstream artifact run: | - (cd build/pkgs/${{ env.SPKG }}/src && python3 -m bootstrap && python3 -m build --sdist) \ + (cd build/pkgs/${{ env.SPKG }}/src && python3 -m build --sdist) \ && mkdir -p upstream && cp build/pkgs/${{ env.SPKG }}/src/dist/*.tar.gz upstream/${{ env.SPKG }}-git.tar.gz \ && echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \ && if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \ -- cgit v1.2.1 From 9e875b197a6785ad3f1791f1bc78b965e31a3e73 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Feb 2022 18:21:56 -0500 Subject: Limit tests for stdlib distutils to one job. Ref #3093. --- .github/workflows/main.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62373734..c985f851 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,6 @@ jobs: strategy: matrix: distutils: - - stdlib - local python: - pypy-3.7 @@ -23,6 +22,10 @@ jobs: - ubuntu-latest - macos-latest - windows-latest + include: + - platform: ubuntu-latest + python: "3.10" + distutils: stdlib runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} @@ -46,14 +49,7 @@ jobs: ${{ matrix.python }} test_cygwin: - strategy: - matrix: - distutils: - - stdlib - - local runs-on: windows-latest - env: - SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} steps: - uses: actions/checkout@v2 - name: Install Cygwin with Python @@ -76,11 +72,6 @@ jobs: tox -- --cov-report xml integration-test: - strategy: - matrix: - distutils: - - stdlib - - local needs: test if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/')) # To avoid long times and high resource usage, we assume that: @@ -91,8 +82,6 @@ jobs: # "integration") # With that in mind, the integration tests can run for a single setup runs-on: ubuntu-latest - env: - SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} steps: - uses: actions/checkout@v2 - name: Install OS-level dependencies -- cgit v1.2.1 From ae6f313591bc66918708899ae2f1ce31df83a05d Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 15 Feb 2022 22:24:40 +0000 Subject: Reduce GitHub Actions timeout from 6h to 75min From times to times, tests (specially on PyPy) seem to get stuck and be cancelled by GitHub after the default timeout (6h). Before these tests are cancelled, however they count as an active job and limit the amount of concurrent jobs/workflows PyPA's organization may have running. Currently, the slowest job running for the `main` workflow seem to be the tests for PyPy+Windows, which take around 55 min. Therefore, chances are that, if a test is taking much more than 1h to run, it got stuck. We can be pragmatic and reduce the timeout for the `main` workflow and free the resources quickly. --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c985f851..5a8d510d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,7 @@ jobs: runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} + timeout-minutes: 75 steps: - uses: actions/checkout@v2 - name: Setup Python @@ -50,6 +51,7 @@ jobs: test_cygwin: runs-on: windows-latest + timeout-minutes: 75 steps: - uses: actions/checkout@v2 - name: Install Cygwin with Python @@ -82,6 +84,7 @@ jobs: # "integration") # With that in mind, the integration tests can run for a single setup runs-on: ubuntu-latest + timeout-minutes: 75 steps: - uses: actions/checkout@v2 - name: Install OS-level dependencies @@ -103,7 +106,7 @@ jobs: needs: [test, test_cygwin, integration-test] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') runs-on: ubuntu-latest - + timeout-minutes: 75 steps: - uses: actions/checkout@v2 - name: Setup Python -- cgit v1.2.1 From ad29c0a3ae83088ce7c246b0d0985e3bcd0a103f Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 15 Feb 2022 23:20:45 +0000 Subject: Disable coverage on PyPy Currently, CI jobs running on PyPy are (painfully) slow. This seems to be a well know side effect of enabling coverage. The change proposed here is to disable coverage on PyPy for both Windows and MacOS (which seem to be very slow). Coverage for PyPy on Ubuntu is preserved because, while being slower than CPython, it is still OK-ish. Hopefully tests running on PyPy/Ubuntu will include most of PyPy's specific corner cases. --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c985f851..6fa600e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,11 @@ jobs: - name: Install tox run: | python -m pip install tox + - name: Disable coverage on PyPy + # Coverage seems to slow things down on PyPy (ubuntu is still OK-ish) + if: contains(matrix.python, 'pypy') && matrix.platform != 'ubuntu-latest' + shell: bash + run: echo 'PYTEST_ADDOPTS=-p no:cov' >> $GITHUB_ENV - name: Run tests run: tox -- --cov-report xml - name: Publish coverage -- cgit v1.2.1 From 2bd13ae65e6cb502c48a1e0bed86fcb3e2d2c5b8 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 15 Feb 2022 23:47:16 +0000 Subject: Skip pytest-cov in setup.cfg for PyPy Instead of disabling coverage in the GitHub workflow it might be easier to just not install it in the test environment. --- .github/workflows/main.yml | 5 ----- 1 file changed, 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6fa600e9..c985f851 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,11 +38,6 @@ jobs: - name: Install tox run: | python -m pip install tox - - name: Disable coverage on PyPy - # Coverage seems to slow things down on PyPy (ubuntu is still OK-ish) - if: contains(matrix.python, 'pypy') && matrix.platform != 'ubuntu-latest' - shell: bash - run: echo 'PYTEST_ADDOPTS=-p no:cov' >> $GITHUB_ENV - name: Run tests run: tox -- --cov-report xml - name: Publish coverage -- cgit v1.2.1 From e3943aa52a9eb0de2fe9cfe62358fbf8b974922b Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 16 Feb 2022 15:44:31 +0000 Subject: Prevent CI from trying to use '--cov' when pytest-cov is not installed --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c985f851..da2b57b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,9 +39,12 @@ jobs: run: | python -m pip install tox - name: Run tests - run: tox -- --cov-report xml + run: tox + - name: Create coverage report + if: hashFiles('.coverage') != '' # Rudimentary `file.exists()` + run: pipx run coverage xml --ignore-errors - name: Publish coverage - if: false # disabled for #2727 + if: hashFiles('coverage.xml') != '' # Rudimentary `file.exists()` uses: codecov/codecov-action@v1 with: flags: >- # Mark which lines are covered by which envs -- cgit v1.2.1 From 57747b71e6ad2e5ab0e5e86fe4157cd5ad9fd98b Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 16 Feb 2022 23:29:53 +0000 Subject: Tweak concurrency group for CI so tags are not cancelled by pushes --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a8d510d..2960ed3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,10 @@ name: tests on: [push, pull_request, workflow_dispatch] concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + group: >- + ${{ github.workflow }}- + ${{ github.ref_type }}- + ${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true jobs: -- cgit v1.2.1 From 5ae9aa41369b8b0c8e1710475988ac0e9e3cf431 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Feb 2022 14:16:16 -0500 Subject: Disable tests on Windows while build issues exist. Ref pypa/distutils#118. --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c680fb36..d2979efd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,8 @@ jobs: platform: - ubuntu-latest - macos-latest - - windows-latest + # disable tests on Windows due to pypa/distutils#118 + # - windows-latest include: - platform: ubuntu-latest python: "3.10" -- cgit v1.2.1 From a0f9662e537fdcc074a7801b11495747f8c22601 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 11 Mar 2022 23:58:47 +0000 Subject: Attempt to re-enable Windows tests According to a comment in pypa/distutils#118 this problem might be solved by allowing tox to pass some environment variables. --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2979efd..c680fb36 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,8 +24,7 @@ jobs: platform: - ubuntu-latest - macos-latest - # disable tests on Windows due to pypa/distutils#118 - # - windows-latest + - windows-latest include: - platform: ubuntu-latest python: "3.10" -- cgit v1.2.1 From 8f3cdf705cbf5ba29238c9e5e900727d488bf463 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 13 Mar 2022 10:11:27 +0000 Subject: Use windows-2019 for tests in GitHub Actions For the time being let's just use the older version for the GHA host, so we can keep testing on Windows, instead of skipping it at all. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c680fb36..5be824c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: platform: - ubuntu-latest - macos-latest - - windows-latest + - windows-2019 include: - platform: ubuntu-latest python: "3.10" -- cgit v1.2.1 From fb258ed194228a95a3043c19abe215bd8c23ddab Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 14 Mar 2022 01:12:06 +0000 Subject: Exclude PyPy+Windows from test matrix --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5be824c1..bc5b1e4d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,11 @@ jobs: - platform: ubuntu-latest python: "3.10" distutils: stdlib + exclude: + # The combination of PyPy+Windows+pytest-xdist+ProcessPoolExecutor is flaky/problematic + - platform: windows-2019 + python: pypy-3.7 + distutils: local runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} -- cgit v1.2.1 From 8afae7f683766e7e716a226a43ccc95d69675851 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 14 Mar 2022 01:18:43 +0000 Subject: Just skip the most problematic test for PyPy on Windows --- .github/workflows/main.yml | 5 ----- 1 file changed, 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc5b1e4d..5be824c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,11 +29,6 @@ jobs: - platform: ubuntu-latest python: "3.10" distutils: stdlib - exclude: - # The combination of PyPy+Windows+pytest-xdist+ProcessPoolExecutor is flaky/problematic - - platform: windows-2019 - python: pypy-3.7 - distutils: local runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} -- cgit v1.2.1 From a2230a509bcd0f4c308ee59bd1eeac6def0e5d2b Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 11 Mar 2022 23:58:47 +0000 Subject: Attempt to re-enable Windows tests According to a comment in pypa/distutils#118 this problem might be solved by allowing tox to pass some environment variables. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5be824c1..c680fb36 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: platform: - ubuntu-latest - macos-latest - - windows-2019 + - windows-latest include: - platform: ubuntu-latest python: "3.10" -- cgit v1.2.1 From a73fb963896019bbe6216c877d3ec03e797dd056 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 21 Apr 2022 18:03:07 +0100 Subject: Cache downloaded files used during tests for setuptools.config Recently Github Actions started to fail with `HTTP Error 429: Too Many Requests`. A solution for this problem is to add some caching. --- .github/workflows/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c680fb36..e2197aad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,20 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} + - uses: actions/cache@v3 + id: cache + with: + path: setuptools/tests/config/downloads/*.cfg + key: ${{ + hashFiles( + 'setuptools/tests/config/setupcfg_examples.txt', + 'setuptools/tests/config/downloads/*.py' + ) + }} + - name: Populate download cache + if: steps.cache.outputs.cache-hit != 'true' + working-directory: setuptools/tests/config + run: python -m downloads.preload setupcfg_examples.txt - name: Install tox run: | python -m pip install tox -- cgit v1.2.1 From c055902693210dad605c6cdbea4d2adc0e08730e Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 21 Apr 2022 18:11:43 +0100 Subject: Fix YAML error --- .github/workflows/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2197aad..4275bbde 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,12 +43,9 @@ jobs: id: cache with: path: setuptools/tests/config/downloads/*.cfg - key: ${{ - hashFiles( - 'setuptools/tests/config/setupcfg_examples.txt', - 'setuptools/tests/config/downloads/*.py' - ) - }} + key: >- + ${{ hashFiles('setuptools/tests/config/setupcfg_examples.txt') }}- + ${{ hashFiles('setuptools/tests/config/downloads/*.py') }} - name: Populate download cache if: steps.cache.outputs.cache-hit != 'true' working-directory: setuptools/tests/config -- cgit v1.2.1