add CMake config package file #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test consuming libbase122. | |
name: Test Consuming libbase122 | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/cmake-build -DCMAKE_BUILD_TYPE=Debug | |
- name: Build | |
run: cmake --build ${{github.workspace}}/cmake-build --config Debug | |
- name: Install | |
run: cmake --install ${{github.workspace}}/cmake-build --prefix ${{github.workspace}}/.install --config Debug | |
- name: Consume with CMake config file | |
working-directory: ${{github.workspace}}/test/testconsumer | |
run: | | |
cmake \ | |
-DLIBBASE122_USE_CONFIG_FILE=ON \ | |
-DCMAKE_PREFIX_PATH=${{github.workspace}}/.install \ | |
-S. -Bcmake-build | |
cmake --build cmake-build | |
./cmake-build/testconsumer | |