Skip to content

feat: added ordinalDirection generation function (#992) #211

feat: added ordinalDirection generation function (#992)

feat: added ordinalDirection generation function (#992) #211

Workflow file for this run

name: codecov
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'LICENSE'
workflow_dispatch:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'LICENSE'
jobs:
build_project:
name: ci-ubuntu-24.04-build-clang-static
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: pip install -r .github/requirements.txt
- name: Install ccache
uses: hendrikmuhs/[email protected]
- name: Cache Conan packages
id: cache-conan
uses: actions/[email protected]
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Configure Conan profiles
run: |
CC=clang-18 \
CXX=clang++-18 \
conan profile detect --force --name clang-18
- name: Install Conan dependencies
run: |
conan install conanfile.txt \
-r conancenter \
-pr:b clang-18 \
-pr:h clang-18 \
-s compiler.cppstd=20 \
-s build_type=Debug \
-o "*:shared=True" \
-c:b tools.build:compiler_executables="{'c': '/usr/bin/clang-18', 'cpp': '/usr/bin/clang++-18'}" \
-c:h tools.build:compiler_executables="{'c': '/usr/bin/clang-18', 'cpp': '/usr/bin/clang++-18'}" \
--build=missing \
- name: Configure CMake
run: |
cmake -S ${{github.workspace}} --preset=unixlike-clang-debug-static \
-DCMAKE_C_COMPILER=/usr/bin/clang-18 \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-18 \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCODE_COVERAGE:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DUSE_SYSTEM_DEPENDENCIES:BOOL=ON \
-DUSE_STD_FORMAT:BOOL=ON \
-DCMAKE_TOOLCHAIN_FILE=build/Debug/generators/conan_toolchain.cmake \
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
- name: Build library and tests
run: cmake --build --preset=unixlike-clang-debug-static
- name: Build code coverage
run: cmake --build --preset=unixlike-clang-debug-static --target=faker-ccov-all
- name: Generate code coverage report
working-directory: ${{github.workspace}}/build/unixlike-clang-debug-static
run: |
llvm-cov-18 show `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata > coverage.txt \
&& llvm-cov-18 report `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata
- name: Upload code coverage report to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ${{github.workspace}}/build/unixlike-clang-debug-static
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: build-directory
path: ${{github.workspace}}/build