API V2: Bolder Experiments #129
Workflow file for this run
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: Generate new Arduino Protocol Buffer wrapper files and upload them as artifacts | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13.2" | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v1 | |
| with: | |
| version: "3.13.0" | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip3 install scons protobuf==5.29.4 grpcio-tools | |
| - name: Self Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: protobuf-checkout | |
| submodules: true | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name adafruitio | |
| git config --global user.email [email protected] | |
| - name: Generate Arduino files from .proto Files | |
| env: | |
| PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python | |
| run: | | |
| cd protobuf-checkout/ | |
| mkdir ./arduino_out | |
| protoc --plugin=nanopb/generator/protoc-gen-nanopb --proto_path=./proto/wippersnapper --proto_path=nanopb/generator/proto ./proto/wippersnapper/*.proto --nanopb_out=./arduino_out --nanopb_opt=-I./proto/wippersnapper --nanopb_opt=-v | |
| # Local (non-CI) build command is commented out below, use this to compile on your machine: | |
| # protoc --plugin=nanopb/generator/protoc-gen-nanopb --proto_path=./proto/wippersnapper --proto_path=nanopb/generator/proto ./proto/wippersnapper/*.proto --nanopb_out=./arduino_out --nanopb_opt=-I./proto/wippersnapper --nanopb_opt=-t | |
| - name: Checkout Arduino Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: arduino-repo | |
| - name: Upload Arduino Wrappers Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-arduino-wrappers | |
| path: ./protobuf-checkout/arduino_out |