From 8c6ab4bd3084af8a77b49343939f11ebc5797071 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 10 Jun 2020 15:36:47 +0200 Subject: [PATCH] add compile prerequisites to CI --- .github/workflows/compile.yaml | 12 +++++++++--- Firmware/interface_generator_stub.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 45847d91..eefd6d22 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -31,7 +31,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install ARM GCC and tup (Debian) + - name: Install prerequisites (Debian) if: startsWith(matrix.os, 'ubuntu-') run: | DEBIAN_VERSION="$(lsb_release --release --short)" @@ -52,11 +52,15 @@ jobs: sudo apt-get install tup - - name: Install ARM GCC and tup (macOS) + 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 @@ -67,7 +71,7 @@ jobs: restore-keys: | ${{ runner.os }}-gcc-arm-embedded - - name: Install ARM GCC and tup (Windows) + - 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" @@ -75,6 +79,8 @@ jobs: 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: | diff --git a/Firmware/interface_generator_stub.py b/Firmware/interface_generator_stub.py index cdbc91a8..d5b22093 100644 --- a/Firmware/interface_generator_stub.py +++ b/Firmware/interface_generator_stub.py @@ -5,7 +5,7 @@ import os try: exec(open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'fibre', 'tools', 'interface_generator.py')).read()) -except ModuleNotFoundError as ex: +except ImportError as ex: print(str(ex), file=sys.stderr) print("Note that there are new compile-time dependencies since around v0.5.1.", file=sys.stderr) print("Check out https://github.com/madcowswe/ODrive/blob/devel/docs/developer-guide.md#prerequisites for details.", file=sys.stderr)