*
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps and configuration necessary to reproduce the behavior.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Windows 10]
|
||||
- odrivetool Version (`odrivetool --version`)
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,47 @@
|
||||
name: 'Add version to release channel'
|
||||
description: |
|
||||
Appends the specified version to the end of the specified release channel if
|
||||
it wasn't already part of that channel.
|
||||
|
||||
inputs:
|
||||
release_type:
|
||||
description: 'Release type (firmware, gui, docs, internal-docs).'
|
||||
required: true
|
||||
channel:
|
||||
description: 'The channel on which to register this version'
|
||||
required: true
|
||||
version:
|
||||
description: 'The version name (commit hash or semantic version name)'
|
||||
required: true
|
||||
odrive_api_key:
|
||||
description: 'Key to our release index server'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install Prerequisites
|
||||
shell: bash
|
||||
run: |
|
||||
pip install aiohttp cryptography
|
||||
pip install odrive --pre
|
||||
|
||||
- name: Register on release server
|
||||
shell: python
|
||||
run: |
|
||||
import asyncio
|
||||
import sys
|
||||
import aiohttp
|
||||
|
||||
sys.path.insert(0, '${{ github.workspace }}/.github/actions/upload-release')
|
||||
from odrive.api_client import ApiClient
|
||||
from private_release_api import PrivateReleaseApi
|
||||
|
||||
async def main():
|
||||
async with aiohttp.ClientSession() as session:
|
||||
api_client = ApiClient(session, key='${{ inputs.odrive_api_key }}')
|
||||
release_api = PrivateReleaseApi(api_client)
|
||||
await release_api.append_to_channel('${{ inputs.release_type }}', "${{ inputs.channel }}", "${{ inputs.version }}")
|
||||
await release_api.refresh_routes('${{ inputs.release_type }}')
|
||||
|
||||
asyncio.run(main())
|
||||
@@ -0,0 +1,135 @@
|
||||
name: 'Upload (Pre)release'
|
||||
description: |
|
||||
Pushes the specified local directory to our release file server and registers
|
||||
the new content on our release index server.
|
||||
The version will not yet be associated with a channel.
|
||||
|
||||
inputs:
|
||||
release_type:
|
||||
description: 'Release type (firmware, gui, docs, internal-docs).' # TODO: Currently only firmware and docs is supported.
|
||||
required: true
|
||||
version:
|
||||
description: 'The version name (commit hash or semantic version name)'
|
||||
required: true
|
||||
src_dir:
|
||||
description: 'The source directory on the local system.'
|
||||
required: true
|
||||
do_access_key:
|
||||
description: 'DigitalOcean access key'
|
||||
required: true
|
||||
do_secret_key:
|
||||
description: 'DigitalOcean secret key'
|
||||
required: true
|
||||
odrive_api_key:
|
||||
description: 'Key to our release index server'
|
||||
required: true
|
||||
board:
|
||||
description: 'ODrive board version triplet ("PRODUCT_LINE.VERSION.VARIANT") (for firmware releases only).'
|
||||
required: false
|
||||
app:
|
||||
description: 'Firmware app name (default, bootloader) (for firmware releases only).'
|
||||
required: false
|
||||
variant:
|
||||
description: 'Variant (public or internal).'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install Prerequisites
|
||||
shell: bash
|
||||
run: pip install aiohttp cryptography
|
||||
|
||||
- name: Install odrivetool
|
||||
shell: bash
|
||||
run: pip install odrive --pre
|
||||
|
||||
- name: Load Content Key
|
||||
id: load-content-key
|
||||
shell: python
|
||||
run: |
|
||||
import asyncio
|
||||
import sys
|
||||
|
||||
import aiohttp
|
||||
|
||||
sys.path.insert(0, '${{ github.workspace }}/.github/actions/upload-release')
|
||||
from odrive.api_client import ApiClient
|
||||
from private_release_api import PrivateReleaseApi # well not so private anymore
|
||||
from odrive.crypto import safe_b64encode
|
||||
|
||||
content_key = PrivateReleaseApi.get_content_key('${{ inputs.src_dir }}', "${{ github.sha }}")
|
||||
|
||||
async def main():
|
||||
async with aiohttp.ClientSession() as session:
|
||||
api_client = ApiClient(session, key='${{ inputs.odrive_api_key }}')
|
||||
release_api = PrivateReleaseApi(api_client)
|
||||
manifest = await release_api.get_manifest('${{ inputs.release_type }}', content_key)
|
||||
needs_upload = manifest is None
|
||||
|
||||
print("::set-output name=content-key::" + safe_b64encode(content_key))
|
||||
print("::set-output name=needs-upload::" + ('true' if needs_upload else 'false'))
|
||||
|
||||
asyncio.run(main())
|
||||
|
||||
# This is for debugging only
|
||||
- name: Dump context
|
||||
shell: bash
|
||||
env:
|
||||
CONTEXT: ${{ toJson(steps) }}
|
||||
run: |
|
||||
echo "$CONTEXT"
|
||||
|
||||
- name: Upload to DigitalOcean
|
||||
if: steps.load-content-key.outputs.needs-upload == 'true'
|
||||
uses: BetaHuhn/do-spaces-action@v2
|
||||
with:
|
||||
access_key: ${{ inputs.do_access_key }}
|
||||
secret_key: ${{ inputs.do_secret_key }}
|
||||
space_name: odrive-cdn
|
||||
space_region: nyc3
|
||||
source: ${{ inputs.src_dir }}
|
||||
out_dir: releases/${{ inputs.release_type }}/${{ steps.load-content-key.outputs.content-key }}
|
||||
|
||||
- name: Register on release server
|
||||
shell: python
|
||||
run: |
|
||||
import asyncio
|
||||
import re
|
||||
import sys
|
||||
|
||||
import aiohttp
|
||||
|
||||
sys.path.insert(0, '${{ github.workspace }}/.github/actions/upload-release')
|
||||
from odrive.api_client import ApiClient
|
||||
from private_release_api import PrivateReleaseApi
|
||||
from odrive.crypto import safe_b64decode
|
||||
|
||||
version="${{ inputs.version }}"
|
||||
|
||||
print("Version: ", version)
|
||||
print("Content key: ", '${{ steps.load-content-key.outputs.content-key }}')
|
||||
|
||||
async def main():
|
||||
async with aiohttp.ClientSession() as session:
|
||||
api_client = ApiClient(session, key='${{ inputs.odrive_api_key }}')
|
||||
release_api = PrivateReleaseApi(api_client)
|
||||
|
||||
qualifiers = {}
|
||||
if '${{ inputs.board }}':
|
||||
qualifiers['board'] = tuple(int(i) for i in re.match(r'^([0-9]+)\.([0-9]+).([0-9]+)$', '${{ inputs.board }}').groups())
|
||||
if '${{ inputs.app }}':
|
||||
qualifiers['app'] = '${{ inputs.app }}'
|
||||
if '${{ inputs.variant }}':
|
||||
qualifiers['variant'] = '${{ inputs.variant }}'
|
||||
|
||||
content_key = safe_b64decode('${{ steps.load-content-key.outputs.content-key }}')
|
||||
|
||||
# Content can only be registered once, afterwards the indicated_commit cannot be changed
|
||||
if "${{ steps.load-content-key.outputs.needs-upload}}" == 'true':
|
||||
await release_api.register_content('${{ inputs.release_type }}', content_key, '${{ github.sha }}')
|
||||
|
||||
# Can be called multiple times with same or different parameters. No effect if called twice with the same parameters.
|
||||
await release_api.register_version('${{ inputs.release_type }}', version, content_key, **qualifiers)
|
||||
|
||||
asyncio.run(main())
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
import hashlib
|
||||
import os
|
||||
|
||||
from odrive.api_client import ApiClient
|
||||
from odrive.crypto import b64encode
|
||||
|
||||
class PrivateReleaseApi():
|
||||
BASE_URL = '/releases'
|
||||
|
||||
@staticmethod
|
||||
def get_content_key(path: str, commit_hash: str):
|
||||
commit_hash_bytes = bytes.fromhex(commit_hash)
|
||||
|
||||
def _get_file_names(path: str, prefix: list):
|
||||
with os.scandir(os.path.join(path, *prefix)) as it:
|
||||
for entry in it:
|
||||
if entry.is_file():
|
||||
yield os.path.join(*prefix, entry.name)
|
||||
else:
|
||||
yield from _get_file_names(path, prefix + [entry.name])
|
||||
filenames = sorted(_get_file_names(path, []))
|
||||
|
||||
dir_hasher = hashlib.sha256()
|
||||
|
||||
for filename in filenames:
|
||||
with open(os.path.join(path, filename), 'rb') as fp:
|
||||
content = fp.read()
|
||||
|
||||
# Calculate commit-invariant hash of the file content
|
||||
# This means that if a new compile differs only by embedded commit hash,
|
||||
# it is considered equal.
|
||||
patched_content = content.replace(commit_hash_bytes, bytes(len(commit_hash_bytes)))
|
||||
file_hasher = hashlib.sha256()
|
||||
file_hasher.update(patched_content)
|
||||
|
||||
dir_hasher.update(filename.encode('utf-8'))
|
||||
dir_hasher.update(file_hasher.digest())
|
||||
|
||||
return dir_hasher.digest()
|
||||
|
||||
def __init__(self, api_client: 'ApiClient'):
|
||||
self._api_client = api_client
|
||||
|
||||
async def get_manifest(self, release_type: str, content_key: bytes):
|
||||
outputs = await self._api_client.call('GET', PrivateReleaseApi.BASE_URL + '/' + release_type + '/manifest', inputs={
|
||||
'content_key': b64encode(content_key),
|
||||
})
|
||||
return outputs
|
||||
|
||||
async def register_content(self, release_type: str, content_key: bytes, indicated_commit: str):
|
||||
outputs = await self._api_client.call('PUT', PrivateReleaseApi.BASE_URL + '/' + release_type + '/content', inputs={
|
||||
'content_key': b64encode(content_key),
|
||||
'indicated_commit': indicated_commit,
|
||||
})
|
||||
return outputs['created']
|
||||
|
||||
async def register_version(self, release_type: str, version: str, content_key: bytes, **qualifiers):
|
||||
outputs = await self._api_client.call('PUT', PrivateReleaseApi.BASE_URL + '/' + release_type + '/version', inputs={
|
||||
'version': version,
|
||||
'content_key': b64encode(content_key),
|
||||
**qualifiers
|
||||
})
|
||||
return outputs['created']
|
||||
|
||||
async def append_to_channel(self, release_type: str, channel: str, version: str):
|
||||
outputs = await self._api_client.call('PUT', PrivateReleaseApi.BASE_URL + '/' + release_type + '/channel', inputs={
|
||||
'channel': channel,
|
||||
'version': version,
|
||||
})
|
||||
return outputs['published']
|
||||
|
||||
async def refresh_routes(self, release_type: str):
|
||||
await self._api_client.call('PUT', PrivateReleaseApi.BASE_URL + '/' + release_type + '/refresh-routes')
|
||||
@@ -0,0 +1,60 @@
|
||||
name: Build and publish HTML documentation website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'docs-v**' ]
|
||||
paths: ['docs/**', '.github/**']
|
||||
|
||||
jobs:
|
||||
make-html:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get release name and channel
|
||||
id: release-info
|
||||
shell: python
|
||||
run: |
|
||||
channel = "master"
|
||||
version = "${{ github.ref }}"
|
||||
assert version.startswith("refs/heads/docs-v0.5.")
|
||||
version = version[len("refs/heads/docs-v"):]
|
||||
|
||||
print("::set-output name=channel::" + channel)
|
||||
print("::set-output name=version::" + version)
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-sphinx-sphinx-tabs-sphinx-design-sphinx_copybutton-sphinx_panels-sphinx_rtd_theme
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: pip install sphinx sphinx-tabs sphinx-design sphinx_copybutton sphinx_panels sphinx_rtd_theme myst_parser
|
||||
|
||||
- name: Build HTML docs
|
||||
run: |
|
||||
cd docs
|
||||
make html
|
||||
|
||||
- name: Upload docs
|
||||
uses: ./.github/actions/upload-release
|
||||
with:
|
||||
release_type: docs
|
||||
version: ${{ steps.release-info.outputs.version }}
|
||||
src_dir: docs/_build/html
|
||||
do_access_key: ${{ secrets.DIGITALOCEAN_ACCESS_KEY }}
|
||||
do_secret_key: ${{ secrets.DIGITALOCEAN_SECRET_KEY }}
|
||||
odrive_api_key: ${{ secrets.ODRIVE_API_KEY }}
|
||||
variant: public
|
||||
|
||||
- name: Add version to release channel
|
||||
uses: ./.github/actions/add-version-to-channel
|
||||
with:
|
||||
release_type: docs
|
||||
channel: ${{ steps.release-info.outputs.channel }}
|
||||
version: ${{ steps.release-info.outputs.version }}
|
||||
odrive_api_key: ${{ secrets.ODRIVE_API_KEY }}
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, devel]
|
||||
push:
|
||||
branches: [master, devel]
|
||||
tags: ['fw-v*']
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [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 }}
|
||||
outputs:
|
||||
channel: ${{ steps.release-info.outputs.channel }}
|
||||
version: ${{ steps.release-info.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # fetch entire history to get version information
|
||||
|
||||
- name: Get release name and channel
|
||||
id: release-info
|
||||
shell: python
|
||||
run: |
|
||||
if "${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/fw-v0.5.') }}" == "true":
|
||||
channel = "master"
|
||||
version = "${{ github.ref }}"[len("refs/tags/fw-v"):]
|
||||
|
||||
else:
|
||||
channel = "none"
|
||||
version = "${{ github.sha }}"
|
||||
|
||||
print("::set-output name=channel::" + channel)
|
||||
print("::set-output name=version::" + version)
|
||||
|
||||
- name: Install prerequisites (Debian)
|
||||
if: startsWith(matrix.os, 'ubuntu-')
|
||||
run: |
|
||||
DEBIAN_VERSION="$(lsb_release --release --short)"
|
||||
echo Debian version: $DEBIAN_VERSION
|
||||
if [ "$DEBIAN_VERSION" == "16.04" ]; then
|
||||
# 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
|
||||
else
|
||||
sudo apt-get install gcc-arm-none-eabi
|
||||
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
|
||||
# See https://github.com/osxfuse/osxfuse/issues/801#issuecomment-833419942
|
||||
brew install --cask macfuse
|
||||
brew install gromgit/fuse/tup-mac
|
||||
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 "$(Resolve-Path .)\tup-latest" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
|
||||
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.debug }}" >> tup.config
|
||||
mkdir -p autogen
|
||||
python ../tools/odrive/version.py --output autogen/version.c
|
||||
cat autogen/version.c
|
||||
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
|
||||
|
||||
- name: Upload binary as artifact
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.debug == false }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: firmware-${{ matrix.board_version }}
|
||||
path: |
|
||||
Firmware/build/ODriveFirmware.elf
|
||||
Firmware/build/ODriveFirmware.bin
|
||||
Firmware/build/ODriveFirmware.hex
|
||||
|
||||
- name: Copy firmware to temp folder
|
||||
run: |
|
||||
mkdir ${{ github.workspace }}/out
|
||||
cp ${{ github.workspace }}/Firmware/build/ODriveFirmware.elf ${{ github.workspace }}/out/firmware.elf
|
||||
|
||||
- name: Parse and format matrix.board_version
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
id: format-board-version
|
||||
run: |
|
||||
formatted_version=$(echo "${{ matrix.board_version }}" | sed 's/v\([0-9]\+\)\.\([0-9]\+\)-\([0-9]\+\)V/\1.\2.\3/')
|
||||
echo "Formatted board version: $formatted_version"
|
||||
echo "::set-output name=formatted_board_version::$formatted_version"
|
||||
|
||||
- name: Upload firmware to ODrive release system
|
||||
if: ${{ steps.release-info.outputs.channel == 'master' && matrix.os == 'ubuntu-latest' && matrix.debug == false && (startsWith(matrix.board_version, 'v3.5-') || startsWith(matrix.board_version, 'v3.6-')) }}
|
||||
uses: ./.github/actions/upload-release
|
||||
with:
|
||||
release_type: firmware
|
||||
version: ${{ steps.release-info.outputs.version }}
|
||||
src_dir: out
|
||||
do_access_key: ${{ secrets.DIGITALOCEAN_ACCESS_KEY }}
|
||||
do_secret_key: ${{ secrets.DIGITALOCEAN_SECRET_KEY }}
|
||||
odrive_api_key: ${{ secrets.ODRIVE_API_KEY }}
|
||||
board: ${{ steps.format-board-version.outputs.formatted_board_version }}
|
||||
app: default
|
||||
variant: public
|
||||
|
||||
make-release:
|
||||
needs: [compile] # require all builds to succeed before we actually make the release
|
||||
if: needs.compile.outputs.channel == 'master'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout git repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: pip install aiohttp appdirs
|
||||
|
||||
- name: Add version to release channel
|
||||
uses: ./.github/actions/add-version-to-channel
|
||||
with:
|
||||
release_type: firmware
|
||||
channel: ${{ needs.compile.outputs.channel }}
|
||||
version: ${{ needs.compile.outputs.version }}
|
||||
odrive_api_key: ${{ secrets.ODRIVE_API_KEY }}
|
||||
|
||||
code-checks:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Check that we're not using std::isnan
|
||||
run: |
|
||||
cd ${{ github.workspace }}/Firmware
|
||||
|
||||
if grep 'std::isnan' -R .; then
|
||||
echo "Don't use std::isnan because it's not compatible with '-ffast-math'. Use is_nan() instead."
|
||||
return 1;
|
||||
fi
|
||||
|
||||
# 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
|
||||
Reference in New Issue
Block a user