github actions: add standalone ecl builds and testing

This commit is contained in:
Daniel Agar 2021-07-13 10:45:58 -04:00
parent dbaed99626
commit 18dcec43d3
No known key found for this signature in database
GPG Key ID: FD3CBA98017A69DE
6 changed files with 19 additions and 108 deletions

View File

@ -1,4 +1,4 @@
name: Change Indicator
name: EKF Change Indicator
on: pull_request
@ -13,7 +13,8 @@ jobs:
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
git checkout ${GITHUB_HEAD_REF}
- name: main test
run: make test
run: cd ${GITHUB_WORKSPACE}/src/lib/ecl; make test
working-directory: src/lib/ecl
- name: Check if there is a functional change
run: git diff --exit-code
working-directory: test/change_indication
run: git diff --exit-code
working-directory: src/lib/ecl/test/change_indication

View File

@ -1,5 +1,5 @@
name: Build Tests
name: EKF Build Tests
on:
push:
@ -17,10 +17,13 @@ jobs:
- uses: actions/checkout@v1
- name: main build
run: make
working-directory: src/lib/ecl
- name: clean build
run: make clean
working-directory: src/lib/ecl
- name: main test
run: make test
working-directory: src/lib/ecl
Linux-Clang:
runs-on: ubuntu-latest
container: px4io/px4-dev-clang:2021-05-04
@ -31,17 +34,23 @@ jobs:
- uses: actions/checkout@v1
- name: main build
run: make
working-directory: src/lib/ecl
- name: clean build
run: make clean
working-directory: src/lib/ecl
- name: main test
run: make test
working-directory: src/lib/ecl
Mac-OS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: main build
run: make
working-directory: src/lib/ecl
- name: clean build
run: make clean
working-directory: src/lib/ecl
- name: main test
run: make test
working-directory: src/lib/ecl

View File

@ -1,4 +1,4 @@
name: Change Indicator
name: EKF Update Change Indicator
on: push
@ -12,10 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v2.3.1
- name: main test updates change indication files
run: make test
run: cd ${GITHUB_WORKSPACE}/src/lib/ecl; make test
- name: Check if there exists diff and save result in variable
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
working-directory: test/change_indication
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
working-directory: src/lib/ecl/test/change_indication
- name: auto-commit any changes to change indication
uses: stefanzweifel/git-auto-commit-action@v4
with:

View File

@ -1,46 +0,0 @@
name: Firmware Build Test
on:
pull_request:
branches:
- '*'
jobs:
Firmware-build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-05-04
env:
GIT_COMMITTER_EMAIL: bot@px4.io
GIT_COMMITTER_NAME: PX4BuildBot
steps:
- name: Checkout Firmware master
uses: actions/checkout@v2.3.1
with:
repository: PX4/Firmware
ref: master
path: Firmware
fetch-depth: 0
submodules: recurvise
- name: Checkout matching branch on PX4/Firmware if possible
run: |
git checkout ${{github.head_ref}} || echo "Firmware branch: ${{github.head_ref}} not found, using master instead"
git submodule update --init --recursive
working-directory: Firmware
- name: Configure Firmware to include current ECL version
working-directory: Firmware/src/lib/ecl
run: |
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
git checkout ${{github.head_ref}}
- name: Add and commit new ECL version
run: |
git config --global user.email "${GIT_COMMITTER_EMAIL}"
git config --global user.name "${GIT_COMMITTER_NAME}"
git add src/lib/ecl
git commit -m "Update ECL"
working-directory: Firmware
- name: Build Firmware
working-directory: Firmware
run: make
- name: Build fmu v2 target to check flash size
working-directory: Firmware
run: make px4_fmu-v2_default

View File

@ -1,21 +0,0 @@
name: Format Checks
on:
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
format_checks:
runs-on: ubuntu-latest
container: px4io/px4-dev-clang:2021-05-04
steps:
- uses: actions/checkout@v1
- name: install clang-format-6.0
run: apt install -y clang-format-6.0
- name: check_format
run: ./tools/format.sh 0

View File

@ -1,32 +0,0 @@
name: Unit Tests
on:
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
unit_tests:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
steps:
- uses: actions/checkout@v1
- name: main test
run: make test
coverage:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
steps:
- uses: actions/checkout@v1
- name: coverage
run: make coverage
- name: coverage_html
run: make coverage_html
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ecl