-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (39 loc) · 1.23 KB
/
test-github-actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test Github Actions
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install RP2040 SDK
run: |
git clone https://github.com/raspberrypi/pico-sdk.git
cd pico-sdk
git submodule update --init
echo "PICO_SDK_PATH=$(pwd)" >> $GITHUB_ENV
- name: Configure CMake
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPICO_PLATFORM=rp2040 -DPICO_SDK_PATH=$PICO_SDK_PATH
- name: Build firmware
run: |
cd build
make
- name: Generate release files
run: |
cd build
arm-none-eabi-objcopy -O ihex Coremark-RP2040.elf Coremark-RP2040.hex
arm-none-eabi-objcopy -O binary Coremark-RP2040.elf Coremark-RP2040.bin
python $PICO_SDK_PATH/tools/uf2conv.py -c Coremark-RP2040.uf2 -o Coremark-RP2040.uf2 Coremark-RP2040.bin