From 84f4b563568c1d83426dbda3219aeb4999d96bbd Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Tue, 23 Sep 2025 15:19:49 +0300 Subject: [PATCH 01/10] feat: testing ci unification --- .github/workflows/ci.yml | 300 +++++++++++++++++-------------- .github/workflows/ci_windows.yml | 56 ------ 2 files changed, 164 insertions(+), 192 deletions(-) delete mode 100644 .github/workflows/ci_windows.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9eb43b58d..2ce42230c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ -# This workflow will build a Java project with Maven +# This workflow will build a Java project with Maven and run tests on Linux & Windows # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Java CI with Maven +name: Java CI with Maven on: push: @@ -10,142 +10,170 @@ on: branches: [ master ] jobs: - build: - - runs-on: - - self-hosted - - eclipse - - BrnoUBU0004 - - steps: - - uses: actions/checkout@v2 - - - name: Clone IDF Release From Github - uses: actions/checkout@v2 - with: - repository: espressif/esp-idf - path: dependencies/idf-tools - submodules: 'true' - ref: release/v5.4 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - - name: Set up Maven - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.9.6 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - name: Build with Maven - run: export NO_AT_BRIDGE=1 && mvn clean verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace=/opt/actions-runner/_work/workspace - - - name: Publish Test Reports - if: ${{ always() }} - uses: phoenix-actions/test-reporting@v12 - with: - name: Linux Test Reports - path: - tests/*/*/*/TEST-*.xml - reporter: java-junit - build_macos: runs-on: macos-latest + outputs: + version: ${{ steps.extract_version.outputs.VERSION }} steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - name: Build with Maven - run: mvn clean verify -Djarsigner.skip=true - - - name: Extract version number - id: extract_version - run: | - # List all files and extract the version number from the file names - version=$(ls releng/com.espressif.idf.product/target/products/Espressif-IDE-*.tar.gz | sed -E 's/.*Espressif-IDE-([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/' | head -n 1) - echo "VERSION=${version}" >> $GITHUB_ENV - - - name: Upload build artifacts - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: com.espressif.idf.update-${{ env.VERSION }} - path: releng/com.espressif.idf.update/target/repository - - - name: Upload Windows x86_64 artifact - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-win32 - path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-win32.win32.x86_64.zip - - - name: Upload Linux x86_64 artifact - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64 - path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64.tar.gz - - - name: Upload Linux ARM64 artifact - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64 - path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64.tar.gz - - - name: Codesign Espressif-IDE - env: - MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} - MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - run: | - echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 - /usr/bin/security create-keychain -p espressif build.keychain - /usr/bin/security default-keychain -s build.keychain - /usr/bin/security unlock-keychain -p espressif build.keychain - /usr/bin/security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign - /usr/bin/security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k espressif build.keychain + - uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Build with Maven + run: mvn clean verify -Djarsigner.skip=true + + - name: Extract version number + id: extract_version + run: | + version=$(ls releng/com.espressif.idf.product/target/products/Espressif-IDE-*.tar.gz | sed -E 's/.*Espressif-IDE-([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/' | head -n 1) + echo "VERSION=$version" >> $GITHUB_ENV + echo "VERSION=$version" >> $GITHUB_OUTPUT + + - name: Upload build artifacts (update site) + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: com.espressif.idf.update-${{ env.VERSION }} + path: releng/com.espressif.idf.update/target/repository + + - name: Upload Windows x86_64 artifact + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-win32 + path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-win32.win32.x86_64.zip + + - name: Upload Linux x86_64 artifact + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64 + path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64.tar.gz + + - name: Upload Linux ARM64 artifact + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64 + path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64.tar.gz + + - name: Codesign Espressif-IDE + env: + MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} + MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + run: | + echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 + /usr/bin/security create-keychain -p espressif build.keychain + /usr/bin/security default-keychain -s build.keychain + /usr/bin/security unlock-keychain -p espressif build.keychain + /usr/bin/security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign + /usr/bin/security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k espressif build.keychain + + echo "codesigning espressif-ide-macosx.cocoa.x86_64" + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app + + echo "codesigning espressif-ide-macosx.cocoa.aarch64" + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app + + echo "Creating dmg for espressif-ide-macosx.cocoa.x86_64" + $PWD/releng/ide-dmg-builder/ide-dmg-builder.sh + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg - echo "codesigning espressif-ide-macosx.cocoa.x86_64" - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app - - echo "codesigning espressif-ide-macosx.cocoa.aarch64" - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app - - echo "Creating dmg for espressif-ide-macosx.cocoa.x86_64" - $PWD/releng/ide-dmg-builder/ide-dmg-builder.sh - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg - - echo "Creating dmg for espressif-ide-macosx.cocoa.aarch64" - $PWD/releng/ide-dmg-builder/ide-dmg-builder-aarch64.sh - /usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg - - - name: Upload espressif-ide-macosx.cocoa.x86_64 dmg - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.x86_64 - path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg - - - name: Upload espressif-ide-macosx.cocoa.aarch64 dmg - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.aarch64 - path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg + echo "Creating dmg for espressif-ide-macosx.cocoa.aarch64" + $PWD/releng/ide-dmg-builder/ide-dmg-builder-aarch64.sh + /usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg + + - name: Upload espressif-ide-macosx.cocoa.x86_64 dmg + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.x86_64 + path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg + + - name: Upload espressif-ide-macosx.cocoa.aarch64 dmg + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.aarch64 + path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg + + test_linux: + needs: build_macos + runs-on: [self-hosted, eclipse, BrnoUBU0004] + steps: + - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: Espressif-IDE-${{ needs.build_macos.outputs.version }}-linux.gtk.x86_64 + path: /opt/actions-runner/_work/workspace + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Set up Maven + uses: stCarolas/setup-maven@v5 + with: + maven-version: 3.9.6 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Run Tests + run: export NO_AT_BRIDGE=1 && mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace=/opt/actions-runner/_work/workspace + + - name: Publish Test Reports + if: ${{ always() }} + uses: phoenix-actions/test-reporting@v12 + with: + name: Linux Test Reports + path: tests/*/*/*/TEST-*.xml + reporter: java-junit + + test_windows: + needs: build_macos + runs-on: [self-hosted, eclipseUpd, BrnoWIN0007] + steps: + - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: Espressif-IDE-${{ needs.build_macos.outputs.version }}-win32 + path: C:/actions-runner/_work/workspace + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Set up Maven + uses: stCarolas/setup-maven@v5 + with: + maven-version: 3.9.6 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Run Tests + run: mvn verify "-Djarsigner.skip=true" "-DskipTests=false" "-DtestWorkspace=C:/actions-runner/_work/workspace" + + - name: Publish Test Reports + if: ${{ always() }} + uses: phoenix-actions/test-reporting@v12 + with: + name: Windows Test Reports + path: tests/*/*/*/TEST-*.xml + reporter: java-junit \ No newline at end of file diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml deleted file mode 100644 index f17702167..000000000 --- a/.github/workflows/ci_windows.yml +++ /dev/null @@ -1,56 +0,0 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Java CI with Maven on Windows - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build_windows: - - runs-on: - - eclipseUpd - - BrnoWIN0007 - - steps: - - uses: actions/checkout@v4 - - - name: Clone IDF Release From Github - uses: actions/checkout@v4 - with: - repository: espressif/esp-idf - path: dependencies/idf-tools - submodules: 'true' - ref: release/v5.1 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: Set up Maven - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.9.6 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - name: Build with Maven - run: mvn clean verify "-Djarsigner.skip=true" "-DskipTests=false" "-DtestWorkspace=C:/actions-runner/_work/workspace" - - - name: Publish Test Reports - if: ${{ always() }} - uses: phoenix-actions/test-reporting@v12 - with: - name: Windows Test Reports - path: - tests/*/*/*/TEST-*.xml - reporter: java-junit From 405b2a40ab5ad3e89856fa2f0375b9cbc518569b Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 14:18:55 +0300 Subject: [PATCH 02/10] feat: providing a strategy matrix to avoid repetition --- .github/workflows/ci.yml | 146 +++++++++++---------------------------- 1 file changed, 39 insertions(+), 107 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ce42230c..9fde009cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,3 @@ -# This workflow will build a Java project with Maven and run tests on Linux & Windows -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - name: Java CI with Maven on: @@ -10,7 +7,7 @@ on: branches: [ master ] jobs: - build_macos: + build_and_publish_macos: runs-on: macos-latest outputs: version: ${{ steps.extract_version.outputs.VERSION }} @@ -34,35 +31,21 @@ jobs: echo "VERSION=$version" >> $GITHUB_ENV echo "VERSION=$version" >> $GITHUB_OUTPUT - - name: Upload build artifacts (update site) - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: com.espressif.idf.update-${{ env.VERSION }} - path: releng/com.espressif.idf.update/target/repository - - - name: Upload Windows x86_64 artifact - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-win32 - path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-win32.win32.x86_64.zip - - - name: Upload Linux x86_64 artifact - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64 - path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64.tar.gz - - - name: Upload Linux ARM64 artifact + - name: Upload build artifacts if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64 - path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64.tar.gz - - - name: Codesign Espressif-IDE + run: | + for platform in \ + "com.espressif.idf.update-${VERSION}:releng/com.espressif.idf.update/target/repository" \ + "Espressif-IDE-${VERSION}-win32:releng/com.espressif.idf.product/target/products/Espressif-IDE-${VERSION}-win32.win32.x86_64.zip" \ + "Espressif-IDE-${VERSION}-linux.gtk.x86_64:releng/com.espressif.idf.product/target/products/Espressif-IDE-${VERSION}-linux.gtk.x86_64.tar.gz" \ + "Espressif-IDE-${VERSION}-linux.gtk.aarch64:releng/com.espressif.idf.product/target/products/Espressif-IDE-${VERSION}-linux.gtk.aarch64.tar.gz"; do + name=${platform%%:*} + path=${platform##*:} + echo "Uploading $name" + gh actions upload-artifact --name "$name" --path "$path" + done + + - name: Codesign and create DMGs (macOS) env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} @@ -73,94 +56,41 @@ jobs: /usr/bin/security unlock-keychain -p espressif build.keychain /usr/bin/security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign /usr/bin/security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k espressif build.keychain - - echo "codesigning espressif-ide-macosx.cocoa.x86_64" - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app - - echo "codesigning espressif-ide-macosx.cocoa.aarch64" - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app - - echo "Creating dmg for espressif-ide-macosx.cocoa.x86_64" - $PWD/releng/ide-dmg-builder/ide-dmg-builder.sh - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg - - echo "Creating dmg for espressif-ide-macosx.cocoa.aarch64" - $PWD/releng/ide-dmg-builder/ide-dmg-builder-aarch64.sh - /usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg - - - name: Upload espressif-ide-macosx.cocoa.x86_64 dmg - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.x86_64 - path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg - - name: Upload espressif-ide-macosx.cocoa.aarch64 dmg - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.aarch64 - path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg + for arch in x86_64 aarch64; do + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement \ + --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" \ + $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/$arch/Espressif-IDE.app -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/$arch/Espressif-IDE.app - test_linux: - needs: build_macos - runs-on: [self-hosted, eclipse, BrnoUBU0004] - steps: - - uses: actions/checkout@v4 - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: Espressif-IDE-${{ needs.build_macos.outputs.version }}-linux.gtk.x86_64 - path: /opt/actions-runner/_work/workspace + $PWD/releng/ide-dmg-builder/ide-dmg-builder${arch == "aarch64" && "-aarch64" || ""}.sh + /usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" \ + $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-$arch.dmg -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-$arch.dmg - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Set up Maven - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.9.6 - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - name: Run Tests - run: export NO_AT_BRIDGE=1 && mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace=/opt/actions-runner/_work/workspace + gh actions upload-artifact --name Espressif-IDE-${VERSION}-macosx.cocoa-$arch --path $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-$arch.dmg + done - - name: Publish Test Reports - if: ${{ always() }} - uses: phoenix-actions/test-reporting@v12 - with: - name: Linux Test Reports - path: tests/*/*/*/TEST-*.xml - reporter: java-junit + build_and_test: + strategy: + matrix: + os: [linux, windows] + fail-fast: false + runs-on: ${{ matrix.os == 'linux' && 'self-hosted, eclipse, BrnoUBU0004' || 'self-hosted, eclipseUpd, BrnoWIN0007' }} - test_windows: - needs: build_macos - runs-on: [self-hosted, eclipseUpd, BrnoWIN0007] steps: - uses: actions/checkout@v4 - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: Espressif-IDE-${{ needs.build_macos.outputs.version }}-win32 - path: C:/actions-runner/_work/workspace - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.11' + - name: Set up Maven uses: stCarolas/setup-maven@v5 with: maven-version: 3.9.6 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -168,12 +98,14 @@ jobs: distribution: 'temurin' - name: Run Tests - run: mvn verify "-Djarsigner.skip=true" "-DskipTests=false" "-DtestWorkspace=C:/actions-runner/_work/workspace" + run: | + export NO_AT_BRIDGE=1 + mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace=${{ matrix.os == 'linux' && '/opt/actions-runner/_work/workspace' || 'C:/actions-runner/_work/workspace' }} - name: Publish Test Reports if: ${{ always() }} uses: phoenix-actions/test-reporting@v12 with: - name: Windows Test Reports + name: ${{ matrix.os == 'linux' && 'Linux Test Reports' || 'Windows Test Reports' }} path: tests/*/*/*/TEST-*.xml - reporter: java-junit \ No newline at end of file + reporter: java-junit From ab6188111affe27deb62833fd84f60d5cab14231 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 15:30:18 +0300 Subject: [PATCH 03/10] fix: fixing ci yaml and formatting --- .github/workflows/ci.yml | 82 ++++++++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fde009cf..cc007bb15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,21 +31,35 @@ jobs: echo "VERSION=$version" >> $GITHUB_ENV echo "VERSION=$version" >> $GITHUB_OUTPUT - - name: Upload build artifacts + - name: Upload build artifacts (update site) if: ${{ !cancelled() }} - run: | - for platform in \ - "com.espressif.idf.update-${VERSION}:releng/com.espressif.idf.update/target/repository" \ - "Espressif-IDE-${VERSION}-win32:releng/com.espressif.idf.product/target/products/Espressif-IDE-${VERSION}-win32.win32.x86_64.zip" \ - "Espressif-IDE-${VERSION}-linux.gtk.x86_64:releng/com.espressif.idf.product/target/products/Espressif-IDE-${VERSION}-linux.gtk.x86_64.tar.gz" \ - "Espressif-IDE-${VERSION}-linux.gtk.aarch64:releng/com.espressif.idf.product/target/products/Espressif-IDE-${VERSION}-linux.gtk.aarch64.tar.gz"; do - name=${platform%%:*} - path=${platform##*:} - echo "Uploading $name" - gh actions upload-artifact --name "$name" --path "$path" - done - - - name: Codesign and create DMGs (macOS) + uses: actions/upload-artifact@v4 + with: + name: com.espressif.idf.update-${{ env.VERSION }} + path: releng/com.espressif.idf.update/target/repository + + - name: Upload Windows x86_64 artifact + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-win32 + path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-win32.win32.x86_64.zip + + - name: Upload Linux x86_64 artifact + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64 + path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.x86_64.tar.gz + + - name: Upload Linux ARM64 artifact + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64 + path: releng/com.espressif.idf.product/target/products/Espressif-IDE-${{ env.VERSION }}-linux.gtk.aarch64.tar.gz + + - name: Codesign Espressif-IDE env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} @@ -57,19 +71,37 @@ jobs: /usr/bin/security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign /usr/bin/security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k espressif build.keychain - for arch in x86_64 aarch64; do - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement \ - --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" \ - $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/$arch/Espressif-IDE.app -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/$arch/Espressif-IDE.app + echo "codesigning espressif-ide-macosx.cocoa.x86_64" + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app + + echo "codesigning espressif-ide-macosx.cocoa.aarch64" + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app - $PWD/releng/ide-dmg-builder/ide-dmg-builder${arch == "aarch64" && "-aarch64" || ""}.sh - /usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" \ - $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-$arch.dmg -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-$arch.dmg + echo "Creating dmg for espressif-ide-macosx.cocoa.x86_64" + $PWD/releng/ide-dmg-builder/ide-dmg-builder.sh + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg - gh actions upload-artifact --name Espressif-IDE-${VERSION}-macosx.cocoa-$arch --path $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-$arch.dmg - done + echo "Creating dmg for espressif-ide-macosx.cocoa.aarch64" + $PWD/releng/ide-dmg-builder/ide-dmg-builder-aarch64.sh + /usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg + + - name: Upload espressif-ide-macosx.cocoa.x86_64 dmg + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.x86_64 + path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg + + - name: Upload espressif-ide-macosx.cocoa.aarch64 dmg + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: Espressif-IDE-${{ env.VERSION }}-macosx.cocoa.aarch64 + path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg build_and_test: strategy: From efe99776dde52263cf9ff3c0d6cf6e70800225cc Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 17:38:02 +0300 Subject: [PATCH 04/10] feat: Refactor CI matrix for custom runner and test config --- .github/workflows/ci.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc007bb15..f8fb86900 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,11 +104,20 @@ jobs: path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg build_and_test: - strategy: - matrix: - os: [linux, windows] - fail-fast: false - runs-on: ${{ matrix.os == 'linux' && 'self-hosted, eclipse, BrnoUBU0004' || 'self-hosted, eclipseUpd, BrnoWIN0007' }} + strategy: + matrix: + include: + - os: linux + runner: [self-hosted, eclipse, BrnoUBU0004] + testWorkspace: /opt/actions-runner/_work/workspace + reportName: Linux Test Reports + - os: windows + runner: [self-hosted, eclipseUpd, BrnoWIN0007] + testWorkspace: C:/actions-runner/_work/workspace + reportName: Windows Test Reports + fail-fast: false + + runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4 @@ -132,12 +141,12 @@ jobs: - name: Run Tests run: | export NO_AT_BRIDGE=1 - mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace=${{ matrix.os == 'linux' && '/opt/actions-runner/_work/workspace' || 'C:/actions-runner/_work/workspace' }} + mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace="${{ matrix.testWorkspace }}" - name: Publish Test Reports if: ${{ always() }} uses: phoenix-actions/test-reporting@v12 with: - name: ${{ matrix.os == 'linux' && 'Linux Test Reports' || 'Windows Test Reports' }} + name: ${{ matrix.reportName }} path: tests/*/*/*/TEST-*.xml reporter: java-junit From 9f21fec31764f252acedfbaf97cb9d013f46f7d7 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 17:43:59 +0300 Subject: [PATCH 05/10] fix: removing tabs that breaks yml file --- .github/workflows/ci.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8fb86900..1f0c9bbf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,20 +104,20 @@ jobs: path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg build_and_test: - strategy: - matrix: - include: - - os: linux - runner: [self-hosted, eclipse, BrnoUBU0004] - testWorkspace: /opt/actions-runner/_work/workspace - reportName: Linux Test Reports - - os: windows - runner: [self-hosted, eclipseUpd, BrnoWIN0007] - testWorkspace: C:/actions-runner/_work/workspace - reportName: Windows Test Reports - fail-fast: false - - runs-on: ${{ matrix.runner }} + strategy: + matrix: + include: + - os: linux + runner: [self-hosted, eclipse, BrnoUBU0004] + testWorkspace: /opt/actions-runner/_work/workspace + reportName: Linux Test Reports + - os: windows + runner: [self-hosted, eclipseUpd, BrnoWIN0007] + testWorkspace: C:/actions-runner/_work/workspace + reportName: Windows Test Reports + fail-fast: false + + runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4 @@ -140,8 +140,10 @@ jobs: - name: Run Tests run: | - export NO_AT_BRIDGE=1 - mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace="${{ matrix.testWorkspace }}" + if [ "${{ matrix.os }}" = "linux" ]; then + export NO_AT_BRIDGE=1 + fi + mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace="${{ matrix.testWorkspace }}" - name: Publish Test Reports if: ${{ always() }} From 0961eca1a30bf50d41fecb12220133e1370401f2 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 18:35:03 +0300 Subject: [PATCH 06/10] fix: replace bash if condition --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f0c9bbf1..6dd508ab4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,12 +138,11 @@ jobs: java-version: '21' distribution: 'temurin' - - name: Run Tests - run: | - if [ "${{ matrix.os }}" = "linux" ]; then - export NO_AT_BRIDGE=1 - fi - mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace="${{ matrix.testWorkspace }}" + - name: Set NO_AT_BRIDGE + if: runner.os == 'linux' + run: export NO_AT_BRIDGE=1 + - name: Run Maven + run: mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace="${{ matrix.testWorkspace }}" - name: Publish Test Reports if: ${{ always() }} From b5af54426c9ace799ba0583edab46af46929392a Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 18:42:27 +0300 Subject: [PATCH 07/10] fix: fixing run maven line for windows --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6dd508ab4..00d6b311b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,7 +142,7 @@ jobs: if: runner.os == 'linux' run: export NO_AT_BRIDGE=1 - name: Run Maven - run: mvn verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace="${{ matrix.testWorkspace }}" + run: mvn verify "-Djarsigner.skip=true" "-DskipTests=false" "-DtestWorkspace=${{ matrix.testWorkspace }}" - name: Publish Test Reports if: ${{ always() }} From 884baca055e02c2296395cb2b4682647a165bf5a Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 21:29:44 +0300 Subject: [PATCH 08/10] fix: adding clone dependency --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00d6b311b..064975eb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,6 +122,14 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Clone IDF Release From Github + uses: actions/checkout@v4 + with: + repository: espressif/esp-idf + path: dependencies/idf-tools + submodules: 'true' + ref: release/v5.4 + - name: Set up Python uses: actions/setup-python@v4 with: From 03f73b386517f49f2358959343255ba1051d15df Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 21:31:52 +0300 Subject: [PATCH 09/10] fix: removing the auto tab --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 064975eb3..91ef63969 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,7 +129,7 @@ jobs: path: dependencies/idf-tools submodules: 'true' ref: release/v5.4 - + - name: Set up Python uses: actions/setup-python@v4 with: From 83e77bafba81f784e3c6d7eee2d0e63e2275c12d Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 24 Sep 2025 21:36:45 +0300 Subject: [PATCH 10/10] fix: removing bad indentation --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91ef63969..68bbe1d0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,13 +122,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Clone IDF Release From Github - uses: actions/checkout@v4 - with: - repository: espressif/esp-idf - path: dependencies/idf-tools - submodules: 'true' - ref: release/v5.4 + - name: Clone IDF Release From Github + uses: actions/checkout@v4 + with: + repository: espressif/esp-idf + path: dependencies/idf-tools + submodules: 'true' + ref: release/v5.4 - name: Set up Python uses: actions/setup-python@v4