|
| 1 | +name: Check documentation builds |
| 2 | +on: [pull_request, workflow_dispatch] |
| 3 | + |
| 4 | +concurrency: |
| 5 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 6 | + cancel-in-progress: true |
| 7 | + |
| 8 | +jobs: |
| 9 | + ubuntu: |
| 10 | + name: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + include: |
| 15 | + - os: ubuntu-latest |
| 16 | + compiler: g++ |
| 17 | + - os: macOS-latest |
| 18 | + compiler: clang++ |
| 19 | + runs-on: ${{ matrix.os }} |
| 20 | + timeout-minutes: 15 |
| 21 | + defaults: |
| 22 | + run: |
| 23 | + shell: bash -l {0} |
| 24 | + env: |
| 25 | + CXX: "ccache ${{ matrix.compiler }}" |
| 26 | + CXXFLAGS: "-O2 -g" |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + - name: "Create micromamba environment" |
| 30 | + uses: mamba-org/setup-micromamba@v1 |
| 31 | + with: |
| 32 | + environment-name: libsemigroups |
| 33 | + create-args: >- |
| 34 | + python |
| 35 | + fmt |
| 36 | + - name: "Set environment variables . . ." |
| 37 | + run: | |
| 38 | + echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/libsemigroups/share/pkgconfig:/usr/local/lib/pkgconfig" >> $GITHUB_ENV |
| 39 | + echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib:/usr/local/lib" >> $GITHUB_ENV |
| 40 | + echo "PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/bin:$PATH" >> $GITHUB_ENV |
| 41 | + - name: "macOS only: Install libsemigroups dependencies . . ." |
| 42 | + if: ${{ matrix.os == 'macOS-latest' }} |
| 43 | + run: brew install autoconf automake libtool |
| 44 | + - name: "Setup ccache . . ." |
| 45 | + uses: Chocobo1/setup-ccache-action@v1 |
| 46 | + with: |
| 47 | + update_packager_index: false |
| 48 | + install_ccache: true |
| 49 | + - name: "Install libsemigroups . . ." |
| 50 | + run: | |
| 51 | + git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git |
| 52 | + cd libsemigroups |
| 53 | + ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt && sudo make install -j8 |
| 54 | + ccache -s |
| 55 | + - name: "Python version . . ." |
| 56 | + run: | |
| 57 | + python --version |
| 58 | + pip3 --version |
| 59 | + - name: "Pip installing requirements.txt . . ." |
| 60 | + run: | |
| 61 | + pip3 install -r requirements.txt |
| 62 | + - name: "Pip3 installing libsemigroups_pybind11 . . ." |
| 63 | + run: | |
| 64 | + echo $PKG_CONFIG_PATH |
| 65 | + pip3 install . -v |
| 66 | + - name: "Check doc builds" |
| 67 | + run: make doc SPHINXOPTS="-W" |
0 commit comments