From 510c22fd8ce2fad18794a58c3e467bad4bcd8f02 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Thu, 26 Oct 2023 15:06:08 +0100 Subject: [PATCH] ci: try to install catch2 with micromamba --- .github/workflows/runtests.yml | 5 +++++ environment.yml | 7 +++++++ tests/CMakeLists.txt | 1 + 3 files changed, 13 insertions(+) create mode 100644 environment.yml diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml index fb826f69..feeb9531 100644 --- a/.github/workflows/runtests.yml +++ b/.github/workflows/runtests.yml @@ -14,7 +14,11 @@ 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: "Install conda environment from environment.yml . . ." + uses: mamba-org/setup-micromamba@v1 - name: "Checkout HPCombi repo . . ." uses: actions/checkout@v3 - name: "Setup ccache . . ." @@ -34,6 +38,7 @@ jobs: mkdir build cd build cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release .. + cd tests make make test diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..86c2c8d7 --- /dev/null +++ b/environment.yml @@ -0,0 +1,7 @@ +name: HPCombi + +channels: +- conda-forge + +dependencies: + - catch2 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 38c9f8a4..17931350 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,6 +27,7 @@ if(NOT Catch2_FOUND) FetchContent_MakeAvailable(Catch2) else() + message(STATUS "Using system Catch2") endif()