File tree Expand file tree Collapse file tree 3 files changed +54
-2
lines changed Expand file tree Collapse file tree 3 files changed +54
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Raspberry PI Pico Docker SDK CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+ release :
11+ types : [published]
12+
13+ env :
14+ TEST_TAG : pico_test_sdk
15+
16+ jobs :
17+ sdk_container :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v3
22+ - name : Build SDK
23+ uses : docker/build-push-action@v4
24+ with :
25+ context : .
26+ load : true
27+ tags : ${{ env.TEST_TAG }}
28+ - name : Test SDK
29+ run : bash ./test_sdk.sh ${{ env.TEST_TAG }}
30+ - name : Log into Docker Hub
31+ uses : docker/login-action@v2
32+ with :
33+ username : ${{ github.actor }}
34+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
35+ - name : Extract SDK metadata
36+ id : meta
37+ uses : docker/metadata-action@v4
38+ with :
39+ images : lukstep/raspberry-pi-pico-sdk
40+ - name : Push SDK image
41+ if : github.event_name == 'release' && github.event.action == 'published'
42+ uses : docker/build-push-action@v4
43+ with :
44+ context : .
45+ push : true
46+ tags : ${{ steps.meta.outputs.tags }}
47+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ [ ![ Raspberry PI Pico Docker SDK CI] ( https://github.com/lukstep/raspberry-pi-pico-docker-sdk/actions/workflows/sdk-ci.yml/badge.svg?branch=main )] ( https://github.com/lukstep/raspberry-pi-pico-docker-sdk/actions/workflows/sdk-ci.yml )
2+
13# Raspberry Pi Pico Docker SDK
24
35Lightweight Raspberry Pi Pico C++ SDK container.
Original file line number Diff line number Diff line change 1- docker build . --tag lukstep/raspberry-pi-pico-sdk:latest
2- docker run -d -it --name pico-sdk --mount type=bind,source=${PWD} /test_poject,target=/home/dev lukstep/raspberry-pi-pico-sdk:latest
1+ if [[ -z $1 ]]; then
2+ echo " Please provide an SDK image you want to test"
3+ fi
4+
5+ docker run -d -it --name pico-sdk --mount type=bind,source=${PWD} /test_poject,target=/home/dev $1
36docker exec pico-sdk /bin/sh -c " cd /home/dev && mkdir build && cd build && cmake .. && make -j4"
47docker exec pico-sdk /bin/sh -c " picotool"
58docker container kill pico-sdk
You can’t perform that action at this time.
0 commit comments