Skip to content

Commit

Permalink
Introduce plog into Linux CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Dec 6, 2020
1 parent 8cec45d commit 04c751b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
CLIPP_VERSION: master
FMT_VERSION: 7.1.3
MITAMA_RESULT_VERSION: develop
PLOG_VERSION: 1.1.5

jobs:
x86_64-unknown-linux-gnu:
Expand Down Expand Up @@ -172,6 +173,22 @@ jobs:
sudo make install
working-directory: ${{ runner.temp }}

- name: Restore & Cache plog (${{ env.PLOG_VERSION }})
uses: actions/cache@v1
id: plog-cache
with:
path: ${{ runner.temp }}/libs/plog
key: ${{ env.CACHE_KEY_PREFIX }}-plog-${{ env.PLOG_VERSION }}
- name: Install plog (${{ env.PLOG_VERSION }}) (header-only)
if: steps.plog-cache.outputs.cache-hit != 'true'
run: |
mkdir -p ${{ runner.temp }}/libs/plog
git clone -q -b ${{ env.PLOG_VERSION }} https://github.com/SergiusTheBest/plog.git
mkdir plog/build && cd plog/build
cmake .. -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/libs/plog
sudo make install
working-directory: ${{ runner.temp }}

- name: Build Poac
run: |
mkdir build && cd build
Expand All @@ -184,6 +201,7 @@ jobs:
-DGIT2_DIR=${{ runner.temp }}/libs/libgit2 \
-DCLIPP_DIR=${{ runner.temp }}/libs/clipp \
-DFMT_DIR=${{ runner.temp }}/libs/fmt \
-DPLOG_DIR=${{ runner.temp }}/libs/plog \
-DMITAMA_RESULT_DIR=${{ runner.temp }}/libs/mitama-result
make
Expand Down Expand Up @@ -367,6 +385,22 @@ jobs:
sudo make install
working-directory: ${{ runner.temp }}

- name: Restore & Cache plog (${{ env.PLOG_VERSION }})
uses: actions/cache@v1
id: plog-cache
with:
path: ${{ runner.temp }}/libs/plog
key: ${{ env.CACHE_KEY_PREFIX }}-plog-${{ env.PLOG_VERSION }}
- name: Install plog (${{ env.PLOG_VERSION }}) (header-only)
if: steps.plog-cache.outputs.cache-hit != 'true'
run: |
mkdir -p ${{ runner.temp }}/libs/plog
git clone -q -b ${{ env.PLOG_VERSION }} https://github.com/SergiusTheBest/plog.git
mkdir plog/build && cd plog/build
cmake .. -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/libs/plog
sudo make install
working-directory: ${{ runner.temp }}

- name: Build Poac
run: |
mkdir build && cd build
Expand All @@ -380,6 +414,7 @@ jobs:
-DOPENSSL_ROOT_DIR=${{ runner.temp }}/libs/openssl \
-DCLIPP_DIR=${{ runner.temp }}/libs/clipp \
-DFMT_DIR=${{ runner.temp }}/libs/fmt \
-DPLOG_DIR=${{ runner.temp }}/libs/plog \
-DMITAMA_RESULT_DIR=${{ runner.temp }}/libs/mitama-result
make
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ if (DEFINED FMT_DIR)
target_link_directories(${PROJECT_NAME} PRIVATE ${FMT_DIR}/lib)
endif ()

if (DEFINED PLOG_DIR)
target_include_directories(${PROJECT_NAME} PRIVATE ${PLOG_DIR}/include)
endif ()

if (DEFINED MITAMA_RESULT_DIR)
target_include_directories(${PROJECT_NAME} PRIVATE ${MITAMA_RESULT_DIR}/include)
endif ()
Expand Down

0 comments on commit 04c751b

Please sign in to comment.