circuitpython/.github/actions/deps/external/action.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.6 KiB
YAML
Raw Normal View History

name: Fetch external deps
inputs:
2023-02-15 22:48:01 -05:00
action:
required: false
default: restore
type: choice
options:
- cache
- restore
2023-03-04 00:02:19 -05:00
port:
required: false
default: none
2023-03-04 00:02:19 -05:00
type: string
runs:
2023-02-11 01:30:27 -05:00
using: composite
steps:
# arm
- name: Get arm toolchain
2023-03-04 00:02:19 -05:00
if: >-
inputs.port != 'none' &&
inputs.port != 'litex' &&
inputs.port != 'espressif'
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '10-2020-q4'
2023-03-04 00:02:19 -05:00
# espressif
- name: Get espressif toolchain
if: inputs.port == 'espressif'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
shell: bash
- name: Install IDF tools
2023-03-04 00:02:19 -05:00
if: inputs.port == '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
2023-03-04 00:02:19 -05:00
if: inputs.port == 'espressif'
run: |
source $IDF_PATH/export.sh
echo >> $GITHUB_ENV "IDF_PYTHON_ENV_PATH=$IDF_PYTHON_ENV_PATH"
echo >> $GITHUB_PATH "$PATH"
shell: bash
# common
2023-02-11 01:30:27 -05:00
- name: Cache python dependencies
2023-03-04 00:02:19 -05:00
if: inputs.port != 'espressif'
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