forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-36524: Compile everything with meson
<!-- ^^^^^ 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 sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> Add meson configuration to compile sagelib with meson. Basic developer docs are added as well (meant as background info, not real installation instructions and thus under "developer"). ### 📝 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! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36524 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik, Gonzalo Tornaría, Matthias Köppe, Michael Orlitzky, Tobias Diez
- Loading branch information
Showing
167 changed files
with
7,288 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build & Test using Meson | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
workflow_dispatch: | ||
# Allow to run manually | ||
|
||
concurrency: | ||
# Cancel previous runs of this workflow for the same branch | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: Conda (${{ matrix.os }}, Python ${{ matrix.python }}) | ||
runs-on: ${{ matrix.os }}-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu] | ||
python: ['3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Merge CI fixes from sagemath/sage | ||
run: | | ||
.ci/merge-fixes.sh | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Cache conda packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11-linux.yml') }} | ||
|
||
- name: Compiler cache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ runner.os }}-meson-${{ matrix.python }} | ||
|
||
- name: Setup Conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
miniforge-version: latest | ||
use-mamba: true | ||
channels: conda-forge | ||
channel-priority: true | ||
activate-environment: sage | ||
environment-file: src/environment-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml | ||
|
||
- name: Print Conda environment | ||
shell: bash -l {0} | ||
run: | | ||
conda info | ||
conda list | ||
- name: Build | ||
shell: bash -l {0} | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export CC="ccache $CC" | ||
export CXX="ccache $CXX" | ||
pip install --no-build-isolation --config-settings=builddir=builddir . -v | ||
- name: Test | ||
shell: bash -l {0} | ||
run: | | ||
# We don't install sage_setup, so don't try to test it | ||
rm -R ./src/sage_setup/ | ||
./sage -t --all -p4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cython pkgconfig jinja2 $(SAGE_ROOT)/pkgs/sage-setup/sage_setup/*.py $(SAGE_ROOT)/pkgs/sage-setup/sage_setup/autogen/interpreters/specs/*.py $(SAGE_ROOT)/pkgs/sage-setup/sage_setup/command/*.py | $(PYTHON_TOOLCHAIN) $(PYTHON) | ||
cython pkgconfig jinja2 $(SAGE_ROOT)/pkgs/sage-setup/sage_setup/*.py $(SAGE_ROOT)/pkgs/sage-setup/sage_setup/autogen/interpreters/internal/specs/*.py $(SAGE_ROOT)/pkgs/sage-setup/sage_setup/command/*.py | $(PYTHON_TOOLCHAIN) $(PYTHON) | ||
|
||
---------- | ||
All lines of this file are ignored except the first. |
Oops, something went wrong.