diff --git a/.github/workflows/allboards.yml b/.github/workflows/allboards.yml deleted file mode 100644 index 49370120339..00000000000 --- a/.github/workflows/allboards.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Boards Test - Remote trigger - -# The workflow will run on remote dispath with event-type set to "test-boards" -on: - repository_dispatch: - types: [test-boards] - -jobs: - find-boards: - runs-on: ubuntu-latest - - outputs: - fqbns: ${{ env.FQBNS }} - board-count: ${{ env.BOARD-COUNT }} - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ github.event.client_payload.branch }} - - - name: Get boards fqbns - run: - bash .github/scripts/find_all_boards.sh - - setup-chunks: - needs: find-boards - runs-on: ubuntu-latest - if: needs.find-boards.outputs.fqbns != '' - - outputs: - test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ github.event.client_payload.branch }} - - - run: npm install - - name: Setup jq - uses: dcarbone/install-jq-action@v1.0.1 - - - id: set-test-chunks - name: Set Chunks - run: - echo "test-chunks<> $GITHUB_OUTPUT - - echo "$( jq -nc '${{ needs.find-boards.outputs.fqbns }} | [_nwise( ${{ needs.find-boards.outputs.board-count }}/15 | ceil)]')" >> $GITHUB_OUTPUT - - echo "EOF" >> $GITHUB_OUTPUT - - test-boards: - needs: setup-chunks - runs-on: ubuntu-latest - - env: - REPOSITORY: | - - source-path: '.' - name: "espressif:esp32" - - strategy: - fail-fast: false - matrix: - chunk: ${{ fromJSON(needs.setup-chunks.outputs['test-chunks']) }} - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ github.event.client_payload.branch }} - - - name: Echo FQBNS to file - run: - echo "$FQBN" > fqbns.json - env: - FQBN: ${{ toJSON(matrix.chunk) }} - - - name: Compile sketch - uses: P-R-O-C-H-Y/compile-sketches@main - with: - platforms: | - ${{ env.REPOSITORY }} - multiple-fqbn: true - multiple-fqbn-path: "fqbns.json" - use-json-file: false - enable-deltas-report: false - enable-warnings-report: false - cli-compile-flags: | - - --warnings="all" - sketch-paths: - "- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino" diff --git a/.github/workflows/boards.yml b/.github/workflows/boards.yml deleted file mode 100644 index 3e189231932..00000000000 --- a/.github/workflows/boards.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Boards Test - -# The workflow will run on schedule and labeled pull requests -on: - pull_request: - -env: - # It's convenient to set variables for values used multiple times in the workflow - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - -jobs: - find-boards: - runs-on: ubuntu-latest - - outputs: - fqbns: ${{ env.FQBNS }} - - steps: - # This step makes the contents of the repository available to the workflow - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Setup jq - uses: dcarbone/install-jq-action@v1.0.1 - - - name: Get board name - run: - bash .github/scripts/find_new_boards.sh ${{ github.repository }} ${{github.event.number}} - - test-boards: - needs: find-boards - runs-on: ubuntu-latest - if: needs.find-boards.outputs.fqbns != '' - - env: - REPOSITORY: | - - source-path: '.' - name: "espressif:esp32" - - strategy: - matrix: ${{ fromJson(needs.find-boards.outputs.fqbns) }} - - steps: - # This step makes the contents of the repository available to the workflow - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Check if build.board is uppercase - run: | - board_name=$(echo ${{ matrix.fqbn }} | awk -F':' '{print $NF}') - if grep -q "^$board_name.build.board=[A-Z0-9_]*$" boards.txt; then - echo "$board_name.build.board is valid."; - else - echo "Error: $board_name.build.board is not uppercase!"; - exit 1; - fi - - - name: Compile sketch - uses: P-R-O-C-H-Y/compile-sketches@main - with: - platforms: | - ${{ env.REPOSITORY }} - fqbn: ${{ matrix.fqbn }} - use-json-file: false - enable-deltas-report: false - enable-warnings-report: false - cli-compile-flags: | - - --warnings="all" - exit-on-fail: true - sketch-paths: - "- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino" diff --git a/.github/workflows/build_py_tools.yml b/.github/workflows/build_py_tools.yml deleted file mode 100644 index 46ecf6da756..00000000000 --- a/.github/workflows/build_py_tools.yml +++ /dev/null @@ -1,141 +0,0 @@ -name: Build Python Tools - -on: - pull_request: - paths: - - 'tools/get.py' - - 'tools/espota.py' - - 'tools/gen_esp32part.py' - - 'tools/gen_insights_package.py' - -jobs: - find-changed-tools: - name: Check if tools have been changed - runs-on: ubuntu-20.04 - outputs: - any_changed: ${{ steps.verify-changed-files.outputs.any_changed }} - all_changed_files: ${{ steps.verify-changed-files.outputs.all_changed_files }} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 2 - ref: ${{ github.event.pull_request.head.ref }} - - name: Verify Python Tools Changed - uses: tj-actions/changed-files@v41 - id: verify-changed-files - with: - fetch_depth: '2' - since_last_remote_commit: 'true' - files: | - tools/get.py - tools/espota.py - tools/gen_esp32part.py - tools/gen_insights_package.py - - name: List all changed files - shell: bash - run: | - for file in ${{ steps.verify-changed-files.outputs.all_changed_files }}; do - echo "$file was changed" - done - - build-pytools-binaries: - name: Build python tools binaries for ${{ matrix.os }} - runs-on: ${{ matrix.os }} - needs: find-changed-tools - if: needs.find-changed-tools.outputs.any_changed == 'true' - strategy: - fail-fast: false - matrix: - os: [windows-latest, macos-latest, ubuntu-20.04, ARM, ARM64] - include: - - os: windows-latest - TARGET: win64 - EXTEN: .exe - SEPARATOR: ';' - - os: macos-latest - TARGET: macos - SEPARATOR: ':' - - os: ubuntu-20.04 - TARGET: linux-amd64 - SEPARATOR: ':' - - os: ARM - CONTAINER: python:3.8-bullseye - TARGET: arm - SEPARATOR: ':' - - os: ARM64 - CONTAINER: python:3.8-bullseye - TARGET: arm64 - SEPARATOR: ':' - container: ${{ matrix.CONTAINER }} # use python container on ARM - env: - DISTPATH: pytools-${{ matrix.TARGET }} - PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi" - steps: - - name: List changed tools - shell: bash - run: | - CHANGED_FILES=() - for file in ${{ needs.find-changed-tools.outputs.all_changed_files }}; do - file="${file#*\/}" - file="${file%\.*}" - CHANGED_FILES+=("$file") - done - CHANGED_FILES="${CHANGED_FILES[@]}" - echo "CHANGED_TOOLS=$CHANGED_FILES" >> "$GITHUB_ENV" - for tool in ${{ env.CHANGED_TOOLS }}; do - echo "tool $tool was changed" - done - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.ref }} - - name: Set up Python 3.8 - # Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108 - if: matrix.os != 'ARM' && matrix.os != 'ARM64' - uses: actions/setup-python@master - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pyinstaller requests - - name: Build with PyInstaller - shell: bash - run: | - for tool in ${{ env.CHANGED_TOOLS }}; do - pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/$tool.py - done - - name: Sign binaries - if: matrix.os == 'windows-latest' - env: - CERTIFICATE: ${{ secrets.CERTIFICATE }} - CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} - shell: pwsh - run: | - $data = Write-Output ${{ env.CHANGED_TOOLS }} - foreach ( $node in $data ) - { - ./.github/pytools/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/$node.exe - } - - name: Test binaries - shell: bash - run: | - for tool in ${{ env.CHANGED_TOOLS }}; do - ./${{ env.DISTPATH }}/$tool${{ matrix.EXTEN }} -h - done - - name: Push binary to tools - if: matrix.os == 'windows-latest' - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - shell: bash - run: | - for tool in ${{ env.CHANGED_TOOLS }}; do - cp -f ./${{ env.DISTPATH }}/$tool.exe tools/$tool.exe - done - bash .github/scripts/upload_py_tools.sh "${{ env.CHANGED_TOOLS }}" - - name: Archive artifact - uses: actions/upload-artifact@master - with: - name: ${{ env.DISTPATH }} - path: ${{ env.DISTPATH }} diff --git a/.github/workflows/dangerjs.yml b/.github/workflows/dangerjs.yml deleted file mode 100644 index 9f7360bc34f..00000000000 --- a/.github/workflows/dangerjs.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: DangerJS Pull Request linter -on: - pull_request_target: - types: [opened, edited, reopened, synchronize] - -permissions: - pull-requests: write - contents: write - -jobs: - pull-request-style-linter: - runs-on: ubuntu-latest - steps: - - name: Check out PR head - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: DangerJS pull request linter - uses: espressif/shared-github-dangerjs@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/docs_build.yml b/.github/workflows/docs_build.yml index 2de8f347265..aebde2257ba 100644 --- a/.github/workflows/docs_build.yml +++ b/.github/workflows/docs_build.yml @@ -7,16 +7,16 @@ on: - release/* paths: - 'docs/**' - - '.github/workflows/docs.yml' + - '.github/workflows/docs_build.yml' pull_request: paths: - 'docs/**' - - '.github/workflows/docs.yml' + - '.github/workflows/docs_build.yml' jobs: - build-docs: - name: Build ESP-Docs + deploy-preview-docs: + name: Deploy Documentation runs-on: ubuntu-22.04 defaults: run: @@ -28,18 +28,26 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.10' - - name: Build + - name: Deploy Preview + env: + # Deploy to preview server + # DOCS_BUILD_DIR: "./docs/_build" + DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }} + DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }} + DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }} + DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }} + DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }} run: | sudo apt update sudo apt install python3-pip python3-setuptools - # GitHub CI installs pip3 and setuptools outside the path. - # Update the path to include them and run. - cd ./docs - PATH=/home/runner/.local/bin:$PATH pip3 install -r requirements.txt --prefer-binary - PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" build-docs -l en - - name: Archive Docs - uses: actions/upload-artifact@v2 - with: - name: docs - path: docs - + source ./docs/utils.sh + add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER + export GIT_VER=$(git describe --always) + echo "PIP install requirements..." + pip3 install --user -r ./docs/requirements.txt + echo "Building the Docs..." + cd ./docs && build-docs -l en + echo "Deploy the Docs..." + export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/ + cd $GITHUB_WORKSPACE/docs + deploy-docs diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml deleted file mode 100644 index 7a1123454ae..00000000000 --- a/.github/workflows/docs_deploy.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Documentation Build and Production Deploy CI - -on: - push: - branches: - - release/* - paths: - - 'docs/**' - - '.github/workflows/docs.yml' - -jobs: - - deploy-prod-docs: - name: Deploy Documentation on Production - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Deploy Documentation - env: - # Deploy to production server - # DOCS_BUILD_DIR: "./docs/_build/" - DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PROD_PRIVATEKEY }} - DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PROD_PATH }} - DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }} - DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_USER }} - DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PROD_URL_BASE }} - # Deploy to preview server - run: | - sudo apt update - sudo apt install python3-pip python3-setuptools - source ./docs/utils.sh - add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER - export GIT_VER=$(git describe --always) - echo "PIP install requirements..." - pip3 install --user -r ./docs/requirements.txt - echo "Building the Docs..." - cd ./docs && build-docs -l en - echo "Deploy the Docs..." - export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/ - cd $GITHUB_WORKSPACE/docs - deploy-docs diff --git a/.github/workflows/docs_preview.yml b/.github/workflows/docs_preview.yml deleted file mode 100644 index 3923839ada0..00000000000 --- a/.github/workflows/docs_preview.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Documentation Build and Preview Deploy CI - -on: - push: - branches: - - master - paths: - - 'docs/**' - - '.github/workflows/docs.yml' - -jobs: - - deploy-preview-docs: - name: Deploy Documentation - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Deploy Preview - env: - # Deploy to preview server - # DOCS_BUILD_DIR: "./docs/_build" - DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }} - DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }} - DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }} - DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }} - DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }} - run: | - sudo apt update - sudo apt install python3-pip python3-setuptools - source ./docs/utils.sh - add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER - export GIT_VER=$(git describe --always) - echo "PIP install requirements..." - pip3 install --user -r ./docs/requirements.txt - echo "Building the Docs..." - cd ./docs && build-docs -l en - echo "Deploy the Docs..." - export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/ - cd $GITHUB_WORKSPACE/docs - deploy-docs diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index cea5e1eac86..00000000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: GitHub Pages CI - -on: - push: - branches: - - master - - pages - paths: - - 'README.md' - - '.github/scripts/on-pages.sh' - - '.github/workflows/gh-pages.yml' - -jobs: - - build-pages: - name: Build GitHub Pages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Copy Files - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bash ./.github/scripts/on-pages.sh diff --git a/.github/workflows/hil.yml b/.github/workflows/hil.yml deleted file mode 100644 index 10c937f1bfe..00000000000 --- a/.github/workflows/hil.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Run tests in hardware - -on: - pull_request: - types: [opened, reopened, synchronize, labeled] - - schedule: - - cron: '0 2 * * *' - -env: - MAX_CHUNKS: 15 - -concurrency: - group: hil-${{github.event.pull_request.number || github.ref}} - cancel-in-progress: true - -jobs: - gen_chunks: - if: | - contains(github.event.pull_request.labels.*.name, 'hil_test') || - (github.event_name == 'schedule' && github.repository == 'espressif/arduino-esp32') - name: Generate Chunks matrix - runs-on: ubuntu-latest - outputs: - chunks: ${{ steps.gen-chunks.outputs.chunks }} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Generate Chunks matrix - id: gen-chunks - run: | - set +e - .github/scripts/sketch_utils.sh count tests - sketches=$? - if [[ $sketches -ge ${{env.MAX_CHUNKS}} ]]; then - $sketches=${{env.MAX_CHUNKS}} - fi - set -e - rm sketches.txt - CHUNKS=$(jq -c -n '$ARGS.positional' --args `seq 0 1 $((sketches - 1))`) - echo "chunks=${CHUNKS}" >>$GITHUB_OUTPUT - - Build: - needs: gen_chunks - name: ${{matrix.chip}}-Build#${{matrix.chunks}} - runs-on: ubuntu-latest - strategy: - matrix: - chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'] - chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - name: Build sketches - run: | - bash .github/scripts/tests_build.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} - - name: Upload ${{matrix.chip}}-${{matrix.chunks}} artifacts - uses: actions/upload-artifact@v3 - with: - name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts - path: | - ~/.arduino/tests/*/build*.tmp/*.bin - ~/.arduino/tests/*/build*.tmp/*.json - if-no-files-found: error - Test: - needs: [gen_chunks, Build] - name: ${{matrix.chip}}-Test#${{matrix.chunks}} - strategy: - fail-fast: false - matrix: - chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'] - chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}} - runs-on: [arduino, "${{matrix.chip}}"] - container: - image: python:3.10.1-bullseye - options: --privileged - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts - uses: actions/download-artifact@v3 - with: - name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts - path: ~/.arduino/tests/ - - - name: Install dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt --extra-index-url https://dl.espressif.com/pypi - apt update && apt install -y -qq jq - - - name: Run Tests - run: | - bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -e - - - name: Upload test result artifacts - uses: actions/upload-artifact@v3 - if: always() - with: - name: test_results-${{matrix.chip}}-${{matrix.chunks}} - path: tests/*/*.xml - - event_file: - name: "Event File" - if: | - contains(github.event.pull_request.labels.*.name, 'hil_test') || - github.event_name == 'schedule' - needs: Test - runs-on: ubuntu-latest - steps: - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: Event File - path: ${{github.event_path}} diff --git a/.github/workflows/lib.json b/.github/workflows/lib.json deleted file mode 100644 index 453267a2d2d..00000000000 --- a/.github/workflows/lib.json +++ /dev/null @@ -1,66 +0,0 @@ -[ - { - "name": "Adafruit NeoPixel", - "exclude_targets": [], - "sketch_path": [ - "~/Arduino/libraries/Adafruit_NeoPixel/examples/strandtest/strandtest.ino" - ] - }, - { - "name": "ArduinoBLE", - "exclude_targets": [ - "esp32s2" - ], - "sketch_path": [ - "~/Arduino/libraries/ArduinoBLE/examples/Central/Scan/Scan.ino" - ] - }, - { - "name": "ESP32Servo", - "exclude_targets": [], - "sketch_path": [ - "~/Arduino/libraries/ESP32Servo/examples/Multiple-Servo-Example-Arduino/Multiple-Servo-Example-Arduino.ino" - ] - }, - { - "source-url": "https://github.com/me-no-dev/ESPAsyncWebServer.git", - "required-libs": [ - {"source-url": "https://github.com/me-no-dev/AsyncTCP.git"} - ], - "exclude_targets": [], - "sketch_path": [ - "~/Arduino/libraries/ESPAsyncWebServer/examples/CaptivePortal/CaptivePortal.ino", - "~/Arduino/libraries/ESPAsyncWebServer/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino", - "~/Arduino/libraries/ESPAsyncWebServer/examples/regex_patterns/regex_patterns.ino", - "~/Arduino/libraries/ESPAsyncWebServer/examples/simple_server/simple_server.ino" - ] - }, - { - "name": "FastLED", - "exclude_targets": [], - "sketch_path": [ - "~/Arduino/libraries/FastLED/examples/Blink/Blink.ino" - ] - }, - { - "name": "IRremote", - "exclude_targets": [], - "sketch_path": [ - "~/Arduino/libraries/IRremote/examples/SendDemo/SendDemo.ino" - ] - }, - { - "name": "MFRC522", - "exclude_targets": [], - "sketch_path": [ - "~/Arduino/libraries/MFRC522/examples/ReadUidMultiReader/ReadUidMultiReader.ino" - ] - }, - { - "name": "WS2812FX", - "exclude_targets": [], - "sketch_path": [ - "~/Arduino/libraries/WS2812FX/examples/ws2812fx_spi/ws2812fx_spi.ino" - ] - } -] \ No newline at end of file diff --git a/.github/workflows/lib.yml b/.github/workflows/lib.yml deleted file mode 100644 index 5e44e705e29..00000000000 --- a/.github/workflows/lib.yml +++ /dev/null @@ -1,135 +0,0 @@ -name: External Libraries Test - -# The workflow will run on schedule and labeled pull requests -on: - pull_request: - types: [opened, reopened, synchronize, labeled] - - # Schedule weekly builds on every Sunday at 4 am - schedule: - - cron: '0 4 * * SUN' - -env: - # It's convenient to set variables for values used multiple times in the workflow - SKETCHES_REPORTS_PATH: libraries-report - SKETCHES_REPORTS_ARTIFACT_NAME: libraries-report - RESULT_LIBRARY_TEST_FILE: LIBRARIES_TEST.md - JSON_LIBRARY_LIST_FILE: .github/workflows/lib.json - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - -jobs: - compile-sketch: - if: | - contains(github.event.pull_request.labels.*.name, 'lib_test') || - (github.event_name == 'schedule' && github.repository == 'espressif/arduino-esp32') - runs-on: ubuntu-latest - - env: - REPOSITORY: | - - source-path: '.' - name: "espressif:esp32" - - strategy: - matrix: - target: - - esp32 - - esp32s2 - - esp32c3 - - esp32s3 - - esp32c6 - - esp32h2 - - include: - - target: esp32 - fqbn: espressif:esp32:esp32 - - target: esp32s2 - fqbn: espressif:esp32:esp32s2 - - target: esp32c3 - fqbn: espressif:esp32:esp32c3 - - target: esp32s3 - fqbn: espressif:esp32:esp32s3 - - target: esp32c6 - fqbn: espressif:esp32:esp32c6 - - target: esp32h2 - fqbn: espressif:esp32:esp32h2 - - - steps: - # This step makes the contents of the repository available to the workflow - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Compile sketch - uses: P-R-O-C-H-Y/compile-sketches@main - with: - platforms: | - ${{ env.REPOSITORY }} - target: ${{ matrix.target }} - fqbn: ${{ matrix.fqbn }} - use-json-file: true - json-path: ${{ env.JSON_LIBRARY_LIST_FILE }} - enable-deltas-report: true - sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - enable-warnings-report: true - cli-compile-flags: | - - --warnings="all" - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} - path: ${{ env.SKETCHES_REPORTS_PATH }} - - report-to-file: - needs: compile-sketch # Wait for the compile job to finish to get the data for the report - if: github.event_name == 'schedule' # Only run the job when the workflow is triggered by a schedule - runs-on: ubuntu-latest - steps: - # Check out repository - - name: Checkout repository - uses: actions/checkout@v3 - with: - token: ${{ env.GITHUB_TOKEN }} - fetch-depth: '0' - - - name: Switch branch - run: - git checkout remotes/origin/gh-pages - - # This step is needed to get the size data produced by the compile jobs - - name: Download sketches reports artifact - uses: actions/download-artifact@v3 - with: - name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} - path: ${{ env.SKETCHES_REPORTS_PATH }} - - - name: Report results - uses: P-R-O-C-H-Y/report-size-deltas@main - with: - sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} - destination-file: ${{ env.RESULT_LIBRARY_TEST_FILE }} - - - name: Append file with action URL - run: - echo "/ [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})" >> ${{ env.RESULT_LIBRARY_TEST_FILE }} - - - name: Push to github repo - run: | - git config user.name github-actions - git config user.email github-actions@github.com - git add ${{ env.RESULT_LIBRARY_TEST_FILE }} - git commit -m "Generated External Libraries Test Results" - git push origin HEAD:gh-pages - - event_file: - name: "Event File" - if: | - contains(github.event.pull_request.labels.*.name, 'lib_test') - needs: compile-sketch - runs-on: ubuntu-latest - steps: - - name: Upload - uses: actions/upload-artifact@v2 - with: - name: Event File - path: ${{github.event_path}} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 34d3564c4a8..00000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Unit Test Results - -on: - workflow_run: - workflows: [Run tests in hardware] - branches-ignore: [master] - - types: - - completed - -jobs: - unit-test-results: - name: Unit Test Results - runs-on: ubuntu-latest - if: | - github.event.workflow_run.event == 'pull_request' && - (github.event.workflow_run.conclusion == 'success' || - github.event.workflow_run.conclusion == 'failure') - steps: - - name: Download and Extract Artifacts - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - run: | - mkdir -p artifacts && cd artifacts - artifacts_url=${{ github.event.workflow_run.artifacts_url }} - gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact - do - IFS=$'\t' read name url <<< "$artifact" - gh api $url > "$name.zip" - unzip -d "$name" "$name.zip" - done - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - with: - commit: ${{ github.event.workflow_run.head_sha }} - event_file: artifacts/Event File/event.json - event_name: ${{ github.event.workflow_run.event }} - files: "artifacts/**/*.xml" diff --git a/.github/workflows/publishlib.yml b/.github/workflows/publishlib.yml deleted file mode 100644 index e4c75aefe34..00000000000 --- a/.github/workflows/publishlib.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: External Libraries Results - -on: - workflow_run: - workflows: [External Libraries Test] - types: - - completed - - workflow_dispatch: -env: - # It's convenient to set variables for values used multiple times in the workflow - SKETCHES_REPORTS_PATH: artifacts/libraries-report - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - PR_EVENT_PATH: artifacts/Event File/event.json - -jobs: - lib-test-results: - name: External Libraries Test Results - runs-on: ubuntu-latest - if: | - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - - steps: - - name: Download and Extract Artifacts - run: | - mkdir -p artifacts && cd artifacts - artifacts_url=${{ github.event.workflow_run.artifacts_url }} - gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact - do - IFS=$'\t' read name url <<< "$artifact" - gh api $url > "$name.zip" - unzip -d "$name" "$name.zip" - done - - - name: Report results - uses: P-R-O-C-H-Y/report-size-deltas@main - with: - sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} - github-token: ${{ env.GITHUB_TOKEN }} - pr-event-path: ${{ env.PR_EVENT_PATH }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index 9a0561c92cd..00000000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: ESP32 Arduino CI - -on: - workflow_dispatch: - push: - branches: - - master - - release/* - pull_request: - -concurrency: - group: build-${{github.event.pull_request.number || github.ref}} - cancel-in-progress: true - -jobs: - - cmake-check: - name: Check cmake file - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: bash ./.github/scripts/check-cmakelists.sh - - # Ubuntu - build-arduino-linux: - name: Arduino ${{ matrix.chunk }} on ubuntu-latest - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - chunk: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Cache tools - id: cache-linux - uses: actions/cache@v3 - with: - path: | - ./tools/dist - ~/arduino_ide - key: ${{ runner.os }}-${{ hashFiles('package/package_esp32_index.template.json', - 'tools/get.py', - '.github/scripts/install-arduino-ide.sh') }} - - name: Build Sketches - run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} 15 - - # Windows and MacOS - build-arduino-win-mac: - name: Arduino on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Build Sketches - run: bash ./.github/scripts/on-push.sh - - # PlatformIO on Windows, Ubuntu and Mac - build-platformio: - name: PlatformIO on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Build Sketches - run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO - - build-esp-idf-component: - name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }} - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - # The version names here correspond to the versions of espressif/idf Docker image. - # See https://hub.docker.com/r/espressif/idf/tags and - # https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html - # for details. - idf_ver: ["release-v5.1"] - idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2"] - container: espressif/idf:${{ matrix.idf_ver }} - steps: - - name: Check out arduino-esp32 as a component - uses: actions/checkout@v3 - with: - submodules: recursive - path: components/arduino-esp32 - - name: Build - env: - IDF_TARGET: ${{ matrix.idf_target }} - shell: bash - run: | - . ${IDF_PATH}/export.sh - idf.py create-project test - echo CONFIG_FREERTOS_HZ=1000 > test/sdkconfig.defaults - idf.py -C test -DEXTRA_COMPONENT_DIRS=$PWD/components build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c5555027bf0..00000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: ESP32 Arduino Release - -on: - release: - types: published - -jobs: - build: - name: Publish Release - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Build Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bash ./.github/scripts/on-release.sh diff --git a/.github/workflows/upload-idf-component.yml b/.github/workflows/upload-idf-component.yml deleted file mode 100644 index 8fcebf00204..00000000000 --- a/.github/workflows/upload-idf-component.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Push components to https://components.espressif.com -on: - push: - tags: - - '*' -jobs: - upload_components: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: "recursive" - - - name: Upload components to the component registry - uses: espressif/upload-components-ci-action@v1 - with: - name: arduino-esp32 - version: ${{ github.ref_name }} - namespace: espressif - api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}