-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
158 changed files
with
24,756 additions
and
3,050 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [master, devel] | ||
tags: ['fw-v*'] | ||
push: | ||
branches: [master, devel] | ||
tags: ['fw-v*'] | ||
|
||
jobs: | ||
compile: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-16.04, ubuntu-latest, windows-latest, macOS-latest] | ||
board_version: [v3.6-56V] | ||
debug: [true] | ||
|
||
include: | ||
- {os: ubuntu-latest, board_version: v3.2, debug: false} | ||
- {os: ubuntu-latest, board_version: v3.3, debug: false} | ||
- {os: ubuntu-latest, board_version: v3.4-24V, debug: false} | ||
- {os: ubuntu-latest, board_version: v3.4-48V, debug: false} | ||
- {os: ubuntu-latest, board_version: v3.5-24V, debug: false} | ||
- {os: ubuntu-latest, board_version: v3.5-48V, debug: false} | ||
- {os: ubuntu-latest, board_version: v3.6-24V, debug: false} | ||
- {os: ubuntu-latest, board_version: v3.6-56V, debug: false} | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install prerequisites (Debian) | ||
if: startsWith(matrix.os, 'ubuntu-') | ||
run: | | ||
DEBIAN_VERSION="$(lsb_release --release --short)" | ||
echo Debian version: $DEBIAN_VERSION | ||
if [ "$DEBIAN_VERSION" -gt 9 ]; then | ||
sudo apt-get install gcc-arm-none-eabi | ||
else | ||
# Ubuntu 16.04 (Debian 9) is on ARM GCC 4.9 which is too old for us | ||
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa | ||
sudo apt-get update | ||
sudo apt-get install gcc-arm-embedded | ||
fi | ||
if ! (apt-cache search tup | grep "^tup - "); then | ||
sudo add-apt-repository ppa:jonathonf/tup | ||
sudo apt-get update | ||
fi | ||
sudo apt-get install tup | ||
sudo apt install python3 python3-yaml python3-jinja2 python3-jsonschema | ||
- name: Install prerequisites (macOS) | ||
if: startsWith(matrix.os, 'macOS-') | ||
run: | | ||
brew install armmbed/formulae/arm-none-eabi-gcc | ||
brew cask install osxfuse && brew install tup | ||
pip3 install PyYAML Jinja2 jsonschema | ||
- name: Cache chocolatey | ||
uses: actions/cache@v2 | ||
if: startsWith(matrix.os, 'windows-') | ||
with: | ||
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey\gcc-arm-embedded | ||
key: ${{ runner.os }}-gcc-arm-embedded | ||
restore-keys: | | ||
${{ runner.os }}-gcc-arm-embedded | ||
- name: Install prerequisites (Windows) | ||
if: startsWith(matrix.os, 'windows-') | ||
run: | | ||
Invoke-WebRequest -Uri "http://gittup.org/tup/win32/tup-latest.zip" -OutFile ".\tup-latest.zip" | ||
Expand-Archive ".\tup-latest.zip" -DestinationPath ".\tup-latest" -Force | ||
echo "::add-path::$(Resolve-Path .)\tup-latest" | ||
choco install gcc-arm-embedded # downloads https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-win32.zip | ||
pip install PyYAML Jinja2 jsonschema | ||
- name: Prepare Compilation | ||
run: | | ||
# for debugging | ||
arm-none-eabi-gcc --version | ||
python --version | ||
cd ${{ github.workspace }}/Firmware | ||
echo "CONFIG_BOARD_VERSION=${{ matrix.board_version }}" >> tup.config | ||
echo "CONFIG_STRICT=true" >> tup.config | ||
echo "CONFIG_DEBUG=${{ matrix.release }}" >> tup.config | ||
tup init | ||
tup generate ./tup_build.sh | ||
- name: Compile (Unix) | ||
if: "!startsWith(matrix.os, 'windows-')" | ||
run: | | ||
cd ${{ github.workspace }}/Firmware | ||
bash -xe ./tup_build.sh | ||
- name: Compile (Windows) | ||
if: startsWith(matrix.os, 'windows-') | ||
run: | | ||
cd ${{ github.workspace }}/Firmware | ||
mv tup_build.sh tup_build.bat # in reality this is a .bat script on windows | ||
.\tup_build.bat | ||
#code-checks: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# TODO: | ||
# - check if enums.py is consistent with yaml | ||
# - clang-format check | ||
# - check if interface_generator outputs the same thing with Python 3.5 and Python 3.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Build and publish HTML documentation website | ||
|
||
on: | ||
push: | ||
branches: [ feature/doc_autogen ] | ||
|
||
jobs: | ||
jekyll: | ||
runs-on: ubuntu-16.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
# Use GitHub Actions' cache for ruby and python packages to shorten build times and decrease load on servers | ||
- name: Cache gems | ||
uses: actions/cache@v2 | ||
with: | ||
path: docs/vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('docs/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-PyYAML-Jinja2-jsonschema | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
- name: Install Python dependencies | ||
run: pip install PyYAML Jinja2 jsonschema | ||
|
||
# Autogenerate the API reference .md files in the python in the python/python3 container | ||
- name: Autogenerate the API reference .md files in the python container | ||
run: | | ||
mkdir -p docs/_api docs/_includes | ||
python Firmware/interface_generator_stub.py --definitions Firmware/odrive-interface.yaml --template docs/_layouts/api_documentation_template.j2 --outputs docs/_api/#.md | ||
python Firmware/interface_generator_stub.py --definitions Firmware/odrive-interface.yaml --template docs/_layouts/api_index_template.j2 --output docs/_includes/apiindex.html | ||
- name: Build the site in the jekyll/builder container | ||
run: | | ||
docker run \ | ||
-v ${{ github.workspace }}:/srv/jekyll -e PAGES_REPO_NWO=${GITHUB_REPOSITORY} \ | ||
ruby:2.7-buster /bin/sh -c " | ||
chmod 777 /srv/jekyll/docs && \ | ||
cd /srv/jekyll/docs && \ | ||
bundle config path vendor/bundle && \ | ||
bundle install && \ | ||
JEKYLL_ENV=production bundle exec jekyll build | ||
" | ||
touch .nojekyll | ||
- name: Push to documentation branch | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git add -f docs/_site | ||
git commit -m "jekyll build from Action ${GITHUB_SHA}" | ||
git push --force origin HEAD:${REMOTE_BRANCH} | ||
env: | ||
REMOTE_BRANCH: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: pip install odrive (nightly) | ||
|
||
on: | ||
schedule: | ||
- cron: '0 2 * * *' # run at 2 AM UTC | ||
|
||
jobs: | ||
nightly: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
#pip: [pip2, pip3] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install odrivetool | ||
run: | | ||
pip install monotonic # TODO: this is dishonest. Must be removed as soon as v0.5.0 is published! | ||
pip install odrive | ||
# This one currently fails because Github Actions runs pip as non-root | ||
#- name: Check if udev rules were set up properly | ||
# if: matrix.os == 'ubuntu-latest' | ||
# run: test -f /etc/udev/rules.d/91-odrive.rules | ||
|
||
# This step is mentioned in the user guide | ||
- name: Add ~/.local/bin to path | ||
if: matrix.os == 'ubuntu-latest' | ||
run: echo "::add-path::~/.local/bin" | ||
|
||
- name: Launch odrivetool | ||
# This returns a non-zero exit code if the odrivetool throws an exception | ||
run: echo 'quit()' | odrivetool shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.