Fix broken scripts, add script to run and test via CMake.

This commit is contained in:
Kyle Isom 2023-10-18 04:34:48 -07:00
parent f19b301aed
commit b7a8bfce9f
4 changed files with 29 additions and 15 deletions

View File

@ -9,19 +9,19 @@ jobs:
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/configuration-reference/#executor-job # See: https://circleci.com/docs/configuration-reference/#executor-job
docker: docker:
- image: cimg/base:stable - image: kisom/sc-dev:latest
# Add steps to the job # Add steps to the job
# See: https://circleci.com/docs/configuration-reference/#steps # See: https://circleci.com/docs/configuration-reference/#steps
steps: steps:
- checkout - checkout
- run: - run:
name: "Install dependencies" name: "Setup cmake build"
command: "./scripts/install-dependencies.sh" command: "./scripts/setup-cmake.sh"
- -
# Orchestrate jobs using workflows # Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows # See: https://circleci.com/docs/configuration-reference/#workflows
workflows: workflows:
say-hello-workflow: ctest:
jobs: jobs:
- say-hello - ctest

View File

@ -20,15 +20,15 @@ set(CPACK_DEBIAN_PACKAGE_SECTION devel)
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
if(LINUX) if (LINUX)
set(CPACK_GENERATOR "DEB;STGZ;TGZ") set(CPACK_GENERATOR "DEB;STGZ;TGZ")
elseif(APPLE) elseif (APPLE)
set(CPACK_GENERATOR "productbuild") set(CPACK_GENERATOR "productbuild")
elseif(MSVC OR MSYS OR MINGW) elseif (MSVC OR MSYS OR MINGW)
set(CPACK_GENERATOR "NSIS;ZIP") set(CPACK_GENERATOR "NSIS;ZIP")
else() else ()
set(CPACK_GENERATOR "ZIP") set(CPACK_GENERATOR "ZIP")
endif() endif ()
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP") set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")

View File

@ -33,7 +33,7 @@ install_debianesque () {
fi fi
echo "[+] installing tools" echo "[+] installing tools"
sudo $SUDO apt-get $APTARGS install git clang scdoc python3-pip sudo $SUDO apt-get $APTARGS install git clang scdoc python3-pip doxygen graphviz
} }
install_unsupported () { install_unsupported () {

14
scripts/setup-cmake.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
######################################################################
# @author : kyle (kyleimap.cc)
# @file : setup-cmake
# @created : Wednesday Oct 18, 2023 04:24:21 PDT
#
# @description : Prepare a CMake build environment, build, and test.
######################################################################
set -eux
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make all test && ctest