From 9678b6fdea5098916b4352fa5e27b937a17ac2e3 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 19 Sep 2023 17:33:02 -0400 Subject: [PATCH] github: + catch2 install for build --- .github/workflows/cmake-single-platform.yml | 5 ++++- FAQ | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 28c6f783..059cf017 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -22,6 +22,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Install catch2 + # install catch2. see [[https://stackoverflow.com/questions/57982945/how-to-apt-get-install-in-a-github-actions-workflow]] + run: sudo apt-get install -y catch2 + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type @@ -36,4 +40,3 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} - diff --git a/FAQ b/FAQ index 6e85b042..27d04f3b 100644 --- a/FAQ +++ b/FAQ @@ -1,4 +1,4 @@ -development environment that works +Q1. how to get a nix development environment that works 1. 1. nix stdenv = gcc12Stdenv (see mkderivation.nix) @@ -23,3 +23,18 @@ development environment that works To build, need to tell cmake to use gcc: cmake -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_C_COMPILER=$(which gcc) path/to/src + +Q2. how to add a dependency to github workflow + + comments. + 1. workflow configured in ./.github/cmake-single-platform.yml + 2. workflow runs on ubuntu vm. see + runs-on: ubuntu-latest + in cmake-single-platform.yml + 3. find a desired dependency + $ apt-cache search ${keyword} + e.g. + $ apt-cache search catch2 + 4. add/edit install step to ./.github/cmake-single-platform.yml + - name: Install catch2 + run: sudo apt-get install -y catch2