-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving CI pipeline with more steps (#64)
- Loading branch information
Showing
4 changed files
with
166 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the action will run. | ||
|
@@ -9,23 +7,168 @@ on: | |
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
clang-format-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 # required to mount the Github Workspace to a volume | ||
|
||
- name: Run clang-format-lint | ||
uses: DoozyX/[email protected] | ||
with: | ||
source: '.' | ||
exclude: './third_party ./external .git' | ||
extensions: 'h,cpp' | ||
clangFormatVersion: 11 | ||
|
||
|
||
cppcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run cppcheck | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: bailool/mc-calib-dev:latest | ||
options: -v ${{ github.workspace }}:/home/MC-Calib | ||
run: | | ||
cppcheck MC-Calib/McCalib/include | ||
cppcheck MC-Calib/McCalib/src | ||
clang-tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
- name: Run clang-tidy | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: bailool/mc-calib-dev:latest | ||
options: -v ${{ github.workspace }}:/home/MC-Calib | ||
run: | | ||
mkdir MC-Calib/build && cd MC-Calib/build | ||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug .. | ||
run-clang-tidy | ||
unit-tests-with-sanitizers: | ||
if: ${{ false }} # TODO: disable for now until understand how to suppress leaks from external libraries like OpenCV | ||
runs-on: ubuntu-latest | ||
needs: | ||
- clang-format-lint | ||
- cppcheck | ||
- clang-tidy | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: '.' | ||
exclude: './third_party ./external .git' | ||
extensions: 'h,cpp' | ||
clangFormatVersion: 11 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout MC-Calib-data | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: BAILOOL/MC-Calib-data | ||
path: ${{ github.workspace }}/data | ||
lfs: 'true' | ||
|
||
- name: Unzip MC-Calib-data | ||
run: tar xf ${{ github.workspace }}/data/Blender_Images.tar.gz -C ${{ github.workspace }}/data | ||
|
||
- name: Run tests | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: bailool/mc-calib-dev:latest | ||
options: -v ${{ github.workspace }}:/home/MC-Calib | ||
run: | | ||
mkdir MC-Calib/build && cd MC-Calib/build | ||
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZERS=ON .. | ||
make -j4 | ||
./tests/boost_tests_run | ||
unit-tests-with-valgrind: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- clang-format-lint | ||
- cppcheck | ||
- clang-tidy | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout MC-Calib-data | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: BAILOOL/MC-Calib-data | ||
path: ${{ github.workspace }}/data | ||
lfs: 'true' | ||
|
||
- name: Unzip MC-Calib-data | ||
run: tar xf ${{ github.workspace }}/data/Blender_Images.tar.gz -C ${{ github.workspace }}/data | ||
|
||
- name: Run tests | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: bailool/mc-calib-dev:latest | ||
options: -v ${{ github.workspace }}:/home/MC-Calib | ||
run: | | ||
mkdir MC-Calib/build && cd MC-Calib/build | ||
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZERS=OFF .. | ||
make -j4 | ||
valgrind --leak-check=full \ | ||
--leak-check=full \ | ||
--track-origins=yes \ | ||
--show-reachable=yes \ | ||
--error-limit=no \ | ||
--gen-suppressions=all \ | ||
--verbose \ | ||
--log-file=valgrind-out.txt \ | ||
--suppressions=../tests/valgrind_suppress/opencv_valgrind.supp \ | ||
--suppressions=../tests/valgrind_suppress/opencv_valgrind_3rdparty.supp \ | ||
--suppressions=../tests/valgrind_suppress/boost_valgrind.supp \ | ||
./apps/calibrate/calibrate ../tests/configs_for_end2end_tests/calib_param_synth_Scenario1.yml | ||
unit-tests-in-release-mode: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- clang-format-lint | ||
- cppcheck | ||
- clang-tidy | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout MC-Calib-data | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: BAILOOL/MC-Calib-data | ||
path: ${{ github.workspace }}/data | ||
lfs: 'true' | ||
|
||
- name: Unzip MC-Calib-data | ||
run: tar xf ${{ github.workspace }}/data/Blender_Images.tar.gz -C ${{ github.workspace }}/data | ||
|
||
- name: Run tests | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: bailool/mc-calib-prod:latest | ||
options: -v ${{ github.workspace }}:/home/MC-Calib | ||
run: | | ||
mkdir MC-Calib/build && cd MC-Calib/build | ||
cmake -DCMAKE_BUILD_TYPE=Release .. | ||
make -j4 | ||
./tests/boost_tests_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
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
Empty file.