xo-alloc/.github/workflows/main-stock-ubuntu.yml
Roland Conybeare 895af0da62 try different CMAKE_PREFIX_PATH.
We know catch2 installs to /usr/include/catch2
2025-05-10 17:46:39 -05:00

57 lines
1.6 KiB
YAML

name: build on ubuntu base platform
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Customize CMake build type here
BUILD_TYPE: Release
jobs:
build:
# This build won't be entirely reproducible, given ubuntu changes on github runners may
# introduce regressions.
#
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
- name: Install catch2
# install catch2.
# see [[https://stackoverflow.com/questions/57982945/how-to-apt-get-install-in-a-github-actions-workflow]]
run: |
sudo apt-get install -y catch2
# where did it put the dang thing?
ls /usr/include
#find / -name catch.hpp 2> /dev/null
- name: bootstrap xo-cmake
run: |
PREFIX=${{github.workspace}}/local
mkdir -p ${PREFIX}
echo "::group::xo-cmake configure"
cmake -B .build0 -S xo-cmake -DCMAKE_INSTALL_PREFIX=${PREFIX}
echo "::group::xo-cmake build"
cmake --build .build0
echo "::group::xo-cmake install"
cmake --install .build0
- name: build xo subprojects
run: |
PREFIX=${{github.workspace}}/local
PATH=${{github.workspace}}/local/bin:${PATH}
echo "::group::xo configure"
cmake -B .build -S . -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=/usr
echo "::group::xo build"
cmake --build .build
echo "::gorup::xo install"
cmake --install .build
- name: print install path
run: |
tree ${{github.workspace}}/local