Skip to content

perf: Improve compile-time calculation of trailing alignment #169

perf: Improve compile-time calculation of trailing alignment

perf: Improve compile-time calculation of trailing alignment #169

Workflow file for this run

name: Build
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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@v11
with:
vcpkgDirectory: '${{ runner.workspace }}/vcpkg'
vcpkgGitCommitId: 76d153790caf0592fce8fc4484aa6db18c7d00d4 # 2024/09/27
vcpkgJsonGlob: 'vcpkg.json'
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build \
-DCMAKE_TOOLCHAIN_FILE=${{ runner.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
- name: Test
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: 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
# env:
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # Needed to get PR information, if any
# SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}