forked from knowrob/knowrob
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate API docu for each major/minor version
- Loading branch information
Showing
1 changed file
with
19 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,23 +4,15 @@ on: | |
branches: [ dev ] | ||
pull_request: | ||
branches: [ dev ] | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: 'ros_ws/src/knowrob' | ||
#- name: Checkout rosprolog | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# path: 'ros_ws/src/rosprolog' | ||
# repository: knowrob/rosprolog | ||
# - name: Checkout iai_common_msgs | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# path: 'ros_ws/src/iai_common_msgs' | ||
# repository: code-iai/iai_common_msgs | ||
path: 'ros_ws/src/knowrob' | ||
- name: Setup KnowRob workspace | ||
uses: betwo/github-setup-catkin@master | ||
env: | ||
|
@@ -43,6 +35,7 @@ jobs: | |
cd ros_ws | ||
catkin_make_isolated | ||
- name: Run unit tests | ||
if: github.event_name == 'push' || github.event_name == 'pull_request' | ||
shell: bash | ||
run: | | ||
sudo systemctl start mongod | ||
|
@@ -53,35 +46,37 @@ jobs: | |
$GITHUB_WORKSPACE/ros_ws/devel_isolated/knowrob/lib/knowrob/all_gtests --gtest_filter=* --gtest_output="xml:$GITHUB_WORKSPACE/gtest-knowrob.xml" --gtest_color=no | ||
- name: Report test results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
if: github.event_name == 'push' || github.event_name == 'pull_request' | ||
with: | ||
junit_files: "gtest-knowrob.xml" | ||
action_fail: true | ||
action_fail_on_inconclusive: true | ||
##### | ||
- name: Run doxygen | ||
if: ${{ github.event_name == 'push' }} | ||
if: github.event_name == 'push' || github.event_name == 'release' | ||
shell: bash | ||
run: | | ||
cd $GITHUB_WORKSPACE/ros_ws/build_isolated/knowrob | ||
make doc | ||
#- name: Run pldoc | ||
# if: ${{ github.event_name == 'push' }} | ||
# shell: bash | ||
# run: | | ||
# source $GITHUB_WORKSPACE/ros_ws/devel_isolated/setup.bash | ||
# cp $GITHUB_WORKSPACE/ros_ws/src/knowrob/README.md $GITHUB_WORKSPACE/ros_ws/src/knowrob/src/ | ||
# rosrun rosprolog rosprolog-doc knowrob | ||
- name: Move checkout | ||
run: | | ||
mv $GITHUB_WORKSPACE/ros_ws/src/knowrob/.git $GITHUB_WORKSPACE/ | ||
mv $GITHUB_WORKSPACE/ros_ws/src/knowrob/* $GITHUB_WORKSPACE/ | ||
- name: Extract version tag | ||
if: github.event_name == 'release' | ||
shell: bash | ||
# Extract major.minor version from tag | ||
#run: echo "##[set-output name=doc_version;]$(echo ${GITHUB_REF#refs/tags/})" | ||
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/tags/} | cut -d'.' -f1,2)" | ||
id: docu_version | ||
- name: Extract branch name | ||
if: github.event_name == 'push' | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
# Use branch name as version | ||
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: docu_version | ||
- name: Deploy doc to gh-pages | ||
if: ${{ github.event_name == 'push' }} | ||
if: github.event_name == 'push' || github.event_name == 'release' | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -90,6 +85,6 @@ jobs: | |
# The folder the action should deploy. | ||
FOLDER: doc/html | ||
# The folder in the target branch | ||
TARGET_FOLDER: ${{ steps.extract_branch.outputs.branch }} | ||
TARGET_FOLDER: ${{ steps.docu_version.outputs.version }} | ||
CLEAN: true | ||
SINGLE_COMMIT: true |