Fix c example readme #73
Workflow file for this run
This file contains 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: Martos ci workflow | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build --lib | |
run: cargo build --verbose | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run tests | |
run: cargo test --verbose | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fmt | |
run: cargo fmt --all -- --check | |
xtensa-esp32-rust-example: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# TODO: to avoid setupping, ci should pass on prepared dockers on self-hosted runners | |
- name: Setup build environment | |
run: cargo install espup && espup install | |
- name: Build | |
run: cd ./examples/rust-examples/xtensa-esp32 && . $HOME/export-esp.sh && cargo build | |
- name: Fmt | |
run: cd ./examples/rust-examples/xtensa-esp32 && cargo fmt --all -- --check | |
xtensa-esp32-static-library: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# TODO: to avoid setupping, ci should pass on prepared dockers on self-hosted runners | |
- name: Setup build environment | |
run: cargo install espup && espup install | |
- name: Build | |
run: cd ./c-library/xtensa-esp32 && . $HOME/export-esp.sh && cargo build | |
- name: Fmt | |
run: cd ./c-library/xtensa-esp32 && cargo fmt --all -- --check | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xtensa-esp32-static-library | |
path: c-library/xtensa-esp32/target/xtensa-esp32-none-elf/debug/libxtensa_esp32_static_lib.a | |
retention-days: 7 | |
xtensa-esp32-c-example: | |
needs: xtensa-esp32-static-library | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# TODO: to avoid setupping, ci should pass on prepared dockers on self-hosted runners | |
- name: Setup build environment | |
run: sudo apt-get install -y git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 && mkdir -p ~/esp && cd ~/esp && git clone -b v5.2 --recursive https://github.com/espressif/esp-idf.git && cd ~/esp/esp-idf && ./install.sh esp32 | |
- name: Download static library | |
uses: actions/download-artifact@v4 | |
with: | |
name: xtensa-esp32-static-library | |
path: c-library/xtensa-esp32/target/xtensa-esp32-none-elf/debug | |
- name: Build | |
run: cd ./examples/c-examples/xtensa-esp32 && . $HOME/esp/esp-idf/export.sh && idf.py build |