Hennadii Stepanov 4543a3bde2 Squashed 'src/minisketch/' changes from ea8f66b1ea..d1bd01e189
d1bd01e189 Merge bitcoin-core/minisketch#98: misc: drop trailing whitespace
fe2c88a4fd misc: drop trailing whitespace
f74b7e2bc2 Merge sipa/minisketch#75: build: Introduce CMake-based build system
850cc868d5 ci: Add GHA workflow with native Windows job
40d56708c8 doc: Add "Building with CMake" section to `README.md`
a0c86c79a7 build: Add CMake-based build system

git-subtree-dir: src/minisketch
git-subtree-split: d1bd01e189e745cd1828707e0a7004b6a6909650
2025-10-13 12:33:23 +01:00

70 lines
2.3 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- '**'
tags-ignore:
- '**'
concurrency:
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
cancel-in-progress: true
jobs:
windows-native:
name: ${{ matrix.configuration.job_name }}
# See: https://github.com/actions/runner-images#available-images.
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
configuration:
- job_name: 'x64 (MSVC): Windows (VS 2022)'
build_configuration: 'Release'
- job_name: 'x64 (MSVC): Windows (VS 2022, fields=32)'
cmake_options: '-DMINISKETCH_FIELDS=32'
build_configuration: 'Release'
- job_name: 'x64 (MSVC): Windows (VS 2022, debug)'
build_configuration: 'Debug'
# TODO: Resolve the issue and re-enable benchmark.
# See: https://github.com/bitcoin-core/minisketch/pull/96.
skip_benchmark: true
- job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
cmake_options: '-DBUILD_SHARED_LIBS=ON'
build_configuration: 'Release'
- job_name: 'x64 (clang-cl): Windows (VS 2022)'
cmake_options: '-T ClangCL'
build_configuration: 'Release'
# TODO: Resolve the issue and re-enable benchmark.
# See: https://github.com/bitcoin-core/minisketch/pull/96.
skip_benchmark: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate buildsystem
env:
CXXFLAGS: '/WX'
run: cmake -B build -DMINISKETCH_BUILD_BENCHMARK=ON ${{ matrix.configuration.cmake_options }}
- name: Build
run: cmake --build build --config ${{ matrix.configuration.build_configuration }}
- name: Binaries info
shell: bash
run: |
cd build/bin/${{ matrix.configuration.build_configuration }}
file * | grep "\.exe\|\.dll"
- name: Check
working-directory: build
run: ctest --output-on-failure -j $env:NUMBER_OF_PROCESSORS -C ${{ matrix.configuration.build_configuration }}
- name: Benchmark
if: ${{ ! matrix.configuration.skip_benchmark }}
working-directory: build
run: bin\${{ matrix.configuration.build_configuration }}\bench.exe