Add initial support for Pico-W #647
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | ||
# Copyright 2022 Paul Guyot <[email protected]> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | ||
# | ||
name: Pico Build | ||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/**' | ||
- 'CMakeLists.txt' | ||
- 'libs/**' | ||
- 'src/platforms/rp2040/**' | ||
- 'src/libAtomVM/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/**' | ||
- 'CMakeLists.txt' | ||
- 'libs/**' | ||
- 'src/platforms/rp2040/**' | ||
- 'src/libAtomVM/**' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
jobs: | ||
pico: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
board: ["pico", "pico_w"] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: "Install deps" | ||
run: sudo apt install -y cmake gperf ninja-build gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib erlang-base erlang-dialyzer | ||
- name: Build | ||
shell: bash | ||
working-directory: ./src/platforms/rp2040/ | ||
run: | | ||
set -euo pipefail | ||
mkdir build | ||
cd build | ||
cmake .. -G Ninja -DPICO_BOARD=${{ matrix.board }} | ||
ninja | ||
- name: Install nvm and nodejs 20 | ||
run: | | ||
set -euo pipefail | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash | ||
source $HOME/.nvm/nvm.sh | ||
nvm install 20 | ||
- name: Run tests with rp2040js | ||
shell: bash | ||
working-directory: ./src/platforms/rp2040/tests | ||
# Unfortunately, rp2040js doesn't support cyw43 and cyw43_arch_init panics | ||
if: success() && matrix.board != "pico_w" | ||
Check failure on line 64 in .github/workflows/pico-build.yaml GitHub Actions / Pico BuildInvalid workflow file
|
||
run: | | ||
set -euo pipefail | ||
source $HOME/.nvm/nvm.sh | ||
nvm use node | ||
npm install | ||
npx tsx run-tests.ts ../build/tests/rp2040_tests.uf2 ../build/tests/test_erl_sources/rp2040_test_modules.uf2 |