forked from libsemigroups/libsemigroups_pybind11
-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (138 loc) · 5.08 KB
/
tests.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Run tests and lint
on: [pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ubuntu:
strategy:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
shell: bash -l {0}
env:
CXX: "ccache g++"
CXXFLAGS: "-O2 -g"
steps:
- uses: actions/checkout@v4
- name: "Create micromamba environment"
uses: mamba-org/setup-micromamba@v1
with:
environment-name: libsemigroups
create-args: >-
python=${{ matrix.python_version }}
fmt
- name: "Set environment variables . . ."
run: |
echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/libsemigroups/share/pkgconfig:/usr/local/lib/pkgconfig" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib:/usr/local/lib" >> $GITHUB_ENV
- name: "Setup ccache . . ."
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
install_ccache: true
- name: "Install libsemigroups . . ."
run: |
git clone --depth 1 --branch v3 https://github.com/libsemigroups/libsemigroups.git
cd libsemigroups
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt && sudo make install -j8
ccache -s
- name: "Python version . . ."
run: |
python --version
pip3 --version
- name: "Pip installing requirements.txt . . ."
run: |
pip3 install -r requirements.txt
- name: "List installed packages . . ."
run: |
pip3 list
micromamba list
- name: "Pip3 installing libsemigroups_pybind11 . . ."
run: |
echo $PKG_CONFIG_PATH
pip3 install . -v
- name: "python -m pytest -vv tests/test_*.py . . ."
run: |
python -m pytest -vv tests/test_*.py
- name: "Run doc tests . . ."
run: |
etc/make-doc.sh # so that all files are generated!
cd docs
python -m sphinx -b doctest -d _build/doctrees source _build/doctest
- name: "Pip3 installing pylint + cpplint . . ."
run: |
pip3 install pylint cpplint
- name: "Running pylint and cpplint . . ."
run: |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
python -m cpplint src/*.hpp src/*.cpp
macosx:
strategy:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: macOS-latest
timeout-minutes: 15
env:
CXX: "ccache clang++"
CXXFLAGS: "-O2 -g"
steps:
- uses: actions/checkout@v4
- name: "Create micromamba environment"
uses: mamba-org/setup-micromamba@v1
with:
environment-name: libsemigroups
create-args: >-
python=${{ matrix.python_version }}
fmt
- name: "Set environment variables . . ."
run: |
echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/libsemigroups/share/pkgconfig:/usr/local/lib/pkgconfig" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib:/usr/local/lib" >> $GITHUB_ENV
echo "PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/bin:$PATH" >> $GITHUB_ENV
- name: "Install libsemigroups dependencies . . ."
run: brew install autoconf automake libtool
- name: "Setup ccache . . ."
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
install_ccache: true
- name: "Install libsemigroups . . ."
run: |
git clone --depth 1 --branch v3 https://github.com/libsemigroups/libsemigroups.git
cd libsemigroups
./autogen.sh
./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt
sudo make install -j8
ccache -s
- name: "Python version . . ."
run: |
python --version
pip3 --version
- name: "Pip installing requirements.txt . . ."
run: |
pip3 install -r requirements.txt
- name: "Pip3 installing libsemigroups_pybind11 . . ."
run: |
echo $PKG_CONFIG_PATH
pip3 install . -v
- name: "python -m pytest -vv tests/test_*.py . . ."
run: |
python -m pytest -vv tests/test_*.py
- name: "Run doc tests . . ."
run: |
etc/make-doc.sh # so that all files are generated!
cd docs
python -m sphinx -b doctest -d _build/doctrees source _build/doctest
- name: "Pip3 installing pylint + cpplint . . ."
run: |
pip3 install pylint cpplint
- name: "Running pylint and cpplint . . ."
run: |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
python -m cpplint src/*.hpp src/*.cpp