Skip to content

development

development #3

Workflow file for this run

name: development
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
paths:
- 'src/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
idf_image_tag:
- v5.3
- v4.4.8
env:
DOCKER_PLATFORM: "linux/amd64"
DOCKER_REPOSITORY: ${{github.repository}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
platforms: ${{env.DOCKER_PLATFORM}}
version: latest
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_TOKEN}}
- name: Build
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:src"
cache-from: type=gha
cache-to: type=gha,mode=min
load: true
platforms: ${{env.DOCKER_PLATFORM}}
tags: ${{env.DOCKER_REPOSITORY}}:${{matrix.idf_image_tag}}
build-args: |
IDF_IMAGE_TAG=${{matrix.idf_image_tag}}
SONAR_SCANNER_VERSION=${{vars.SONAR_SCANNER_VERSION}}
- name: Create Test Project
run: |
mkdir ${{github.workspace}}/${{matrix.idf_image_tag}}
docker run --rm -v ${{github.workspace}}/${{matrix.idf_image_tag}}:/project -w /project ${{env.DOCKER_REPOSITORY}}:${{matrix.idf_image_tag}} idf.py create-project-from-example "espressif/esp-now=*:coin_cell_demo/bulb"
- name: Build Test Project
run: docker run --rm -v ${{github.workspace}}/${{matrix.idf_image_tag}}:/project -w /project ${{env.DOCKER_REPOSITORY}}:${{matrix.idf_image_tag}} idf.py build -C ./bulb
sonar:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@v2
with:
args: -Dsonar.organization=${{secrets.SONARCLOUD_ORGANIZATION}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
SONAR_TOKEN: ${{secrets.SONARCLOUD_TOKEN}}