Skip to content

make ARCH_INDEPENDENT libraries to have CMake configs installed to share #130

make ARCH_INDEPENDENT libraries to have CMake configs installed to share

make ARCH_INDEPENDENT libraries to have CMake configs installed to share #130

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CTEST_OUTPUT_ON_FAILURE: 1
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/cpm_modules
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: 3.18.4
- name: test and install local build
run: |
cmake -S test -B build/local
cmake --build build/local
cmake --build build/local --target test
cmake --install build/local --prefix ./install_dir
- name: test installed build
run: |
sudo apt install fzf ripgrep
fzf --walker-root=./install_dir -f "lib /cmake/ /dependencyConfig.cmake" | rg lib | rg cmake | rg Config.cmake
fzf --walker-root=./install_dir -f header_onlyConfig.cmake | rg share/cmake
cmake -S test -B build/installed -DCMAKE_INSTALL_PREFIX=./install_dir -D TEST_INSTALLED_VERSION=1
cmake --build build/installed
cmake --build build/installed --target test
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/cpm_modules
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: 3.18.4
- name: build for packaging
run: |
cmake -S test -B build/local -DTEST_CPACK=YES
cmake --build build/local
cmake --build build/local --target test
cd build/local
cpack -G DEB .
dpkg -I *deb | grep "Maintainer: Foo Bar <[email protected]>"
sudo -E dpkg -i *.deb
- name: test installed build
run: |
cmake -S test -B build/installed -D TEST_INSTALLED_VERSION=1
cmake --build build/installed
cmake --build build/installed --target test