Skip to content

Update GPIO name and remove test.json file #10

Update GPIO name and remove test.json file

Update GPIO name and remove test.json file #10

Workflow file for this run

name: Atividade 1
on:
workflow_dispatch:
push:
paths:
- atividade-1/**
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
PICO_SDK_PATH: ~/pico/pico-sdk
SDK_VERSION: 1.5.0
steps:
- uses: actions/checkout@v3
- name: Cache Pico SDK
id: cache-pico-sdk
uses: actions/cache@v3
with:
path: ~/pico
key: ${{ runner.os }}-pico-sdk-${{ env.SDK_VERSION }}
- name: Set up the toolchain
run: |
sudo apt-get update
sudo apt-get install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential
- name: Set up the Pi Pico SDK
if: steps.cache-pico-sdk.outputs.cache-hit != 'true'
run: |
mkdir ~/pico
cd ~/pico
git clone https://github.com/raspberrypi/pico-sdk.git --depth 1 --branch ${SDK_VERSION}
cd pico-sdk && git submodule update --init && cd ..
- name: Compile firmware
run: |
mkdir build
cd build
cmake ..
make atividade-1
- name: Upload firmware
uses: actions/upload-artifact@v3
with:
name: firmware
path: build/atividade-1/atividade-1.*
# Build chip
- name: Build chip
uses: wokwi/wokwi-chip-clang-action@main
with:
sources: "atividade-1/test/chip/gpio.c"
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v3
with:
name: chips
path: |
atividade-1/test/chip/gpio.json
atividade-1/test/chip/gpio.wasm
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download firmware
uses: actions/download-artifact@v2
with:
name: firmware
path: build/atividade-1/
- name: Download chips
uses: actions/download-artifact@v2
with:
name: chips
path: atividade-1/test/chip/
- name: Test Pi Pico SDK on Wokwi
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
path: atividade-1/test/
scenario: scenario.yml