Skip to content

Commit

Permalink
Generate API docu for each major/minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel86 committed Sep 3, 2024
1 parent c12825d commit df76f53
Showing 1 changed file with 19 additions and 24 deletions.
43 changes: 19 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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

0 comments on commit df76f53

Please sign in to comment.