Skip to content

docs: add instructions to index ihsboost shared objects #121

docs: add instructions to index ihsboost shared objects

docs: add instructions to index ihsboost shared objects #121

Workflow file for this run

name: CMake
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
setup-status:
runs-on: ubuntu-latest
steps:
- name: set-build-status
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
description: awaiting building
context: build-status
- name: set-test-status
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
description: awaiting testing
context: test-status
build-and-test:
needs: setup-status # wait for pending status before starting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# ========== Dependencies ==========
- name: Install dependencies
run: sudo apt-get install python3-dev libjsoncpp-dev libboost-python-dev libbluetooth-dev libopencv-dev ninja-build -y
- name: Install libwallaby
run: git clone https://github.com/chrehall68/libwallaby.git &&
cd ./libwallaby &&
git checkout refactor &&
mkdir build && cd build &&
cmake .. -Dwith_tello=OFF -Dwith_graphics=OFF -Dwith_python_binding=OFF -Dwith_documentation=OFF -Dwith_tests=OFF -DDUMMY=ON -G "Ninja" &&
cmake --build . --parallel &&
sudo cmake --install . &&
cd ../..
# ========== Build ==========
- name: Configure CMake
# Configure ihsboost CMake in 'build' subdirectory.
run:
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-Dwith_documentation=OFF -Dpython_version=3.10 -Dbuild_tests=ON -Dbuild_debian=ON \
-G "Ninja"
- name: Build
# Build your program with the given configuration
id: build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package Debian
run: cd ${{github.workspace}}/build && cpack && cd ${{github.workspace}}
- name: install
run: sudo dpkg --install ${{github.workspace}}/build/ihs_boost-*.deb && sudo ldconfig
- name: update-build-status
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: success
description: build successful
context: build-status
# ========== Test ==========
- name: test
id: test
run: ctest -j4 -C {{env.BUILD_TYPE}} -T test --output-on-failure --test-dir ${{github.workspace}}/build
- name: update-test-status
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: success
description: all tests passed
context: test-status
# ========== Exit ==========
- name: Upload Debian Artifacts
uses: actions/upload-artifact@v3
with:
name: x86_64-linux deb package
path: ${{github.workspace}}/build/ihs_boost-*.deb
# ========== Failure Section ==========
# if build fails, set it to failed
- name: set-build-failure
if: ${{ always() && (steps.build.outcome == 'failure' || steps.build.outcome == 'canceled') }}
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Commit status (one of "error", "failure", "pending", "success")
status: failure
# A short description of the status.
description: failed to build
context: build-status
# if testing failed, set that to failed
- name: set-test-failure
if: ${{ always() && (steps.test.outcome == 'failure' || steps.test.outcome == 'canceled') }}
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Commit status (one of "error", "failure", "pending", "success")
status: failure
# A short description of the status.
description: tests failed
context: test-status