Convert documentation (#1600)

* Add checkout

* remove empty with statement

* Actually we do need push depth

* convert gen_upload_docs.bat

* convert run.bat

* forgot to add run.sh

* convert gen_upload_docs.bat

* remove checking from bats

* change config

* fix path

* fix path again

* fix file extension

* remove escapes

* added missing quotation and escapes

* convert build_current_bundle

* convert clean_bootloader

* convert compile_bootloader_discovery

* convert compile_bootloader

* add env var to skip upload

* remove checking from compile.bat

* working on push.yaml

* finish sorting

* progress

* rename push to builds

* rename push to builds

* Add skip upload env var

* fix pull_request name

* fixed typo and changed name

* fixed indentation and runs-on

* try different env var setup

* add nucleos and switch to underscore

* add quotes

* remove boards that were commented

* remove boards that were commented

* fix project board name

* fixed variable name

* add ini-file and console-settings

* try installing gcc-multilib first

* Install g++-multilib as well

* remove unnecessary export

* fixed exit numbers

* change to different env setup

* add simulator and console compilation to board bundles

* changed OS and added linux simulator build

* add checkout and missing colon

* add gcc-multilib installes

* Install mingw

* fixed install

* remove mingw from linux sim and call compile directly

* change directory

* moved envs to command

* debug ls

* debug ls

* set ftp vars

* add makefile debug info

* removed batchecks

* redirect stdout to easier see orrs

* change name

* remove redirect, add file inpection

* Add conditional project name

* Try software upgrade

* missing char

* update ine files

* try quotes

* add escapes

* add quotes

* add escapes and quotes

* remove quotes and escapes

* remove software upgrade

* ignore test 2

* update apt

* like this then

* forgot import

* fix case

* remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead

* break workflow back apart

* upload simulator artifact

* fixed operator

* update apt

* change paths

* Update build-firmware.yaml

* move update bundle to artifacts

* fix var name

* Install ncftp

* set env vars conditionally

* remove check so zips are created

* try things the github way and copy to primary

* re-enable test

* missing space

* use bash

* use bash

* add workflow

* add check before upload

* install kicad

* switch firmware to bash

* switch unit_testts to bash

* switch jenkins to bash

* fix path

* pwd

* checkout submodules

* add ppa for kicad 5.1

* install xvfb and set DISPLAY

* use xvfb

* use python3 and add NO_DISPLAY var

* fetch all

* remove blob

* undo unintentional changes

* reset accidentally commited config.xmlu

* remove submodule

* fix path

Co-authored-by: David Holdeman <David Holdeman>
This commit is contained in:
David Holdeman 2020-07-11 21:57:00 -05:00 committed by GitHub
parent b7c994daaf
commit da03fb3034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 14 deletions

33
.github/workflows/gen-docs.yaml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Generate documentation
on:
push:
branches:
- master
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Install ncftp, kicad, xvfb, and doxygen
run: |
sudo add-apt-repository ppa:js-reynaud/kicad-5.1
sudo apt-get update
sudo apt-get install ncftp kicad doxygen xvfb
- name: Set FTP variables
run: |
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_USER::${{secrets.RUSEFI_DOXYGEN_FTP_USER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_PASS::${{secrets.RUSEFI_DOXYGEN_FTP_PASS}}";
fi
- name: Generate documentation
run: xvfb-run bash ./misc/jenkins/generate_doxygen/gen_upload_docs.sh

3
.gitmodules vendored
View File

@ -15,6 +15,3 @@
[submodule "hardware/InteractiveHtmlBom"]
path = hardware/InteractiveHtmlBom
url = https://github.com/openscopeproject/InteractiveHtmlBom.git
[submodule "misc/InteractiveHtmlBom"]
path = misc/InteractiveHtmlBom
url = https://github.com/openscopeproject/InteractiveHtmlBom

@ -1 +0,0 @@
Subproject commit 14945d7553940520e11c42f4db9cb2273f57ff3f

View File

@ -1,2 +1,2 @@
@echo off
sh.exe misc\jenkins\InteractiveHtmlBom\run.sh
bash.exe misc\jenkins\InteractiveHtmlBom\run.sh

View File

@ -1,6 +1,7 @@
#!/bin/bash
IBOM_CMD="python misc/InteractiveHtmlBom/generate_interactive_bom.py --no-browser --name-format \"%f_latest\" --dest-dir ../ibom"
INTERACTIVE_HTML_BOM_NO_DISPLAY="true"
IBOM_CMD="python3 hardware/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py --no-browser --name-format \"%f_latest\" --dest-dir ../ibom"
echo "IBOM_CMD=$IBOM_CMD"
pwd

View File

@ -1,2 +1,2 @@
@echo off
sh.exe misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
bash.exe misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh

View File

@ -24,6 +24,7 @@ cd firmware
date "+%a %D %T.%2S"
echo "$SCRIPT_NAME: will be Erasing chip"
[ -e flash_erase407.sh ] || { echo "NOT FOUND flash_erase.sh"; exit 1; }
echo "$SCRIPT_NAME: Erasing chip"
bash flash_erase407.sh
@ -41,6 +42,7 @@ bash clean_compile_two_versions.sh
echo "$SCRIPT_NAME: Building DFU"
if uname | grep "NT"; then
chmod u+x ../misc/encedo_hex2dfu/hex2dfu.exe
# ../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi.hex -o deliver/rusefi.dfu
else
@ -74,7 +76,6 @@ export BUNDLE_FULL_NAME="rusefi_bundle"
bash misc/jenkins/build_working_folder.sh
[ $? -eq 0 ] || { echo "$SCRIPT_NAME: ERROR: invoking build_working_folder.sh"; exit 1; }
echo "$SCRIPT_NAME: Going back to root folder"
cd "$ROOT_FOLDER"
pwd

View File

@ -1,2 +1,2 @@
@echo off
sh.exe misc\jenkins\generate_doxygen\gen_upload_docs.sh
bash.exe misc\jenkins\generate_doxygen\gen_upload_docs.sh

View File

@ -1,11 +1,14 @@
#!/bin/bash
echo "Should be executed from project root folder. Will try to upload to $RUSEFI_FTP_SERVER"
pwd
# ibom is part of Doxygen job simply in order to reduce workspace HDD usage on my tiny build server
bash misc/jenkins/InteractiveHtmlBom/run.sh
if [ -n "$RUSEFI_FTP_SERVER" ]; then
echo "Uploading IBOMs"
ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /ibom hardware/ibom/*
fi
pwd
cd firmware
@ -15,6 +18,8 @@ doxygen || { echo "doxygen run FAILED"; exit 1; }
# http://www.ncftp.com/download/
# actually Cygwin http://rusefi.com/wiki/index.php?title=Internal:Software:Build_Server
cd ../doxygen
if [ -n "$RUSEFI_FTP_SERVER" ]; then
echo "Uploading Doxygen"
ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /html html/*
ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /html html/
fi
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }