2023-02-10 06:40:56 -05:00
|
|
|
name: Fetch external deps
|
|
|
|
|
|
|
|
inputs:
|
2023-02-15 22:48:01 -05:00
|
|
|
action:
|
|
|
|
required: false
|
|
|
|
default: restore
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- cache
|
|
|
|
- restore
|
|
|
|
|
2023-02-10 06:40:56 -05:00
|
|
|
platform:
|
|
|
|
required: false
|
|
|
|
default: none
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- arm
|
|
|
|
- aarch
|
2023-02-14 10:03:24 -05:00
|
|
|
- esp
|
2023-02-10 06:40:56 -05:00
|
|
|
- riscv
|
|
|
|
- none
|
|
|
|
|
|
|
|
runs:
|
2023-02-11 01:30:27 -05:00
|
|
|
using: composite
|
2023-02-10 06:40:56 -05:00
|
|
|
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'
|
|
|
|
|
2023-02-14 10:03:24 -05:00
|
|
|
# esp
|
|
|
|
- name: Get esp toolchain
|
|
|
|
if: inputs.platform == 'esp'
|
2023-02-10 06:40:56 -05:00
|
|
|
run: sudo apt-get install -y ninja-build
|
|
|
|
shell: bash
|
|
|
|
- name: Install IDF tools
|
2023-02-14 10:03:24 -05:00
|
|
|
if: inputs.platform == 'esp'
|
2023-02-10 06:40:56 -05:00
|
|
|
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
|
2023-02-14 10:03:24 -05:00
|
|
|
if: inputs.platform == 'esp'
|
2023-02-10 06:40:56 -05:00
|
|
|
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
|
2023-02-11 01:30:27 -05:00
|
|
|
- name: Cache python dependencies
|
2023-02-14 10:03:24 -05:00
|
|
|
if: inputs.platform != 'esp'
|
2023-02-11 01:30:27 -05:00
|
|
|
uses: ./.github/actions/deps/python
|
|
|
|
with:
|
2023-02-15 22:48:01 -05:00
|
|
|
action: ${{ inputs.action }}
|
2023-02-11 01:30:27 -05:00
|
|
|
- name: Install python dependencies
|
|
|
|
run: pip install -r requirements-dev.txt
|
|
|
|
shell: bash
|