mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
CI: add failsafe web build & deployment to the user guide
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
name: Failsafe Simulator Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
check: [
|
||||||
|
"failsafe_web",
|
||||||
|
]
|
||||||
|
container:
|
||||||
|
image: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||||
|
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: check environment
|
||||||
|
run: |
|
||||||
|
export
|
||||||
|
ulimit -a
|
||||||
|
- name: install emscripten
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk
|
||||||
|
cd _emscripten_sdk
|
||||||
|
./emsdk install latest
|
||||||
|
./emsdk activate latest
|
||||||
|
- name: ${{matrix.check}}
|
||||||
|
run: |
|
||||||
|
. ./_emscripten_sdk/emsdk_env.sh
|
||||||
|
make ${{matrix.check}}
|
||||||
Vendored
+31
@@ -162,6 +162,35 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('failsafe docs') {
|
||||||
|
agent {
|
||||||
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''#!/bin/bash -l
|
||||||
|
echo $0;
|
||||||
|
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk;
|
||||||
|
cd _emscripten_sdk;
|
||||||
|
./emsdk install latest;
|
||||||
|
./emsdk activate latest;
|
||||||
|
. ./_emscripten_sdk/emsdk_env.sh;
|
||||||
|
make failsafe_web;
|
||||||
|
cd build/px4_sitl_default_failsafe_web;
|
||||||
|
mkdir -p failsafe_sim;
|
||||||
|
cp index.* parameters.json failsafe_sim;
|
||||||
|
'''
|
||||||
|
dir('build/px4_sitl_default_failsafe_web') {
|
||||||
|
archiveArtifacts(artifacts: 'failsafe_sim/*')
|
||||||
|
stash includes: 'failsafe_sim/*', name: 'failsafe_sim'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh 'make distclean; git clean -ff -x -d .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('uORB graphs') {
|
stage('uORB graphs') {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
@@ -203,6 +232,7 @@ pipeline {
|
|||||||
unstash 'metadata_parameters'
|
unstash 'metadata_parameters'
|
||||||
unstash 'metadata_module_documentation'
|
unstash 'metadata_module_documentation'
|
||||||
unstash 'msg_documentation'
|
unstash 'msg_documentation'
|
||||||
|
unstash 'failsafe_sim'
|
||||||
unstash 'uorb_graph'
|
unstash 'uorb_graph'
|
||||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/PX4-user_guide.git')
|
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/PX4-user_guide.git')
|
||||||
@@ -211,6 +241,7 @@ pipeline {
|
|||||||
sh('cp -R modules/*.md PX4-user_guide/en/modules/')
|
sh('cp -R modules/*.md PX4-user_guide/en/modules/')
|
||||||
sh('cp -R graph_*.json PX4-user_guide/.vuepress/public/en/middleware/')
|
sh('cp -R graph_*.json PX4-user_guide/.vuepress/public/en/middleware/')
|
||||||
sh('cp -R msg_docs/*.md PX4-user_guide/en/msg_docs/')
|
sh('cp -R msg_docs/*.md PX4-user_guide/en/msg_docs/')
|
||||||
|
sh('cp -R failsafe_sim/* PX4-user_guide/.vuepress/public/en/config/failsafe')
|
||||||
sh('cd PX4-user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
sh('cd PX4-user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||||
sh('cd PX4-user_guide; git push origin main || true')
|
sh('cd PX4-user_guide; git push origin main || true')
|
||||||
sh('rm -rf PX4-user_guide')
|
sh('rm -rf PX4-user_guide')
|
||||||
|
|||||||
Reference in New Issue
Block a user