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

Backfill develop from master #475

Merged
merged 29 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
860b56a
ci: bump softprops/action-gh-release from 2.0.5 to 2.0.6
dependabot[bot] Jun 20, 2024
c276e81
Merge pull request #470 from EnviroDIY/dependabot/github_actions/soft…
SRGDamia1 Jun 21, 2024
110ca9b
ci: bump arduino/setup-arduino-cli from 1.1.2 to 2.0.0
dependabot[bot] Jul 1, 2024
944f533
Merge pull request #471 from EnviroDIY/dependabot/github_actions/ardu…
SRGDamia1 Jul 12, 2024
a5ba55c
ci: bump softprops/action-gh-release from 2.0.6 to 2.0.8
dependabot[bot] Jul 19, 2024
07fe042
Merge pull request #473 from EnviroDIY/dependabot/github_actions/soft…
SRGDamia1 Jul 22, 2024
1ff8b3c
Switch to reusable workflows
SRGDamia1 Aug 8, 2024
5b6ab84
Use build examples workflow
SRGDamia1 Aug 9, 2024
f09491d
Update doxyfile
SRGDamia1 Aug 15, 2024
8ecaa7f
Reorder example headers
SRGDamia1 Aug 15, 2024
da58b30
Remove redundant example docs
SRGDamia1 Aug 15, 2024
186b5bf
Remove files redundant with workflow repo, update doxy fil
SRGDamia1 Aug 15, 2024
1144626
Add example dependency file
SRGDamia1 Aug 15, 2024
477192b
Fix example env names
SRGDamia1 Aug 15, 2024
34ef181
revert build_examples.yaml
SRGDamia1 Aug 15, 2024
746c2ef
Fix extra flags evn name
SRGDamia1 Aug 23, 2024
9b684b4
Update changelog
SRGDamia1 Aug 23, 2024
e34e87b
Watch-dog and sleep changes based on sleepy dog
SRGDamia1 Aug 23, 2024
f36e83b
Move board definition, fix define for Feather M0
SRGDamia1 Aug 23, 2024
cdff867
Made ds3231 default for SAMD21
SRGDamia1 Aug 23, 2024
b5fdb54
Save wake pin mode
SRGDamia1 Aug 26, 2024
f683dd8
Only actualy use Enable Interrupt for AVR. It's just a macro re-write…
SRGDamia1 Aug 26, 2024
ea7449e
Re-wrote SAMD clock configs
SRGDamia1 Aug 26, 2024
37ee801
Update changelog, bump version
SRGDamia1 Aug 26, 2024
c363d7e
Empty commit after merge
SRGDamia1 Aug 26, 2024
dd72944
Don't attempt bad version of KellerModbus
SRGDamia1 Aug 26, 2024
a3f5dad
Fix release inputs
SRGDamia1 Aug 26, 2024
fcdec30
Merge pull request #474 from EnviroDIY/sleep_changes
SRGDamia1 Aug 26, 2024
eb03a69
Fixed define check
SRGDamia1 Aug 26, 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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
interval: 'weekly'
labels:
- 'CI/CD'
commit-message:
Expand Down
144 changes: 14 additions & 130 deletions .github/workflows/build_documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: Check for Complete Documentation
name: Check, Build, and Publish Documentation

on:
# Triggers the workflow on push or pull request events
push:
pull_request:
# Trigger when a release is created
# NOTE: This will only trigger if the release is created from the UI or with a personal access token
release:
types:
- published
# Trigger with the release workflow finishes
workflow_run:
workflows: ['Create a New Release']
types: [completed]
branches: [master]
# Also give a manual trigger
workflow_dispatch:
inputs:
Expand All @@ -21,135 +27,13 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
REBUILD_CACHE_NUMBER: 2
PYTHON_DEPS_ARCHIVE_NUM: 2
DOXYGEN_VERSION: Release_1_9_6
TEX_VERSION: 2019
# ^^ 2019 is the latest TeX live available on apt-get and that's good enough
GRAPHVIZ_VERSION: 2.43.0

jobs:
check_menu_inclusion:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
name: Check that all classes are documented in the menu-a-la-carte example

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

