@@ -72,68 +72,79 @@ jobs:
7272 run : |
7373 python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
7474 python -m cpplint src/*.hpp src/*.cpp
75- # macosx:
76- # strategy:
77- # fail-fast: false
78- # matrix:
79- # python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
80- # runs-on: macOS-latest
81- # timeout-minutes: 15
82- # env:
83- # CXX: "ccache clang++"
84- # CXXFLAGS: "-O2 -g"
85- # steps:
86- # - uses: actions/checkout@v4
87- # - name: "Create micromamba environment"
88- # uses: mamba-org/setup-micromamba@v1
89- # with:
90- # environment-name: libsemigroups
91- # create-args: >-
92- # python=${{ matrix.python_version }}
93- # fmt
94- # - name: "Set environment variables . . ."
95- # run: |
96- # echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/libsemigroups/share/pkgconfig:/usr/local/lib/pkgconfig" >> $GITHUB_ENV
97- # echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib:/usr/local/lib" >> $GITHUB_ENV
98- # echo "PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/bin:$PATH" >> $GITHUB_ENV
99- # - name: "Install libsemigroups dependencies . . ."
100- # run: brew install autoconf automake libtool
101- # - name: "Setup ccache . . ."
102- # uses: Chocobo1/setup-ccache-action@v1
103- # with:
104- # update_packager_index: false
105- # install_ccache: true
106- # - name: "Install libsemigroups . . ."
107- # run: |
108- # git clone --depth 1 --branch stable-3.0 https://github.com/libsemigroups/libsemigroups.git
109- # cd libsemigroups
110- # ./autogen.sh
111- # ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt
112- # sudo make install -j8
113- # ccache -s
114- # - name: "Python version . . ."
115- # run: |
116- # python --version
117- # pip3 --version
118- # - name: "Pip installing requirements.txt . . ."
119- # run: |
120- # pip3 install -r requirements.txt
121- # - name: "Pip3 installing libsemigroups_pybind11 . . ."
122- # run: |
123- # echo $PKG_CONFIG_PATH
124- # pip3 install . -v
125- # - name: "python -m pytest -vv tests/test_*.py . . ."
126- # run: |
127- # python -m pytest -vv tests/test_*.py
128- # - name: "Run doc tests . . ."
129- # run: |
130- # etc/make-doc.sh # so that all files are generated
131- # cd docs
132- # python -m sphinx -b doctest -d _build/doctrees source _build/doctest
133- # - name: "Pip3 installing pylint + cpplint . . ."
134- # run: |
135- # pip3 install pylint cpplint
136- # - name: "Running pylint and cpplint . . ."
137- # run: |
138- # python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
139- # python -m cpplint src/*.hpp src/*.cpp
75+ main-branch :
76+ name : " Main, ${{ matrix.os }}, Python 3.13"
77+ strategy :
78+ fail-fast : false
79+ matrix :
80+ os : ["ubuntu-latest", "macOS-latest"]
81+ include :
82+ - os : " ubuntu-latest"
83+ compiler : " ccache g++"
84+ - os : " macOS-latest"
85+ compiler : " ccache clang++"
86+ runs-on : ${{ matrix.os }}
87+ timeout-minutes : 15
88+ steps :
89+ - uses : actions/checkout@v4
90+ - name : " Setup ccache . . ."
91+ uses : Chocobo1/setup-ccache-action@v1
92+ with :
93+ update_packager_index : false
94+ install_ccache : true
95+ # We could remove this step and instead install Python with micromamba.
96+ # This would mean we could avoid specifying LD_LIBRARY_PATH and LDFLAGS.
97+ # However, JDE thinks the current setup better reflects how a developer
98+ # might wish to install the package, so we have opted for this.
99+ - name : " Setup Python . . ."
100+ uses : actions/setup-python@v5
101+ with :
102+ python-version : 3.13
103+ cache : " pip"
104+ - name : " Create micromamba environment . . ."
105+ uses : mamba-org/setup-micromamba@v1
106+ with :
107+ environment-name : libsemigroups
108+ create-args : >-
109+ fmt
110+ - name : " Set environment variables . . ."
111+ run : |
112+ echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/libsemigroups/share/pkgconfig:/usr/local/lib/pkgconfig" >> $GITHUB_ENV
113+ echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib:/usr/local/lib" >> $GITHUB_ENV
114+ echo "LDFLAGS=-Wl,-rpath,$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib" >> $GITHUB_ENV
115+ echo "PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/bin:$PATH" >> $GITHUB_ENV
116+ - name : " Check Python version . . ."
117+ run : |
118+ python --version
119+ pip --version
120+ - name : " Install make requirements . . ."
121+ if : ${{ matrix.os == 'macOS-latest' }}
122+ run : brew install autoconf automake libtool
123+ - name : " Install requirements libsemigroups . . ."
124+ run : pip install -r requirements.txt
125+ - name : " Install libsemigroups . . ."
126+ run : |
127+ git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git
128+ cd libsemigroups
129+ ./autogen.sh
130+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt
131+ sudo make install -j8
132+ ccache -s
133+ - name : " Pip install libsemigroups_pybind11 . . ."
134+ run : |
135+ CXX="${{ matrix.compiler }}" pip install . -v
136+ - name : " Run tests . . ."
137+ run : |
138+ python -m pytest -vv tests/test_*.py
139+ - name : " Run doc tests . . ."
140+ run : |
141+ etc/make-doc.sh # so that all files are generated!
142+ cd docs
143+ python -m sphinx -b doctest -d _build/doctrees source _build/doctest
144+ - name : " Pip install pylint + cpplint . . ."
145+ run : |
146+ pip install pylint cpplint
147+ - name : " Run pylint and cpplint . . ."
148+ run : |
149+ python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
150+ python -m cpplint src/*.hpp src/*.cpp
0 commit comments