Compile everything with meson #50
Workflow file for this run
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
name: Build & Test using Conda (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: Meson | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
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: Create conda environment files | |
run: ./bootstrap-conda | |
- name: Cache conda packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | |
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }} | |
- name: Compiler cache | |
uses: hendrikmuhs/ccache-action@main | |
with: | |
create-symlink: true | |
key: ${{ runner.os }}-meson-${{ matrix.python }}-${{ github.run_id }} | |
restore-keys: ${{ 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 }}.yml | |
- name: Print Conda environment | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- name: Bootstrap | |
shell: bash -l {0} | |
run: python -m sage_setup.autogen.interpreters src/sage/ext/interpreters | |
env: | |
PYTHONPATH: src | |
- name: Build | |
shell: bash -l {0} | |
run: | | |
pip install --no-build-isolation --config-settings=builddir=builddir . -v | |
- name: Test | |
shell: bash -l {0} | |
run: ./sage -t --all -p0 |