forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.14 KB
/
ci-meson.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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('environment-3.11-linux.yml') }}
- name: Compiler cache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-meson-${{ matrix.python }}
- name: Setup Conda environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python }}
miniforge-version: latest
use-mamba: true
channels: conda-forge
channel-priority: true
activate-environment: sage-dev
environment-file: 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