Skip to content
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

Test pip editable install with meson #39369

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/ci-meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,28 @@ concurrency:

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

strategy:
fail-fast: false
matrix:
os: [ubuntu]
python: ['3.11', '3.12']
editable: [false, true]
is-pull-request:
- ${{ github.event_name == 'pull_request' }}
# trick from https://github.com/orgs/community/discussions/26253#discussioncomment-6745038
# in PR, only run the combinations listed below; otherwise, run all combinations
exclude:
- is-pull-request: true
include:
- os: ubuntu
python: 3.11
editable: false
- os: ubuntu
python: 3.12
editable: true

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -70,7 +84,7 @@ jobs:
export CC="ccache $CC"
export CXX="ccache $CXX"
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda
pip install --no-build-isolation --no-deps --config-settings=builddir=builddir . -v
pip install --no-build-isolation --no-deps --config-settings=builddir=builddir ${{ matrix.editable && '--editable' || '' }} . -v

- name: Check update-meson
# this step must be after build, because meson.build creates a number of __init__.py files
Expand All @@ -93,12 +107,14 @@ jobs:
shell: bash -l {0}
run: |
# We don't install sage_setup, so don't try to test it
rm -R ./src/sage_setup/
# If editable then deleting the directory will cause sage to detect rebuild, which will cause ninja to fail
# so we don't delete the directory in this case
${{ matrix.editable && 'true' || 'rm -R ./src/sage_setup/' }}
./sage -t --all -p4 --format github

- name: Upload log
uses: actions/[email protected]
if: failure()
with:
name: ${{ runner.os }}-meson-${{ matrix.python }}-log
name: ${{ runner.os }}-meson-${{ matrix.python }}${{ matrix.editable && '-editable' || '' }}-log
path: builddir/meson-logs/
Loading