Skip to content

Commit

Permalink
Merge pull request #40 from noah1510/master
Browse files Browse the repository at this point in the history
update branch to v2.0.0 release state
  • Loading branch information
noah1510 authored Mar 19, 2021
2 parents 77b7ecf + ce00946 commit c924eb2
Show file tree
Hide file tree
Showing 34 changed files with 1,051 additions and 559 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
pip3 install -U wheel
pip3 install -U platformio
python3 -m platformio update
python3 -m platformio lib -g install "adafruit/DHT sensor library"
python3 -m platformio lib -g install "adafruit/Adafruit Unified Sensor"
- name: building examples and running the unit tests
run: bash ./.scripts/ci_local.sh
Expand Down
57 changes: 29 additions & 28 deletions .github/workflows/latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,39 @@ on:
- 'main'

jobs:
doxygen:
runs-on: ubuntu-20.04
if: "contains(github.event.head_commit.message, '--build-docs')"
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: sudo apt install doxygen graphviz
- name: gernearte html folder
run: mkdir doc/html
- name: generate docs
run: bash .scripts/doxygen_multilang.sh
- name: Deploy
uses: s0/git-publish-subdir-action@master
env:
REPO: self
BRANCH: gh-pages
FOLDER: doc/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pre-release:
latest-release:
name: "Pre Release latest"
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v1

- name: install doc deps
run: sudo apt-get install --yes doxygen graphviz latexmk texlive-latex-extra

- name: install platform io
run: |
pip3 install -U setuptools
pip3 install -U wheel
pip3 install -U platformio
python3 -m platformio update
python3 -m platformio lib -g install "adafruit/DHT sensor library"
python3 -m platformio lib -g install "adafruit/Adafruit Unified Sensor"
- name: building examples and running the unit tests
run: bash ./.scripts/ci_local.sh

- name: prepare for building docs
run: |
mkdir doc/html
mkdir doc/latex
- name: build documentation
run: bash .scripts/doxygen_multilang.sh

- name: pack repo
run: |
zip -r latest.zip src License README.md library.properties keywords.txt .vscode examples src
- name: Check code meets quality standards
id: code-inspector
uses: codeinspectorio/github-action@master
Expand All @@ -58,6 +54,7 @@ jobs:
max_long_functions_rate: '0.01'
project_name: 'LedController'
max_timeout_sec: '600'

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -67,14 +64,18 @@ jobs:
files: |
License
latest.zip
- name: Discord Commits
uses: Sniddl/[email protected]
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
message: "Successful commit to **{{ github.context.payload.repository.owner.name }}/{{ github.context.payload.repository.name}}**.\nDiff: {{ github.context.payload.compare }}"
embed: '{ "title": "{{ commit.title }}", "description": "{{ commit.description }}", "url": "{{ commit.url }}", "author": { "name": "{{ commit.author.name }} ({{ commit.author.username }})", "icon_url": "https://avatars.io/gravatar/{{ commit.author.email }}"} }'

refman_english.pdf
refman_german.pdf
- name: Deploy to pages
if: "contains(github.event.head_commit.message, '--build-docs')"
uses: s0/git-publish-subdir-action@master
env:
REPO: self
BRANCH: gh-pages
FOLDER: doc/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v1
if: failure()
with:
Expand Down
44 changes: 26 additions & 18 deletions .github/workflows/rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,34 @@ on:
- 'v*-rc*'

jobs:
doxygen:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: sudo apt install doxygen graphviz
- name: gernearte html folder
run: mkdir doc/html
- name: generate docs
run: bash .scripts/doxygen_multilang.sh
- name: Deploy
uses: s0/git-publish-subdir-action@master
env:
REPO: self
BRANCH: gh-pages
FOLDER: doc/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tagged-release:
tagged-rc-release:
name: "Release candidate"
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v1

- name: install doc deps
run: sudo apt-get install --yes doxygen graphviz latexmk texlive-latex-extra

- name: install platform io
run: |
pip3 install -U setuptools
pip3 install -U wheel
pip3 install -U platformio
python3 -m platformio update
python3 -m platformio lib -g install "adafruit/DHT sensor library"
python3 -m platformio lib -g install "adafruit/Adafruit Unified Sensor"
- name: building examples and running the unit tests
run: bash ./.scripts/ci_local.sh

- name: prepare for building docs
run: |
mkdir doc/html
mkdir doc/latex
- name: build documentation
run: bash .scripts/doxygen_multilang.sh

