Skip to content

Update azure-pipelines.yml for Azure Pipelines sdfs #69

Update azure-pipelines.yml for Azure Pipelines sdfs

Update azure-pipelines.yml for Azure Pipelines sdfs #69

Workflow file for this run

# This is the name of the workflow, visible on GitHub UI.
name: Main build
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:
build-job:
strategy:
matrix:
arduino-board-fqbn:
- esp32:esp32:lolin32
include:
- arduino-boards-fqbn: esp32:esp32:lolin32
platform-url: https://dl.espressif.com/dl/package_esp32_index.json
arduino-platform: "esp32:esp32"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Arduino CLI
uses: arduino/[email protected]
# We then install the platform, which one will be determined
# dynamically by the build matrix.
- name: Install platform
run: |
arduino-cli core --additional-urls ${{ matrix.platform-url }} update-index
arduino-cli core --additional-urls ${{ matrix.platform-url }} install ${{ matrix.arduino-platform }}
arduino-cli lib install u8g2
# apt-get install make g++
# Finally, we compile the sketch, using the FQBN that was set
# in the build matrix.
- name: Compile Sketch
run: |
cp WiFiConfig.h.sample WiFiConfig.h
arduino-cli compile --log-level info --fqbn ${{ matrix.arduino-board-fqbn }} ./alzaergo
- name: Install test dependencies
run: |
sudo apt-get install make g++ cmake lcov
- name: Build tests
run: |
mkdir build && cd build
cmake ../tests
make
cd ..
- name: Run tests
run: build/test-all
- name: Collect Coverage Data
run: |
cd build
lcov --capture --directory . --include '*AlzaET1Ng.cpp' --output-file coverage.info
genhtml coverage.info --output-directory coverage_data
- name: Archive coverage data
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: build/coverage_data