Skip to content

Commit

Permalink
chore: Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tradias committed Sep 27, 2024
1 parent 4e09ba4 commit d774141
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,22 @@ env:

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/checkout@v4
# with:
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Install vcpkg
uses: lukka/run-vcpkg@v7.3
uses: lukka/run-vcpkg@v11
with:
setupOnly: true
vcpkgDirectory: ${{github.workspace}}/vcpkg
vcpkgArguments: " " # workaround for: run-vcpkg action execution failed: Error: Input required and not supplied: vcpkgArguments
vcpkgGitCommitId: 63aa65e65b9d2c08772ea15d25fb8fdb0d32e557 # 2021/08/12
vcpkgDirectory: '${{ runner.workspace }}/vcpkg'
vcpkgGitCommitId: 76d153790caf0592fce8fc4484aa6db18c7d00d4 # 2024/09/27
vcpkgJsonGlob: 'vcpkg.json'

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCNTGS_BUILD_TESTS=on -DCNTGS_DISCOVER_TESTS=on -DCNTGS_TEST_COVERAGE=on
run: cmake -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCNTGS_BUILD_TESTS=on -DCNTGS_DISCOVER_TESTS=on -DCNTGS_TEST_COVERAGE=on

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2
Expand All @@ -40,11 +35,11 @@ jobs:
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -T test -j 2 --output-on-failure

- name: Code Coverage
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target cntgs-test-cpp17-coverage
# - name: Code Coverage
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target cntgs-test-cpp17-coverage

- name: Prepare compile_commands.json for SonarCloud Scan
run: cmake -DWORKSPACE_ROOT=${{github.workspace}} -P ${{github.workspace}}/cmake/CntgsPrepareCompileCommands.cmake
# - name: Prepare compile_commands.json for SonarCloud Scan
# run: cmake -DWORKSPACE_ROOT=${{github.workspace}} -P ${{github.workspace}}/cmake/CntgsPrepareCompileCommands.cmake

#- name: SonarCloud Scan
# uses: SonarSource/sonarcloud-github-action@master
Expand Down

0 comments on commit d774141

Please sign in to comment.