ipc update #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ESP32 Arduino Libs CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
paths: | |
- "**" | |
- "!**.md" | |
- "!.github/workflows/cron_build.yml" | |
- "!.github/workflows/cron.yml" | |
- "!.github/workflows/docker.yml" | |
- "!.github/workflows/repository_dispatch.yml" | |
- "!tools/config_editor/**" | |
- "!tools/docker/**" | |
concurrency: | |
group: esp-idf-libs-${{github.event.pull_request.number || github.ref}} | |
cancel-in-progress: true | |
jobs: | |
build-libs: | |
name: Build Libs for ${{ matrix.target }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: bash ./tools/prepare-ci.sh | |
- name: Build Libs for ${{ matrix.target }} | |
run: bash ./build.sh -e -t ${{ matrix.target }} | |
- name: Upload build | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.target }} | |
path: build | |
- name: Upload archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-${{ matrix.target }} | |
path: dist | |
combine-artifacts: | |
name: Combine artifacts | |
needs: build-libs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
pattern: artifacts-* | |
merge-multiple: true | |
- shell: bash | |
run: | | |
mkdir -p out | |
# 1. Rozpakowujemy wszystkie pliki `arduino-esp32-libs-esp*.tar.gz` do `out` | |
find dist -name 'arduino-esp32-libs-esp*.tar.gz' -exec tar zxvf {} -C out \; | |
# 2. Tworzymy docelowe archiwum esp32-arduino-libs.tar.gz w `dist` | |
cd out/tools/esp32-arduino-libs | |
tar zcf ../../../dist/esp32-arduino-libs.tar.gz * | |
cd ../../.. | |
# 3. Kopiujemy package_esp32_index.template.json do dist | |
cp out/package_esp32_index.template.json dist/package_esp32_index.template.json | |
# --- DODAJEMY NOWY KROK, który rozpakowuje tar.gz i tworzy ZIP z gołą zawartością --- | |
- shell: bash | |
name: Create unpacked ZIP | |
run: | | |
# Rozpakuj do katalogu tymczasowego | |
mkdir -p dist/tmp-libs | |
tar zxf dist/esp32-arduino-libs.tar.gz -C dist/tmp-libs | |
# Stwórz ZIP ze wszystkimi rozpakowanymi plikami | |
cd dist/tmp-libs | |
zip -r ../esp32-arduino-libs-unpacked.zip . | |
cd ../.. | |
- name: Upload full esp32-arduino-libs archive | |
uses: actions/upload-artifact@v4 | |
with: | |
# Oryginalny tar.gz + nowo-utworzony ZIP | |
name: esp32-arduino-libs | |
path: | | |
dist/esp32-arduino-libs.tar.gz | |
dist/esp32-arduino-libs-unpacked.zip | |
- name: Upload package_esp32_index.template.json | |
uses: actions/upload-artifact@v4 | |
with: | |
name: package-esp32-index-json | |
path: dist/package_esp32_index.template.json | |