Skip to content

Commit 2b842ce

Browse files
author
Release Manager
committed
sagemathgh-39369: Test pip editable install with meson Tests pip editable install with meson on GitHub Actions. This uncovers several failing tests, which are fixed by (see dependencies below) Note: review is hard because of the large number of dependencies. It is probably easier to look only in `.github` folder. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. ### ⌛ Dependencies - sagemath#39423 - sagemath#39498 - sagemath#39494 - sagemath#39424 - sagemath#39275 - sagemath#39499 URL: sagemath#39369 Reported by: user202729 Reviewer(s): Tobias Diez, user202729
2 parents 847b9a8 + 43142c7 commit 2b842ce

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/ci-meson.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,21 @@ concurrency:
1616

1717
jobs:
1818
test:
19-
name: Conda (${{ matrix.os }}, Python ${{ matrix.python }})
19+
name: Conda (${{ matrix.os }}, Python ${{ matrix.python }}${{ matrix.editable && ', editable' || '' }})
2020
runs-on: ${{ matrix.os }}-latest
2121

2222
strategy:
2323
fail-fast: false
2424
matrix:
2525
os: [ubuntu]
2626
python: ['3.11', '3.12']
27+
editable:
28+
${{ fromJson(github.event_name == 'pull_request' && '[false]' || '[false, true]') }}
29+
include:
30+
# one additional editable run in pull_request, this has no effect if not pull_request
31+
- os: ubuntu
32+
python: 3.12
33+
editable: true
2734

2835
steps:
2936
- uses: actions/checkout@v4
@@ -70,7 +77,7 @@ jobs:
7077
export CC="ccache $CC"
7178
export CXX="ccache $CXX"
7279
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda
73-
pip install --no-build-isolation --no-deps --config-settings=builddir=builddir . -v
80+
pip install --no-build-isolation --no-deps --config-settings=builddir=builddir ${{ matrix.editable && '--editable' || '' }} . -v
7481
7582
- name: Check update-meson
7683
# this step must be after build, because meson.build creates a number of __init__.py files
@@ -93,12 +100,14 @@ jobs:
93100
shell: bash -l {0}
94101
run: |
95102
# We don't install sage_setup, so don't try to test it
96-
rm -R ./src/sage_setup/
103+
# If editable then deleting the directory will cause sage to detect rebuild, which will cause ninja to fail
104+
# so we don't delete the directory in this case
105+
${{ matrix.editable && 'true' || 'rm -R ./src/sage_setup/' }}
97106
./sage -t --all -p4 --format github
98107
99108
- name: Upload log
100109
uses: actions/[email protected]
101110
if: failure()
102111
with:
103-
name: ${{ runner.os }}-meson-${{ matrix.python }}-log
112+
name: ${{ runner.os }}-meson-${{ matrix.python }}${{ matrix.editable && '-editable' || '' }}-log
104113
path: builddir/meson-logs/

0 commit comments

Comments
 (0)