4141 strategy :
4242 matrix :
4343 board : ["pico", "pico_w", "pico2"]
44+ platform : [""]
4445 language : ["cpp"]
46+ jit : ["", "-DAVM_DISABLE_JIT=OFF"]
47+ include :
48+ - board : " pico2"
49+ platform : " -DPICO_PLATFORM=rp2350-riscv"
50+ jit : " "
51+
52+ - board : " pico2"
53+ platform : " -DPICO_PLATFORM=rp2350-riscv"
54+ jit : " -DAVM_DISABLE_JIT=OFF"
4555
4656 steps :
4757 - name : Checkout repo
5767 libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib \
5868 erlang-base erlang-dev erlang-dialyzer erlang-eunit rebar3
5969
70+ - name : Install riscv32 toolchain
71+ if : matrix.platform == '-DPICO_PLATFORM=rp2350-riscv'
72+ run : |
73+ sudo mkdir -p /opt
74+ cd /opt
75+ sudo wget https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.2.0-3/riscv-toolchain-15-x86_64-lin.tar.gz
76+ sudo tar xzf riscv-toolchain-15-x86_64-lin.tar.gz
77+ ls /opt
78+ echo "/opt/riscv-toolchain-15-x86_64-lin/bin" >> $GITHUB_PATH
79+
6080 - name : " Git config safe.directory for codeql"
6181 run : git config --global --add safe.directory /__w/AtomVM/AtomVM
6282
7494 set -euo pipefail
7595 mkdir build
7696 cd build
77- cmake .. -G Ninja -DPICO_BOARD=${{ matrix.board }}
97+ cmake .. -G Ninja -DPICO_BOARD=${{ matrix.board }} ${{ matrix.platform }} ${{ matrix.jit }}
7898 ninja
7999
80100 - name : " Perform CodeQL Analysis"
97117 mkdir build.nosmp
98118 cd build.nosmp
99119 # TODO: fix all warnings and enable -DAVM_WARNINGS_ARE_ERRORS=ON
100- cmake .. -G Ninja -DPICO_BOARD=${{ matrix.board }} -DAVM_DISABLE_SMP=1
120+ cmake .. -G Ninja -DPICO_BOARD=${{ matrix.board }} ${{ matrix.jit }} -DAVM_DISABLE_SMP=1
101121 cmake --build . --target=rp2_tests
102122
103123 - name : Run tests with rp2040js
@@ -112,7 +132,7 @@ jobs:
112132 npx tsx run-tests.ts ../build.nosmp/tests/rp2_tests.uf2 ../build.nosmp/tests/test_erl_sources/rp2_test_modules.uf2
113133
114134 - name : Build atomvmlib.uf2
115- if : startsWith(github.ref, 'refs/tags/') && matrix.board != 'pico_w'
135+ if : startsWith(github.ref, 'refs/tags/') && matrix.board != 'pico_w' && matrix.platform == '' && matrix.jit == ''
116136 shell : bash
117137 run : |
118138 set -euo pipefail
@@ -122,7 +142,7 @@ jobs:
122142 make atomvmlib-${{ matrix.board }}.uf2
123143
124144 - name : Rename AtomVM and write sha256sum
125- if : startsWith(github.ref, 'refs/tags/')
145+ if : startsWith(github.ref, 'refs/tags/') && matrix.platform == '' && matrix.jit == ''
126146 shell : bash
127147 run : |
128148 pushd src/platforms/rp2/build
@@ -137,7 +157,7 @@ jobs:
137157 popd
138158
139159 - name : Rename atomvmlib and write sha256sum
140- if : startsWith(github.ref, 'refs/tags/') && matrix.board != 'pico_w'
160+ if : startsWith(github.ref, 'refs/tags/') && matrix.board != 'pico_w' && matrix.platform == '' && matrix.jit == ''
141161 shell : bash
142162 run : |
143163 pushd build/libs
@@ -148,7 +168,7 @@ jobs:
148168
149169 - name : Release (Pico & Pico2)
150170 uses : softprops/action-gh-release@v1
151- if : startsWith(github.ref, 'refs/tags/') && matrix.board != 'pico_w'
171+ if : startsWith(github.ref, 'refs/tags/') && matrix.board != 'pico_w' && matrix.platform == '' && matrix.jit == ''
152172 with :
153173 draft : true
154174 fail_on_unmatched_files : true
@@ -160,7 +180,7 @@ jobs:
160180
161181 - name : Release (PicoW)
162182 uses : softprops/action-gh-release@v1
163- if : startsWith(github.ref, 'refs/tags/') && matrix.board == 'pico_w'
183+ if : startsWith(github.ref, 'refs/tags/') && matrix.board == 'pico_w' && matrix.platform == '' && matrix.jit == ''
164184 with :
165185 draft : true
166186 fail_on_unmatched_files : true
0 commit comments