Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD for docs added #3

Merged
merged 40 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f74b80d
add doc action
L0rdLizard Mar 27, 2024
172b2d7
fix conan profile detect
L0rdLizard Mar 27, 2024
e6deca0
remove update profile
L0rdLizard Mar 27, 2024
55ba55c
Merge pull request #2 from SUAI-getz-programmers/dev
Sergeydigl3 Mar 27, 2024
6ab40da
add -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="conan_provider.cmake"
L0rdLizard Mar 27, 2024
cc97191
add env BUILD_TYPE
L0rdLizard Mar 27, 2024
b54a967
add .hdoc.toml
L0rdLizard Mar 27, 2024
6846347
change names
L0rdLizard Mar 27, 2024
2384459
change names2
L0rdLizard Mar 27, 2024
34b891d
Export docs to public repo for docs
Sergeydigl3 Mar 27, 2024
9799f30
rm command fixed
Sergeydigl3 Mar 27, 2024
fc0ef8d
another version
Sergeydigl3 Mar 27, 2024
1b34c13
another try
Sergeydigl3 Mar 27, 2024
206ef37
using temp_dir
Sergeydigl3 Mar 27, 2024
85923aa
upload docs
Sergeydigl3 Mar 27, 2024
26976fc
Try with building hdoc binary
Sergeydigl3 Mar 28, 2024
d961d5a
added clang for building
Sergeydigl3 Mar 28, 2024
37405bd
llvm install with clang-14
Sergeydigl3 Mar 28, 2024
06373cb
Added sudo
Sergeydigl3 Mar 28, 2024
ae60469
meason without sudo
Sergeydigl3 Mar 28, 2024
78df661
try to use fork hdoc
Sergeydigl3 Mar 28, 2024
88fc53a
added deps: libclang-cpp-dev
Sergeydigl3 Mar 28, 2024
18695c3
adding version in front of meson
Sergeydigl3 Mar 28, 2024
a183c62
version clang=17
Sergeydigl3 Mar 28, 2024
a677c58
clang fixes again
Sergeydigl3 Mar 28, 2024
9200913
clang fixes again with 17 version
Sergeydigl3 Mar 28, 2024
04c645e
Added clean after build hdoc
Sergeydigl3 Mar 28, 2024
cd7688a
small fix
Sergeydigl3 Mar 28, 2024
aac04a4
more small fix
Sergeydigl3 Mar 28, 2024
506cf1b
maybe work...
Sergeydigl3 Mar 28, 2024
93f372f
again try to find default paths
Sergeydigl3 Mar 28, 2024
c921f8f
adding caching to speed up
Sergeydigl3 Mar 28, 2024
ecd0f39
hotfix
Sergeydigl3 Mar 28, 2024
f949257
.hdoc.toml fixed
Sergeydigl3 Mar 28, 2024
7c2be5a
add sudo and improved caching
Sergeydigl3 Mar 28, 2024
dd4b4a7
changed DOCSURL
Sergeydigl3 Mar 28, 2024
dbe2318
added sending to telegram
Sergeydigl3 Mar 28, 2024
a282c44
Now only src folder in docks
Sergeydigl3 Mar 28, 2024
37e7b2c
Try to remove deps
Sergeydigl3 Mar 28, 2024
28a943e
Removed telegram integration. Added second config only for dev branch
Sergeydigl3 Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/docs-dev-branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#name: totally-not-rabbitmq
name: notRabbit

# Triggers the workflow on push or pull request events but only for the main branch
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
workflow_dispatch:


# A simple workflow to build a C++ project and generate documentation with hdoc
jobs:
build:
env:
BUILD_TYPE: 'Debug'
BUILD_HDOC_DIR: '/tmp/build'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- 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/get-conan@v1.2

- name: Create default profile
run: conan profile detect --force

# - name: Update profile
# run: conan profile update settings.compiler.libcxx=libstdc++11 default

- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17 all

# - name: Install clang
# run: sudo apt-get install clang-17 lld-17 libclang-cpp17-dev

- name: Restore Cache HDOC build
id: cache-hdoc-restore
uses: actions/cache/restore@v4
with:
path: ${{ env.BUILD_HDOC_DIR }}
key: ${{ runner.os }}-hdoc

