Skip to content

Focal CI

Focal CI #65

Workflow file for this run

name: Focal CI
on:
push:
paths-ignore:
- 'datasets/**'
- 'docs/**'
- 'matlab/**'
- '.gitignore'
- 'LICENSE'
- 'README.md'
pull_request:
paths-ignore:
- 'datasets/**'
- 'docs/**'
- 'matlab/**'
- '.gitignore'
- 'LICENSE'
- 'README.md'
# enable manual trigger
workflow_dispatch:
# run on first day of the month
schedule:
- cron: '0 0 1 * *'
jobs:
Focal-Build:
name: Build libRSF
runs-on: ubuntu-20.04
steps:
# checkout repo
- name: Checkout
uses: actions/checkout@v3
# install dependencies
- name: Install dependencies
run: ./InstallDependencies.bash
shell: bash
# build libRSF
- name: Create build directory
run: mkdir build
- name: Run CMake
working-directory: build
run: cmake -DLIBRSF_BUILD_TEST=on ..
- name: Build lib
working-directory: build
run: make all -j$(getconf _NPROCESSORS_ONLN)
# install & uninstall libRSF
- name: Install lib
working-directory: build
run: sudo make install
- name: Uninstall lib
working-directory: build
run: sudo make uninstall
# save build for test
- uses: actions/cache@v3
id: restore-build
with:
path: |
build
externals
key: ${{ github.workflow }}-${{ github.sha }}-${{ github.run_id }}-${{ env.cache-name }}-focal
Focal-Test:
name: Test libRSF
runs-on: ubuntu-20.04
needs: [Focal-Build]
env:
CTEST_OUTPUT_ON_FAILURE: ON
steps:
# checkout repo
- name: Checkout
uses: actions/checkout@v3
# checkout ceres and eigen
- name: Checkout submodules
run: git submodule update --init --recursive
# get cached build
- uses: actions/cache@v3
id: restore-build
with:
path: |
build
externals
key: ${{ github.workflow }}-${{ github.sha }}-${{ github.run_id }}-${{ env.cache-name }}-focal
# install dependencies
- name: Install dependencies
run: ./InstallDependencies.bash
shell: bash
# run tests
- name: Run tests
working-directory: build
run: make test