118 lines
3.4 KiB
YAML
118 lines
3.4 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@v4
|
|
|
|
- name: install apt deps
|
|
run: |
|
|
sudo apt update
|
|
echo "::group::cmake install"
|
|
sudo apt install -y cmake
|
|
echo "::group::git install"
|
|
sudo apt install -y git
|
|
echo "::group::pybind11-dev install"
|
|
sudo apt install -y pybind11-dev
|
|
|
|
- name: build+install catch2
|
|
run: |
|
|
echo "::group::clone catch2"
|
|
git clone https://github.com/catchorg/Catch2.git
|
|
cd Catch2
|
|
git checkout v2.13.8
|
|
echo "::group::catch2 configure"
|
|
mkdir .build
|
|
cmake -B .build -S .
|
|
echo "::group::catch2 install"
|
|
sudo cmake --build .build --target install
|
|
|
|
# this should be sufficient for find_package(Catch2) to work
|
|
|
|
- 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/local # -DCMAKE_FIND_DEBUG_MODE=ON
|
|
|
|
echo "::group::xo-indentlog build"
|
|
cmake --build .build -- xo-indentlog
|
|
|
|
echo "::group::xo-refcnt build"
|
|
cmake --build .build -- refcnt
|
|
|
|
echo "::group::xo-subsys build"
|
|
cmake --build .build -- xo-subsys
|
|
|
|
echo "::group::xo-randomgen build"
|
|
cmake --build .build -- xo-randomgen
|
|
|
|
echo "::group::xo-ordinaltree build"
|
|
cmake --build .build -- xo-ordinaltree
|
|
|
|
echo "::group::xo-flatstring build"
|
|
cmake --build .build -- xo-flatstring
|
|
|
|
echo "::group::xo-pyutil build"
|
|
cmake --build .build -- xo-pyutil
|
|
|
|
echo "::group::xo-reflectutil build"
|
|
cmake --build .build -- xo-reflectutil
|
|
|
|
echo "::group::xo-reflect build"
|
|
cmake --build .build -- xo-reflect
|
|
|
|
echo "::group::xo-pyreflect build"
|
|
cmake --build .build -- xo-pyreflect
|
|
|
|
echo "::group::xo-ratio build"
|
|
cmake --build .build -- xo-ratio
|
|
|
|
echo "::group::xo-unit build"
|
|
cmake --build .build -- xo-unit
|
|
|
|
echo "::group::xo-pyunit build"
|
|
cmake --build .build -- xo-pyunit
|
|
|
|
##############
|
|
|
|
echo "::group::xo-expression build"
|
|
cmake --build .build -- xo-expression
|
|
|
|
echo "::group::xo build (catch all)"
|
|
cmake --build .build #--verbose
|
|
|
|
echo "::group::xo install"
|
|
cmake --install .build
|
|
|
|
- name: print install path
|
|
run: |
|
|
tree ${{github.workspace}}/local
|