- name: Check code meets quality standards
id: code-inspector
Expand All @@ -56,13 +53,24 @@ jobs:
- name: pack repo
run: |
zip -r release.zip License README.md library.properties keywords.txt .vscode examples src
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
License
release.zip
refman_english.pdf
refman_german.pdf
- name: Deploy to pages
uses: s0/git-publish-subdir-action@master
env:
REPO: self
BRANCH: gh-pages
FOLDER: doc/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v1
if: failure()
Expand Down
44 changes: 26 additions & 18 deletions .github/workflows/stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,35 @@ on:
- '!*-rc*'

jobs:
doxygen:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: sudo apt install doxygen graphviz
- name: gernearte html folder
run: mkdir doc/html
- name: generate docs
run: bash .scripts/doxygen_multilang.sh
- name: Deploy
uses: s0/git-publish-subdir-action@master
env:
REPO: self
BRANCH: gh-pages
FOLDER: doc/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v1

- name: install doc deps
run: sudo apt-get install --yes doxygen graphviz latexmk texlive-latex-extra

- name: install platform io
run: |
pip3 install -U setuptools
pip3 install -U wheel
pip3 install -U platformio
python3 -m platformio update
python3 -m platformio lib -g install "adafruit/DHT sensor library"
python3 -m platformio lib -g install "adafruit/Adafruit Unified Sensor"
- name: building examples and running the unit tests
run: bash ./.scripts/ci_local.sh


- name: prepare for building docs
run: |
mkdir doc/html
mkdir doc/latex
- name: build documentation
run: bash .scripts/doxygen_multilang.sh

- name: Check code meets quality standards
id: code-inspector
uses: codeinspectorio/github-action@master
Expand All @@ -57,13 +54,24 @@ jobs:
- name: pack repo
run: |
zip -r release.zip License README.md library.properties keywords.txt .vscode examples
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
License
release.zip
refman_english.pdf
refman_german.pdf
- name: Deploy to pages
uses: s0/git-publish-subdir-action@master
env:
REPO: self
BRANCH: gh-pages
FOLDER: doc/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v1
if: failure()
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
doc/html
doc/man
doc/latex
doxywarn*.txt
refman_*.pdf

.vscode
.idea
Expand Down
2 changes: 1 addition & 1 deletion .scripts/ci_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else
echo "doing the full test with 1 board and 6 examles"
boards=("esp32dev")
fi
examples=("Led-matrix-rocket" "Led-matrix-rocket-multi" "Led-matrix-counting" "Led-matrix-rocket-hwSPI" "Led-matrix-message" "7-Segment-counting")
examples=("Led-matrix-rocket" "Led-matrix-rocket-multi" "Led-matrix-counting" "Led-matrix-rocket-hwSPI" "Led-matrix-message" "7-Segment-counting" "7-Segment-DHT-temp-humid")
fi

function build(){
Expand Down
10 changes: 10 additions & 0 deletions .scripts/doxygen_multilang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ OLD_LANGAUGE="English"
OUTPUT_LANGUAGE_STRING="OUTPUT_LANGUAGE = "
HTML_DIR="HTML_OUTPUT = html"
EXAMPLE_DIR="EXAMPLE_PATH = examples"
LATEX_DIR="LATEX_OUTPUT = latex"

#the base folder for the doxygen output
DOXYGEN_BASE="doc"
Expand All @@ -25,6 +26,7 @@ build_lang(){
#replace the language and add specific subfolder
sed -i "s/$OUTPUT_LANGUAGE_STRING$OLD_LANGAUGE/$OUTPUT_LANGUAGE_STRING$lang/g" Doxyfile.$lang
sed -i "s/$HTML_DIR/$HTML_DIR\/$lang/g" Doxyfile.$lang
sed -i "s/$LATEX_DIR/$LATEX_DIR\/$lang/g" Doxyfile.$lang
sed -i "s/$EXAMPLE_DIR/$EXAMPLE_DIR\/$lang/g" Doxyfile.$lang
sed -i "s/doxywarn.txt/doxywarn.$lang.txt/g" Doxyfile.$lang

Expand All @@ -35,6 +37,14 @@ build_lang(){
#run doxygen
doxygen Doxyfile.$lang

#build pdf file
cd doc/latex/$lang/
latexmk -f -pdf refman.tex
cd ../../../

#copy and rename reference manual
mv doc/latex/$lang/refman.pdf refman_$lang.pdf

#remove lang specific doxygen file
rm Doxyfile.$lang

Expand Down
Loading

0 comments on commit c924eb2

Please sign in to comment.