name: Fetch external deps inputs: platform: required: false default: none type: choice options: - arm - aarch - espressif - riscv - none runs: using: composite steps: # aarch - name: Get aarch toolchain if: inputs.platform == 'aarch' run: | wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz sudo apt-get install -y mtools shell: bash - name: Install mkfs.fat if: inputs.platform == 'aarch' run: | wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz tar -xaf dosfstools-4.2.tar.gz cd dosfstools-4.2 ./configure make -j 2 cd src echo >> $GITHUB_PATH $(pwd) shell: bash # arm - name: Get arm toolchain if: inputs.platform == 'aarch' || inputs.platform == 'arm' uses: carlosperate/arm-none-eabi-gcc-action@v1 with: release: '10-2020-q4' # espressif - name: Get espressif toolchain if: inputs.platform == 'espressif' run: sudo apt-get install -y ninja-build shell: bash - name: Install IDF tools if: inputs.platform == 'espressif' run: | echo "Installing ESP-IDF tools" $IDF_PATH/tools/idf_tools.py --non-interactive install required $IDF_PATH/tools/idf_tools.py --non-interactive install cmake echo "Installing Python environment and packages" $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env rm -rf $IDF_TOOLS_PATH/dist shell: bash - name: Set environment if: inputs.platform == 'espressif' run: | source $IDF_PATH/export.sh echo >> $GITHUB_ENV "IDF_PYTHON_ENV_PATH=$IDF_PYTHON_ENV_PATH" echo >> $GITHUB_PATH "$PATH" shell: bash # riscv - name: Get riscv toolchain if: inputs.platform == 'riscv' run: | wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz shell: bash # common - name: Cache python dependencies if: inputs.platform != 'espressif' uses: ./.github/actions/deps/python with: action: ${{ fromJSON('["restore", "cache"]')[github.job == 'scheduler'] }} - name: Install python dependencies run: pip install -r requirements-dev.txt shell: bash