Skip to content

added basic github CI workflow #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: sigrok-pico
on:
push:
pull_request:

defaults:
run:
shell: bash

jobs:
build:
name: Build sigrok-pico
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Checkout pico-sdk
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
path: pico-sdk
ref: 2.1.1
fetch-depth: 1

- name: Install dependencies
run: sudo apt install gdb-multiarch cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib git

- name: Compile
run: |
export PICO_SDK_PATH=/home/runner/work/sigrok-pico/sigrok-pico/pico-sdk
cd pico-sdk
git submodule update --init --recursive
cd ../pico_sdk_sigrok
cmake -B build -G "Unix Makefiles" -DPICO_BOARD=pico -DCMAKE_BUILD_TYPE=Release
cmake --build build -- -j $(nproc)
cd build
make
ls -lh
cd ../..
cp pico_sdk_sigrok/build/pico_sdk_sigrok.uf2 pico_sdk_sigrok.uf2
cp pico_sdk_sigrok/build/pico_sdk_sigrok.elf pico_sdk_sigrok.elf

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: sigrok-pico
path: |
pico_sdk_sigrok.uf2
pico_sdk_sigrok.elf
LICENSE
README.md
2 changes: 1 addition & 1 deletion pico_sdk_sigrok/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pico_enable_stdio_uart(pico_sdk_sigrok 0)
pico_add_extra_outputs(pico_sdk_sigrok)

target_link_libraries(
pico_sdk_sigrok
pico_sdk_sigrok
pico_stdlib
hardware_adc
hardware_dma
Expand Down