# Using answer from here to get the exit code and pass the output: https://stackoverflow.com/questions/59191913/how-do-i-get-the-output-of-a-specific-step-in-github-actions
- name: check for classes in the menu example
id: check_component
continue-on-error: true
run: |
cd $GITHUB_WORKSPACE/continuous_integration
python check_component_inclusion.py 2>&1 | tee check_component.log
result_code=${PIPESTATUS[0]}
missing_menu_docs=$(cat check_component.log)
missing_menu_docs="${missing_menu_docs//'%'/'%25'}"
missing_menu_docs="${missing_menu_docs//$'\n'/'%0A'}"
missing_menu_docs="${missing_menu_docs//$'\r'/'%0D'}"
echo "missing_menu_docs=missing_menu_docs" >> $GITHUB_OUTPUT
if [[ $result_code ]]; then
echo "$(cat check_component.log)" >> $GITHUB_STEP_SUMMARY
else
echo "Valid library.json =)" >> $GITHUB_STEP_SUMMARY
fi
echo "Finished menu inclusion verification"
exit $result_code

- name: Create commit comment
uses: peter-evans/commit-comment@v3
if: steps.check_component.outcome=='failure'
with:
body: |
All sensor and variable subclasses must be included in the Menu a la Carte example
${{ steps.check_component.outputs.missing_menu_docs }}

- name: Fail if cannot find all menu flags
id: verification_failure
if: steps.check_component.outcome=='failure'
run: exit 1

doc_build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
if: ${{ (! contains(github.event.head_commit.message, 'ci skip')) && (github.event_name != 'workflow_run' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')) }}
name: Build documentation

steps:
# check out the ModularSensors repo
- uses: actions/checkout@v4
with:
path: code_docs/ModularSensors

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Restore Python Dependencies
uses: actions/cache@v4
id: cache_python
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-${{ env.REBUILD_CACHE_NUMBER }}-${{ env.PYTHON_DEPS_ARCHIVE_NUM }}

- name: Install Pygments and other m.css Python Requirements
run: |
python -m pip install --upgrade pip
pip3 install --upgrade --upgrade-strategy only-if-needed jinja2 Pygments beautifulsoup4

- name: Restore Doxygen, Graphviz, and TeX Live
id: cache_doxygen
uses: actions/cache@v4
with:
path: |
/usr/lib/x86_64-linux-gnu/texlive
/usr/lib/x86_64-linux-gnu/graphviz
doxygen-src
key: ${{ runner.os }}-doxygen-${{ env.REBUILD_CACHE_NUMBER }}-${{ env.DOXYGEN_VERSION }}-${{ env.TEX_VERSION }}-${{ env.GRAPHVIZ_VERSION }}

- name: Build and install doxygen and its dependencies
if: steps.cache_doxygen.outputs.cache-hit != 'true'
run: |
cd ${{ github.workspace }}/code_docs/ModularSensors/
chmod +x continuous_integration/build-install-doxygen.sh
sh continuous_integration/build-install-doxygen.sh

# check out my fork of m.css, for processing Doxygen output
- name: Checkout m.css
uses: actions/checkout@v4
with:
# Repository name with owner. For example, actions/checkout
repository: SRGDamia1/m.css
path: code_docs/m.css

- name: Generate all the documentation
continue-on-error: true
run: |
cd ${{ github.workspace }}/code_docs/ModularSensors/
chmod +x continuous_integration/generate-documentation.sh
sh continuous_integration/generate-documentation.sh 2>&1 | tee doxygen_run_output.log
result_code=${PIPESTATUS[0]}
echo "doxygen_warnings=$(cat docs/output_doxygen.log)" >> $GITHUB_OUTPUT
echo "mcss_warnings=$(cat docs/output_mcss.log)" >> $GITHUB_OUTPUT
echo "## Doxygen completed with the following warnings:" >> $GITHUB_STEP_SUMMARY
echo "$(cat docs/output_doxygen.log)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## mcss Doxygen post-processing completed with the following warnings:" >> $GITHUB_STEP_SUMMARY
echo "$(cat docs/output_mcss.log)" >> $GITHUB_STEP_SUMMARY
echo "Finished generating documentation"
exit $result_code

- name: Deploy to github pages
if: "(github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')"
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ github.workspace }}/code_docs/ModularSensorsDoxygen/m.css
uses: EnviroDIY/workflows/.github/workflows/build_documentation.yaml@main
with:
use_graphviz: false
publish: ${{ (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')}}
rebuild_cache_number: 1
secrets: inherit
Loading
Loading