mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
github actions: add standalone ecl builds and testing
This commit is contained in:
+5
-4
@@ -1,4 +1,4 @@
|
|||||||
name: Change Indicator
|
name: EKF Change Indicator
|
||||||
|
|
||||||
on: pull_request
|
on: pull_request
|
||||||
|
|
||||||
@@ -13,7 +13,8 @@ jobs:
|
|||||||
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
|
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
|
||||||
git checkout ${GITHUB_HEAD_REF}
|
git checkout ${GITHUB_HEAD_REF}
|
||||||
- name: main test
|
- 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
|
- name: Check if there is a functional change
|
||||||
run: git diff --exit-code
|
run: git diff --exit-code
|
||||||
working-directory: test/change_indication
|
working-directory: src/lib/ecl/test/change_indication
|
||||||
+10
-1
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
name: Build Tests
|
name: EKF Build Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -17,10 +17,13 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: main build
|
- name: main build
|
||||||
run: make
|
run: make
|
||||||
|
working-directory: src/lib/ecl
|
||||||
- name: clean build
|
- name: clean build
|
||||||
run: make clean
|
run: make clean
|
||||||
|
working-directory: src/lib/ecl
|
||||||
- name: main test
|
- name: main test
|
||||||
run: make test
|
run: make test
|
||||||
|
working-directory: src/lib/ecl
|
||||||
Linux-Clang:
|
Linux-Clang:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: px4io/px4-dev-clang:2021-05-04
|
container: px4io/px4-dev-clang:2021-05-04
|
||||||
@@ -31,17 +34,23 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: main build
|
- name: main build
|
||||||
run: make
|
run: make
|
||||||
|
working-directory: src/lib/ecl
|
||||||
- name: clean build
|
- name: clean build
|
||||||
run: make clean
|
run: make clean
|
||||||
|
working-directory: src/lib/ecl
|
||||||
- name: main test
|
- name: main test
|
||||||
run: make test
|
run: make test
|
||||||
|
working-directory: src/lib/ecl
|
||||||
Mac-OS:
|
Mac-OS:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: main build
|
- name: main build
|
||||||
run: make
|
run: make
|
||||||
|
working-directory: src/lib/ecl
|
||||||
- name: clean build
|
- name: clean build
|
||||||
run: make clean
|
run: make clean
|
||||||
|
working-directory: src/lib/ecl
|
||||||
- name: main test
|
- name: main test
|
||||||
run: make test
|
run: make test
|
||||||
|
working-directory: src/lib/ecl
|
||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
name: Change Indicator
|
name: EKF Update Change Indicator
|
||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
@@ -12,10 +12,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.1
|
- uses: actions/checkout@v2.3.1
|
||||||
- name: main test updates change indication files
|
- 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
|
- 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
|
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
|
||||||
working-directory: test/change_indication
|
working-directory: src/lib/ecl/test/change_indication
|
||||||
- name: auto-commit any changes to change indication
|
- name: auto-commit any changes to change indication
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
@@ -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
|
|
||||||
-21
@@ -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
|
|
||||||
|
|
||||||
-32
@@ -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
|
|
||||||
Reference in New Issue
Block a user