Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadison committed May 1, 2022
0 parents commit 1aced65
Show file tree
Hide file tree
Showing 25 changed files with 6,774 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest

env:
BOARD: "Arduino Leonardo" # board name, human-readable
BOARD_PLATFORM: "arduino:avr" # board platform, to be installed by the CLI
BOARD_FQBN: "arduino:avr:leonardo" # fully qualified board name for compilation

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1

- name: Install Board Platform
run: |
arduino-cli core update-index
arduino-cli core install $BOARD_PLATFORM
- name: Add Library Symbolic Link to Repo
run: |
mkdir --parents "$HOME/Arduino/libraries"
ln --symbolic "$PWD" "$HOME/Arduino/libraries/."
- name: Install Dependencies
run: |
git clone https://github.com/MHeironimus/ArduinoJoystickLibrary $HOME/Arduino/libraries/Joystick
- name: Compile Library Examples
run: |
buildSketchPath() {
sktch=${1##*/examples/};
sktch=${sktch%/*.ino};
echo -e "\nBuilding sketch $sktch.ino";
arduino-cli compile --fqbn $BOARD_FQBN "$1";
}
buildExamples() {
IFS=$'\n'; set -f;
for f in $(find $PWD/examples/ -name '*.ino');
do
buildSketchPath $f;
done;
unset IFS; set +f;
}
buildExamples
58 changes: 58 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: docs

on:
workflow_dispatch:
release:
types: released

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch Repository Reference Info
id: repo-info
run: |
git fetch --prune --unshallow --tags
RELEASE_TAG=${{ github.event.release.tag_name }}
LATEST_TAG=$(git tag | grep -E '^v[0-9]' | sort -V | tail -1)
GIT_SHA_SHORT=$(sed 's/\(.\{7\}\).*/\1/' <<< "$GITHUB_SHA")
PROJECT_NUMBER=${RELEASE_TAG:-${LATEST_TAG:-$GIT_SHA_SHORT}}
COMMIT_MSG=$PROJECT_NUMBER
if [ "$PROJECT_NUMBER" != "$GIT_SHA_SHORT" ]; then COMMIT_MSG+=" ($GITHUB_SHA)"; fi
echo "The project number is \"$PROJECT_NUMBER\" and the commit message is \"$COMMIT_MSG\""
echo "::set-output name=project-number::$PROJECT_NUMBER"
echo "::set-output name=commit-message::$COMMIT_MSG"
- name: Install Doxygen
env:
DOXYGEN_VERSION: 1.9.3
run: |
wget -q https://www.doxygen.nl/files/doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz
tar -xf doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz
cd doxygen-${{ env.DOXYGEN_VERSION }} && sudo make install
sudo apt-get install libclang1-9 libclang-cpp9
- name: Install Themes
env:
DOXYGEN_AWESOME_VERSION: 2.0.3
working-directory: ./docs
run: |
git clone --depth 1 -b v${{ env.DOXYGEN_AWESOME_VERSION }} https://github.com/jothepro/doxygen-awesome-css
- name: Generate Docs
working-directory: ./docs
run: |
sed -i -E 's/(PROJECT_NUMBER\s*=\s*).*/\1 ${{ steps.repo-info.outputs.project-number }}/g' Doxyfile
doxygen Doxyfile
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/generated/html
destination_dir: docs
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com
full_commit_message: Update docs for ${{ steps.repo-info.outputs.commit-message }}
Loading

0 comments on commit 1aced65

Please sign in to comment.