-
Notifications
You must be signed in to change notification settings - Fork 0
Testing CPP library update #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5b6aeea
a5c3e35
634a650
0193284
131405d
399d509
f2923f6
0c3fc51
4e99dad
7cf4b7c
695b637
49254eb
59d55c1
09a264e
4081373
809d3c3
d212a13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,21 +13,23 @@ on: | |
|
|
||
| jobs: | ||
| test: | ||
| name: Test (${{ matrix.name }}) | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| compiler: [gcc, clang, msvc] | ||
| exclude: | ||
| - os: ubuntu-latest | ||
| compiler: msvc | ||
| - os: macos-latest | ||
| compiler: msvc | ||
| - os: macos-latest | ||
| compiler: gcc | ||
| - os: windows-latest | ||
| compiler: gcc | ||
| - os: windows-latest | ||
| compiler: clang | ||
| include: | ||
| - name: Ubuntu GCC | ||
| os: ubuntu-latest | ||
| cc: gcc | ||
| cxx: g++ | ||
| - name: Ubuntu Clang | ||
| os: ubuntu-latest | ||
| cc: clang | ||
| cxx: clang++ | ||
| - name: macOS | ||
| os: macos-latest | ||
| - name: Windows | ||
| os: windows-latest | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
|
|
@@ -36,13 +38,61 @@ jobs: | |
|
|
||
| - name: Configure CMake | ||
| run: cmake --preset=test | ||
| env: | ||
| CC: ${{ matrix.cc }} | ||
| CXX: ${{ matrix.cxx }} | ||
| if: ${{ matrix.cc }} | ||
|
|
||
| - name: Configure CMake | ||
| run: cmake --preset=test | ||
| if: ${{ !matrix.cc }} | ||
|
|
||
| - name: Build | ||
| run: cmake --build --preset=test | ||
|
|
||
| - name: Test | ||
| run: ctest --preset=test | ||
|
|
||
| - name: Build and Install | ||
| run: | | ||
| cmake --preset=default | ||
| cmake --build --preset=default | ||
| cmake --install build/default --prefix ${{ runner.temp }}/install | ||
sean-parent marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| env: | ||
| CC: ${{ matrix.cc }} | ||
| CXX: ${{ matrix.cxx }} | ||
| if: ${{ matrix.cc }} | ||
|
|
||
| - name: Build and Install | ||
| run: | | ||
| cmake --preset=default | ||
| cmake --build --preset=default | ||
| cmake --install build/default --prefix ${{ runner.temp }}/install | ||
| if: ${{ !matrix.cc }} | ||
|
|
||
| - name: Test find_package | ||
| shell: bash | ||
| run: | | ||
| # Create a minimal test to verify the installation works with find_package | ||
| mkdir -p ${{ runner.temp }}/test-find-package | ||
| cd ${{ runner.temp }}/test-find-package | ||
|
|
||
| # Create test CMakeLists.txt | ||
| cat > CMakeLists.txt << EOF | ||
| cmake_minimum_required(VERSION 3.20) | ||
| project(test-find-package CXX) | ||
|
|
||
| find_package(stlab-enum-ops REQUIRED) | ||
|
|
||
| message(STATUS "Successfully found stlab-enum-ops") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Package name mismatch between CMakeLists and workflow testThe workflow test tries to find a package named |
||
| EOF | ||
|
|
||
| # Convert paths to forward slashes for CMake (works on all platforms) | ||
| INSTALL_PREFIX=$(echo '${{ runner.temp }}/install' | sed 's|\\|/|g') | ||
|
|
||
| # Test find_package with CMAKE_PREFIX_PATH | ||
| cmake -B build -S . -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" | ||
|
|
||
| clang-tidy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.