Skip to content

Add wipe state function and associated request handler #35

Add wipe state function and associated request handler

Add wipe state function and associated request handler #35

Workflow file for this run

# This is the name of the workflow, visible on GitHub UI.
name: build
# Here we tell GitHub to run the workflow when a commit
# is pushed or a Pull Request is opened.
on: [push, pull_request]
# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
# This is the name of the job - can be whatever.
test-matrix:
# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
strategy:
matrix:
# The matrix will produce one job for each configuration
# parameter of type `arduino-platform`, in this case a
# total of 2.
arduino-platform: ["rp2040:rp2040"]
# This is usually optional but we need to statically define the
# FQBN of the boards we want to test for each platform. In the
# future the CLI might automatically detect and download the core
# needed to compile against a certain FQBN, at that point the
# following `include` section will be useless.
include:
# This works like this: when the platform is "arduino:samd", the
# variable `fqbn` is set to "arduino:samd:nano_33_iot".
- arduino-platform: "rp2040:rp2040"
fqbn: "rp2040:rp2040:rpipicow:flash=2097152_1048576"
buildpath: "rp2040.rp2040.rpipicow"
# This is the platform GitHub will use to run our workflow, we
# pick Windows for no particular reason.
runs-on: ubuntu-latest
# This is the list of steps this job will run.
steps:
# First of all, we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@v3
# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1
- name: Cache arduino platform
id: arduino-platform-cache
uses: actions/cache@v3
with:
path: ~/.arduino15/packages
key: arduino-platform
- name: Cache arduino libraries
id: arduino-library-cache
uses: actions/cache@v3
with:
path: ~/Arduino/libraries
key: arduino-libraries
# We then install the platform, which one will be determined
# dynamically by the build matrix.
- name: Install platform
if: steps.arduino-platform-cache.outputs.cache-hit != 'true'
run: |
arduino-cli --config-file arduino-cli.yml core update-index
arduino-cli --config-file arduino-cli.yml core install ${{ matrix.arduino-platform }}
- name: Install libraries
if: steps.arduino-library-cache.outputs.cache-hit != 'true'
run: |
arduino-cli --config-file arduino-cli.yml lib install --git-url https://github.com/boschsensortec/Bosch-BSEC2-Library.git#v1.4.2200
arduino-cli --config-file arduino-cli.yml lib install "Adafruit BusIO" "Adafruit GFX Library" "Adafruit SSD1306" "BME68x Sensor library"
- name: copy example secrets header
run: |
cp secrets.example.h secrets.h
# Finally, we compile the sketch, using the FQBN that was set
# in the build matrix.
- name: Compile Sketch
run: arduino-cli --config-file arduino-cli.yml compile --fqbn ${{ matrix.fqbn }} --build-properties build.project_name=arduino-bsec-wifi.${{matrix.buildpath}} -e
- name: Upload the artifact
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.buildpath }}
path: build/${{ matrix.buildpath }}/