Skip to content

Commit

Permalink
ci: use ccache to compile libsemigroups
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Apr 22, 2024
1 parent b889c7e commit 3948ca6
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
defaults:
run:
shell: bash -l {0}
env:
CXX: "ccache g++"
CXXFLAGS: "-O2 -g"
steps:
- uses: actions/checkout@v4
- name: "Create micromamba environment"
Expand All @@ -29,11 +32,17 @@ jobs:
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 CXXFLAGS='-O3 -g' --disable-hpcombi --with-external-fmt && sudo make install -j8
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt && sudo make install -j8
ccache -s
- name: "Python version . . ."
run: |
python --version
Expand Down Expand Up @@ -67,6 +76,9 @@ jobs:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: macOS-latest
timeout-minutes: 15
env:
CXX: "ccache clang++"
CXXFLAGS: "-O2 -g"
steps:
- uses: actions/checkout@v4
- name: "Create micromamba environment"
Expand All @@ -84,11 +96,17 @@ jobs:
- name: "Install libsemigroups dependencies . . ."
run :
brew install autoconf automake
- 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 CXXFLAGS='-O3 -g' --disable-hpcombi --with-external-fmt && sudo make install -j8
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt && sudo make install -j8
ccache -s
- name: "Python version . . ."
run: |
python --version
Expand Down

0 comments on commit 3948ca6

Please sign in to comment.