From d98bcb5a6320ca7a61e82f078c0092ce6b745da2 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Tue, 29 Oct 2024 00:26:00 +0100 Subject: [PATCH] Add GitHub Actions workflow for CI (#94) * Add GitHub Actions workflow for firmware build process * Fix GitHub Actions workflow to correctly reference YAML files * Add step to move generated files to output directory in build workflow * Add consolidation step in build workflow and update project name in YAML * Update artifact download name in build workflow to include project matrix * Refactor GitHub Actions workflow to streamline firmware build and consolidation steps * Remove unnecessary environment variable for release URL in build workflow * Remove old build workflow and add new CI workflow for firmware builds * Add scheduled CI trigger and update YAML file path in workflow * Update CI workflow job names for clarity in firmware builds * Rename project in YAML configuration from "onju-voice-microwakeword" to "onju-voice" --- .github/workflows/ci.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..02eba12 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,37 @@ +--- +name: CI + +on: + pull_request: + # Every Monday at 4:00 UTC + schedule: + - cron: "0 4 * * 1" + +concurrency: + # yamllint disable-line rule:line-length + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + ci: + name: ${{ matrix.file }} / ${{ matrix.esphome-version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + max-parallel: 3 + matrix: + file: + - onju-voice + - onju-voice-microwakeword + esphome-version: + - latest + - beta + - dev + steps: + - name: ⤵️ Check out code from GitHub + uses: actions/checkout@v4.2.2 + - name: 🔨 Build firmware - ${{ matrix.esphome-version }} + uses: esphome/build-action@v4.0.1 + with: + yaml-file: esphome/${{ matrix.file }}.yaml + version: ${{ matrix.esphome-version }}