Skip to content

Commit

Permalink
add get_deps action
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed May 10, 2024
1 parent 5cceb94 commit 8f8a0e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
@@ -1,29 +1,29 @@
name: Prepare to build
name: Get dependencies

inputs:
family:
arg:
required: true
type: string

runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Checkout pico-sdk for rp2040
if: contains(inputs.family, 'rp2040')
if: contains(inputs.arg, 'rp2040') || contains(inputs.arg, 'raspberry_pi_pico')
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
ref: develop
path: pico-sdk

- name: Get Dependencies
- name: Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt install -y ninja-build
python3 tools/get_deps.py ${{ inputs.family }}
echo >> $GITHUB_ENV "PICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk"
shell: bash

- name: Get Dependencies
run: |
python3 tools/get_deps.py ${{ inputs.arg }}
echo "PICO_SDK_PATH=${{ github.workspace }}/pico-sdk" >> $GITHUB_ENV
shell: bash
17 changes: 1 addition & 16 deletions .github/workflows/build_util.yml
Expand Up @@ -43,23 +43,8 @@ jobs:
toolchain: ${{ inputs.toolchain }}
toolchain_url: ${{ inputs.toolchain_url }}

- name: Checkout pico-sdk for rp2040
if: contains(matrix.arg, 'rp2040') || contains(matrix.arg, 'raspberry_pi_pico')
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
ref: develop
path: pico-sdk

- name: Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt install -y ninja-build
- name: Get Dependencies
run: |
python3 tools/get_deps.py ${{ matrix.arg }}
echo "PICO_SDK_PATH=${{ github.workspace }}/pico-sdk" >> $GITHUB_ENV
uses: ./.github/actions/get_deps

- name: Build
if: inputs.toolchain != 'esp-idf'
Expand Down

0 comments on commit 8f8a0e5

Please sign in to comment.