mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
migrate Jenkinsfile checks to Github Actions
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Tests
|
name: Checks
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -12,22 +12,30 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
check: [
|
||||||
|
"check_format",
|
||||||
|
"tests",
|
||||||
|
"px4_fmu-v2_default stack_check",
|
||||||
|
"validate_module_configs",
|
||||||
|
"shellcheck_all",
|
||||||
|
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
|
||||||
|
"NO_NINJA_BUILD=1 px4_sitl_default",
|
||||||
|
"airframe_metadata",
|
||||||
|
"module_documentation",
|
||||||
|
"parameters_metadata",
|
||||||
|
]
|
||||||
ubuntu_release: [
|
ubuntu_release: [
|
||||||
bionic,
|
bionic,
|
||||||
focal
|
focal
|
||||||
]
|
]
|
||||||
container: px4io/px4-dev-base-${{ matrix.ubuntu_release }}:2020-04-01
|
container: px4io/px4-dev-nuttx-${{ matrix.ubuntu_release }}:2020-04-01
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.ACCESS_TOKEN }}
|
token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: check_format
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
run: make check_format
|
|
||||||
|
|
||||||
- name: Prepare ccache timestamp
|
- name: Prepare ccache timestamp
|
||||||
id: ccache_cache_timestamp
|
id: ccache_cache_timestamp
|
||||||
shell: cmake -P {0}
|
shell: cmake -P {0}
|
||||||
@@ -50,9 +58,5 @@ jobs:
|
|||||||
ccache -s
|
ccache -s
|
||||||
ccache -z
|
ccache -z
|
||||||
|
|
||||||
- name: make
|
- name: ${{matrix.check}}
|
||||||
run: make px4_sitl_test
|
run: make ${{matrix.check}}
|
||||||
- name: main tests
|
|
||||||
run: make tests
|
|
||||||
- name: ccache post-run
|
|
||||||
run: ccache -s
|
|
||||||
164
Jenkinsfile
vendored
164
Jenkinsfile
vendored
@@ -82,112 +82,6 @@ pipeline {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
stage('Style check') {
|
|
||||||
agent {
|
|
||||||
docker { image 'px4io/px4-dev-base-bionic:2020-04-01' }
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'make check_format'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
sh 'rm -rf catkin_ws'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('px4_fmu-v5 (no ninja)') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'px4io/px4-dev-nuttx-bionic:2020-04-01'
|
|
||||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'export'
|
|
||||||
sh 'make distclean'
|
|
||||||
sh 'ccache -s'
|
|
||||||
sh 'git fetch --tags'
|
|
||||||
sh 'make px4_fmu-v5_default'
|
|
||||||
sh 'make sizes'
|
|
||||||
sh 'ccache -s'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
sh 'make distclean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
environment {
|
|
||||||
NO_NINJA_BUILD = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('px4_sitl (no ninja)') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'px4io/px4-dev-nuttx-bionic:2020-04-01'
|
|
||||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'export'
|
|
||||||
sh 'make distclean'
|
|
||||||
sh 'ccache -s'
|
|
||||||
sh 'git fetch --tags'
|
|
||||||
sh 'make px4_sitl_default'
|
|
||||||
sh 'make sizes'
|
|
||||||
sh 'ccache -s'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
sh 'make distclean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
environment {
|
|
||||||
NO_NINJA_BUILD = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('SITL unit tests') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'px4io/px4-dev-base-bionic:2020-04-01'
|
|
||||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'export'
|
|
||||||
sh 'make distclean'
|
|
||||||
sh 'ccache -s'
|
|
||||||
sh 'git fetch --tags'
|
|
||||||
sh 'make tests'
|
|
||||||
sh 'ccache -s'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
// Process the CTest xml output with the xUnit plugin
|
|
||||||
xunit (
|
|
||||||
testTimeMargin: '3000',
|
|
||||||
thresholdMode: 1,
|
|
||||||
thresholds: [
|
|
||||||
skipped(failureThreshold: '0'),
|
|
||||||
failed(failureThreshold: '0')
|
|
||||||
],
|
|
||||||
reduceLog: false,
|
|
||||||
tools: [CTest(
|
|
||||||
pattern: 'build/px4_sitl_test/Testing/**/*.xml',
|
|
||||||
deleteOutputFiles: true,
|
|
||||||
failIfNotNew: false,
|
|
||||||
skipNoTestFiles: true,
|
|
||||||
stopProcessingIfError: true
|
|
||||||
)]
|
|
||||||
)
|
|
||||||
|
|
||||||
sh 'make distclean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Clang analyzer') {
|
stage('Clang analyzer') {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
@@ -286,64 +180,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Check stack') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'px4io/px4-dev-nuttx-bionic:2020-04-01'
|
|
||||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'export'
|
|
||||||
sh 'make distclean'
|
|
||||||
sh 'git fetch --tags'
|
|
||||||
sh 'make px4_fmu-v2_default stack_check'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
sh 'make distclean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('ShellCheck') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'px4io/px4-dev-nuttx-bionic:2020-04-01'
|
|
||||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'export'
|
|
||||||
sh 'make distclean'
|
|
||||||
sh 'make shellcheck_all'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
sh 'make distclean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Module config validation') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'px4io/px4-dev-base-bionic:2020-04-01'
|
|
||||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'export'
|
|
||||||
sh 'make distclean'
|
|
||||||
sh 'make validate_module_configs'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
sh 'make distclean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // parallel
|
} // parallel
|
||||||
} // stage Analysis
|
} // stage Analysis
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user