Skip to content

Commit

Permalink
ci: try to install catch2 with micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Oct 26, 2023
1 parent cfa7d03 commit 1b09b1e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@ jobs:
CXX: "ccache g++"
CXXFLAGS: "-fdiagnostics-color"
CMAKE_CXX_COMPILER: "ccache g++"
PKG_CONFIG_PATH: "/home/runner/micromamba-root/envs/HPCombi/lib/pkgconfig:/home/runner/micromamba-root/envs/HPCombi/share/pkgconfig/"
LD_LIBRARY_PATH: "/home/runner/micromamba-root/envs/HPCombi/lib"
steps:
- name: "Checkout HPCombi repo . . ."
uses: actions/checkout@v3
- name: "Install conda environment from environment.yml . . ."
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
- name: "Setup ccache . . ."
uses: Chocobo1/setup-ccache-action@v1
with:
Expand All @@ -28,12 +38,12 @@ jobs:
sudo apt-get --yes update
sudo apt-get install --yes ccache
sudo apt-get install --yes libbenchmark-dev
sudo apt-get install --yes catch2
- name: "Build + run HPCombi tests . . ."
run: |
mkdir build
cd build
cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release ..
cd tests
make
make test
./test_all
7 changes: 7 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: HPCombi

channels:
- conda-forge

dependencies:
- catch2
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if(NOT Catch2_FOUND)

FetchContent_MakeAvailable(Catch2)
else()

message(STATUS "Using system Catch2")
endif()

Expand Down

0 comments on commit 1b09b1e

Please sign in to comment.