docs: record clean RP2040 build size #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| host: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: app | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: rustscript-lang/rustscript | |
| ref: feat/no-std-runtime | |
| path: rustscript | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| working-directory: app | |
| - name: Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| working-directory: app | |
| - name: Test | |
| run: cargo test --all-targets | |
| working-directory: app | |
| - name: Examples smoke | |
| run: | | |
| cargo run --example run_file -- programs/blinky.rss | grep 'led:off' | |
| printf 'print(1 + 2);\n.quit\n' | cargo run --example repl | grep '3' | |
| working-directory: app | |
| rp2040: | |
| name: RP2040 PlatformIO Arduino firmware | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: app | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: rustscript-lang/rustscript | |
| ref: feat/no-std-runtime | |
| path: rustscript | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv6m-none-eabi | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install PlatformIO | |
| run: python -m pip install platformio==6.1.19 | |
| - name: Build Rust static library | |
| run: cargo build --release --target thumbv6m-none-eabi --no-default-features --features rp2040 | |
| working-directory: app | |
| - name: Build Arduino-Pico firmware | |
| run: pio run -d platformio/rp2040 | |
| working-directory: app | |
| - name: Verify firmware artifacts | |
| run: | | |
| test -s platformio/rp2040/.pio/build/pico/firmware.elf | |
| test -s platformio/rp2040/.pio/build/pico/firmware.uf2 | |
| nm -C platformio/rp2040/.pio/build/pico/firmware.elf | grep rustscript_run_vmbc | |
| stat --format='%n %s bytes' \ | |
| platformio/rp2040/.pio/build/pico/firmware.elf \ | |
| platformio/rp2040/.pio/build/pico/firmware.uf2 \ | |
| platformio/rp2040/generated/blinky.vmbc | |
| working-directory: app | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rustscript-rp2040-pico | |
| path: | | |
| app/platformio/rp2040/.pio/build/pico/firmware.elf | |
| app/platformio/rp2040/.pio/build/pico/firmware.uf2 |