- name: Build hdoc
if: steps.cache-hdoc-restore.outputs.cache-hit != 'true'
run: |
mkdir -p ${{ env.BUILD_HDOC_DIR }}
cd ${{ env.BUILD_HDOC_DIR }}
git clone https://github.com/PeterTh/hdoc.git
cd hdoc
pip3 install meson
CC=clang-17 CXX=clang++-17 CPP=clang-cpp-17 meson build
sudo ninja -C build

- name: Save Cache HDOC build
id: cache-hdoc-save
uses: actions/cache/save@v4
with:
path: ${{ env.BUILD_HDOC_DIR }}
key: ${{ steps.cache-hdoc-restore.outputs.cache-primary-key }}


- name: Copy hdoc binary
run: |
sudo cp ${{ env.BUILD_HDOC_DIR }}/hdoc/build/hdoc /hdoc
sudo chmod +x /hdoc


- name: Configure CMake
run: cmake -B 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
run: |
sudo chmod +x /hdoc
sudo /hdoc --verbose

- name: zip documentation
run: |
cd hdoc-output
sudo zip -r archive.zip *
cd ..

- name: Upload documentation to custom server
run: |
cd hdoc-output
sudo curl -X POST \
-F filedata=@archive.zip \
-F name="TotalyNotRabbitMQDevBranch" \
-F version="1.0.0" \
-F description="This is TotalyNotRabbitMQ." \
${{vars.DOCSURL}}
103 changes: 103 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#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_HDOC_DIR: '/tmp/build'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- 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/get-conan@v1.2

- name: Create default profile
run: conan profile detect --force

# - name: Update profile
# run: conan profile update settings.compiler.libcxx=libstdc++11 default

- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17 all

# - name: Install clang
# run: sudo apt-get install clang-17 lld-17 libclang-cpp17-dev

- name: Restore Cache HDOC build
id: cache-hdoc-restore
uses: actions/cache/restore@v4
with:
path: ${{ env.BUILD_HDOC_DIR }}
key: ${{ runner.os }}-hdoc

- name: Build hdoc
if: steps.cache-hdoc-restore.outputs.cache-hit != 'true'
run: |
mkdir -p ${{ env.BUILD_HDOC_DIR }}
cd ${{ env.BUILD_HDOC_DIR }}
git clone https://github.com/PeterTh/hdoc.git
cd hdoc
pip3 install meson
CC=clang-17 CXX=clang++-17 CPP=clang-cpp-17 meson build
sudo ninja -C build

- name: Save Cache HDOC build
id: cache-hdoc-save
uses: actions/cache/save@v4
with:
path: ${{ env.BUILD_HDOC_DIR }}
key: ${{ steps.cache-hdoc-restore.outputs.cache-primary-key }}


- name: Copy hdoc binary
run: |
sudo cp ${{ env.BUILD_HDOC_DIR }}/hdoc/build/hdoc /hdoc
sudo chmod +x /hdoc


- name: Configure CMake
run: cmake -B 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
run: |
sudo chmod +x /hdoc
sudo /hdoc --verbose

- name: zip documentation
run: |
cd hdoc-output
sudo zip -r archive.zip *
cd ..

- name: Upload documentation to custom server
run: |
cd hdoc-output
sudo curl -X POST \
-F filedata=@archive.zip \
-F name="TotalyNotRabbitMQ" \
-F version="1.0.0.featuredoc" \
-F description="This is TotalyNotRabbitMQ." \
${{vars.DOCSURL}}
26 changes: 26 additions & 0 deletions .hdoc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[project]
#name = "totally-not-rabbitmq"
name = "notRabbit"
version = "1.0.0"

# Optional, adding this will enable direct links from the documentation
# to your source code.
git_repo_url = "https://github.com/SUAI-getz-programmers/totally-not-rabbitmq/"
git_default_branch = "feature/doc"

[paths]
compile_commands = "build/compile_commands.json"
output_dir = "hdoc-output"

[ignore]
ignore_private_members = true
paths = [
# "tests",
"_deps/",

]

#[includes]
#paths = [
# "src/",
#]
Loading