Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: cache
with:
path: ${{ github.workspace }}/${{ env.INSTALL_LOCATION }}
key: ${{ runner.os }}-dependencies
key: ${{ runner.os }}-dependencies-${{ hashFiles('CMakeLists.txt') }}

- name: install GoogleTest
if: ${{ steps.cache.output.cache-hit != 'true' }}
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
cd ..
git clone https://github.com/google/googletest.git --branch release-1.10.0
git clone https://github.com/google/googletest.git --branch v1.17.0
cd googletest
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/$INSTALL_LOCATION
cmake --build build --config Release
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,35 @@ jobs:
- name: set version name (Windows)
id: version_win
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
$TAG = (${env:GITHUB_REF} -replace 'refs/tags/', '')
echo "::set-output name=name::$TAG"
echo "name=$TAG" >> ${env:GITHUB_OUTPUT}

- name: set version name
id: version
if: ${{ runner.os != 'Windows' }}
run: echo ::set-output name=name::${GITHUB_REF#refs/tags/}
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "name=$TAG" >> "$GITHUB_OUTPUT"

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: cache
with:
path: ${{ github.HOME }}/.local
key: ${{ runner.os }}-dependencies
key: ${{ runner.os }}-dependencies-${{ hashFiles('CMakeLists.txt') }}

- name: install GoogleTest
if: ${{ steps.cache.output.cache-hit != 'true' }}
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
cd ..
git clone https://github.com/google/googletest.git --branch release-1.10.0
git clone https://github.com/google/googletest.git --branch v1.17.0
cd googletest
cmake -Bbuild -DCMAKE_INSTALL_PREFIX="$HOME/.local" -Dgtest_force_shared_crt=1
cmake --build build --config Release
Expand Down Expand Up @@ -104,14 +107,14 @@ jobs:
tar -cvzf $HOME/artifact.tar.gz .

- name: upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Windows' }}
with:
name: ${{ runner.os }}-${{ steps.version_win.outputs.name }}
path: '~/artifact.*'

- name: upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ runner.os != 'Windows' }}
with:
name: ${{ runner.os }}-${{ steps.version.outputs.name }}
Expand Down Expand Up @@ -141,7 +144,7 @@ jobs:
prerelease: false

- name: download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: "Linux-${{ steps.version.outputs.name }}"
path: ./
Expand All @@ -157,7 +160,7 @@ jobs:
asset_content_type: application/x-tar

- name: download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: "Windows-${{ steps.version.outputs.name }}"
path: ./
Expand All @@ -173,7 +176,7 @@ jobs:
asset_content_type: application/zip

- name: download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: "macOS-${{ steps.version.outputs.name }}"
path: ./
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: cache
with:
path: ${{ github.workspace }}/${{ env.INSTALL_LOCATION }}
key: ${{ runner.os }}-dependencies
key: ${{ runner.os }}-dependencies-${{ hashFiles('CMakeLists.txt') }}

- name: install GoogleTest
if: ${{ steps.cache.output.cache-hit != 'true' }}
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
cd ..
git clone https://github.com/google/googletest.git --branch release-1.10.0
git clone https://github.com/google/googletest.git --branch v1.17.0
cd googletest
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/$INSTALL_LOCATION
cmake --build build --config Release
Expand All @@ -47,8 +47,10 @@ jobs:
cd build
ctest -C $BUILD_TYPE -VV

- name: Code coverage using Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false

- name: install project
run: cmake --build build --target install --config Release
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: cache
with:
path: ${{env.INSTALL_LOCATION}}
key: ${{runner.os}}-dependencies
key: ${{ runner.os }}-dependencies-${{ hashFiles('CMakeLists.txt') }}

- name: install GoogleTest
if: ${{steps.cache.output.cache-hit != 'true'}}
run: |
cd ..
git clone https://github.com/google/googletest.git --branch release-1.10.0
git clone https://github.com/google/googletest.git --branch v1.17.0
cd googletest
cmake -Bbuild -DCMAKE_INSTALL_PREFIX="$HOME/$env:INSTALL_LOCATION" -Dgtest_force_shared_crt=1
cmake --build build --config Release
Expand Down
2 changes: 1 addition & 1 deletion cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

function(verbose_message content)
if(${PROJECT_NAME}_VERBOSE_OUTPUT)
if(${CMAKE_PROJECT_NAME}_VERBOSE_OUTPUT)
message(STATUS ${content})
endif()
endfunction()
Expand Down
2 changes: 0 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.15)
# Project details
#

set(${CMAKE_PROJECT_NAME}Tests_VERBOSE_OUTPUT ${PROJECT_NAME}_VERBOSE_OUTPUT)

project(
${CMAKE_PROJECT_NAME}Tests
LANGUAGES CXX
Expand Down