mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-06-05 21:04:46 +00:00
06b89233b8
Starting January 30th, 2025, GitHub Actions customers will no longer be able to use v3. It is necessary to update to v4 to make the workflows work. As a consequence duplicated jobs are removed. Signed-off-by: Flavia Caforio <flavia.caforio@amarulasolutions.com>
60 lines
2.3 KiB
YAML
60 lines
2.3 KiB
YAML
name: Build app
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
idf_version:
|
|
required: true
|
|
type: string
|
|
target:
|
|
required: true
|
|
type: string
|
|
app_name:
|
|
type: string
|
|
required: true
|
|
app_path:
|
|
type: string
|
|
required: true
|
|
upload_artifacts:
|
|
type: boolean
|
|
default: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build App
|
|
runs-on: ubuntu-20.04
|
|
container: espressif/idf:${{inputs.idf_version}}
|
|
steps:
|
|
- if: ${{ env.ACT }}
|
|
name: Add node for local tests
|
|
run: |
|
|
curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
|
|
apt-get install -y nodejs
|
|
- name: Checkout esp-mqtt
|
|
uses: actions/checkout@v4
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
with:
|
|
key: ${{inputs.idf_version}}-${{inputs.target}}
|
|
- name: Build ${{ inputs.app_name }} with IDF-${{ inputs.idf_version }}
|
|
shell: bash
|
|
run: |
|
|
${IDF_PATH}/install.sh --enable-pytest
|
|
. ${IDF_PATH}/export.sh
|
|
python -m pip install idf-build-apps
|
|
rm -rf $IDF_PATH/components/mqtt/esp-mqtt
|
|
cp -r . $IDF_PATH/components/mqtt/esp-mqtt
|
|
IDF_CCACHE_ENABLE=1 idf-build-apps build --config-file ci/idf_build_apps.toml -p ${{inputs.app_path}} -t ${{inputs.target}}
|
|
- name: Upload files to artifacts for run-target job
|
|
uses: actions/upload-artifact@v4
|
|
if: ${{inputs.upload_artifacts}}
|
|
with:
|
|
name: mqtt_bin_${{inputs.target}}_${{ inputs.idf_version }}_${{ inputs.app_name }}
|
|
path: |
|
|
build_${{inputs.target}}_${{inputs.app_name}}/bootloader/bootloader.bin
|
|
build_${{inputs.target}}_${{inputs.app_name}}/partition_table/partition-table.bin
|
|
build_${{inputs.target}}_${{inputs.app_name}}/*.bin
|
|
build_${{inputs.target}}_${{inputs.app_name}}/*.elf
|
|
build_${{inputs.target}}_${{inputs.app_name}}/flasher_args.json
|
|
if-no-files-found: error
|