saliency testing #638
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
# home directory of user in obcpp docker image | |
HOME_DIR: /home/tuas | |
# https://stackoverflow.com/a/71158878 | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
test: | |
name: C++ Tests | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/tritonuas/obcpp:x86 | |
env: | |
GITHUB_ACTIONS: "true" | |
steps: | |
- name: Create directory | |
run: mkdir -p "$HOME_DIR/obcpp" | |
- name: Clone Repo | |
run: git clone --branch $BRANCH_NAME https://oauth2:${{secrets.GITHUB_TOKEN}}@github.com/tritonuas/obcpp.git $HOME_DIR/obcpp | |
- name: Pull Submodules | |
run: cd "$HOME_DIR/obcpp" && git rm protos && git submodule add https://oauth2:${{secrets.GITHUB_TOKEN}}@github.com/tritonuas/protos.git && cd protos && git pull | |
- name: Set up CMake | |
# uses ${CMAKE_PREFIX_PATH} set in Dockerfile env | |
run: cd "$HOME_DIR/obcpp" && mkdir build && cd build && sudo cmake -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" .. | |
- name: Run Tests | |
run: cd "$HOME_DIR/obcpp/build" && sudo ninja test -j 4 | |