Skip to content

Try with building hdoc binary #17

Try with building hdoc binary

Try with building hdoc binary #17

Workflow file for this run

#name: totally-not-rabbitmq
name: notRabbit
# Triggers the workflow on push or pull request events but only for the main branch
on:
push:
branches: [ feature/doc ]
pull_request:
branches: [ feature/doc ]
workflow_dispatch:
# A simple workflow to build a C++ project and generate documentation with hdoc
jobs:
build:
env:
BUILD_TYPE: 'Debug'
BUILD_MESON_DIR: '/tmp/build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies, then configure and build project
run: |
sudo apt install build-essential cmake ninja-build
# cmake -GNinja -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1
# ninja -C build # Optional, you don't need to build the project to use hdoc
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Create default profile
run: conan profile detect --force
# - name: Update profile
# run: conan profile update settings.compiler.libcxx=libstdc++11 default
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="conan_provider.cmake" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
# - name: Run hdoc to generate documentation and push it to docs.hdoc.io
# uses: hdoc/hdoc-github-action@v2
# with:
# compile-commands-path: build/compile_commands.json
# hdoc-api-key: ${{ secrets.HDOC_PROJECT_API_KEY }}
- name: Build hdoc
run: |
git clone https://github.com/hdoc/hdoc.git
cd hdoc
pip3 install meson
meson build
ninja -C build
cp build/hdoc ${{github.workspace}}
- name: Download hdoc binary and run it
run: |
cd ${{github.workspace}}
chmod +x hdoc
./hdoc --verbose
- name: Upload documentation to custom server
run: |
cd hdoc-output
zip -r archive.zip *
curl -X POST \
-F [email protected] \
-F name="My Project" \
-F version="0.1.0" \
-F description="This is my project." \
${{env.DOCSURL}}