From 1fddc68b774338527dce16ae9d84a160d9c6a0b7 Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Sun, 7 May 2023 16:19:54 +0200 Subject: [PATCH] Remove espressif workflows. --- .github/workflows/build_esptool.yml | 121 --------------------- .github/workflows/issue_comment.yml | 20 ---- .github/workflows/new_issues.yml | 20 ---- .github/workflows/new_prs.yml | 25 ----- .github/workflows/release_esptool_pypi.yml | 40 ------- .github/workflows/test_esptool.yml | 77 ------------- 6 files changed, 303 deletions(-) delete mode 100644 .github/workflows/build_esptool.yml delete mode 100644 .github/workflows/issue_comment.yml delete mode 100644 .github/workflows/new_issues.yml delete mode 100644 .github/workflows/new_prs.yml delete mode 100644 .github/workflows/release_esptool_pypi.yml delete mode 100644 .github/workflows/test_esptool.yml diff --git a/.github/workflows/build_esptool.yml b/.github/workflows/build_esptool.yml deleted file mode 100644 index ca4d7eaca..000000000 --- a/.github/workflows/build_esptool.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: Build esptool - -on: [push, pull_request] - -jobs: - build-esptool-binaries: - name: Build esptool binaries for ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, ubuntu-20.04, windows-latest] - include: - - os: macos-latest - TARGET: macos - SEPARATOR: ':' - - os: ubuntu-20.04 - TARGET: linux-amd64 - SEPARATOR: ':' - - os: windows-latest - TARGET: win64 - EXTEN: .exe - SEPARATOR: ';' - env: - DISTPATH: esptool-${{ matrix.TARGET }} - STUBS_DIR: /esptool/targets/stub_flasher/ - steps: - - name: Checkout repository - uses: actions/checkout@master - - name: Set up Python 3.8 - uses: actions/setup-python@master - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pyinstaller - pip install --user -e . - - name: Build with PyInstaller - run: | - pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico --add-data=".${{ env.STUBS_DIR }}*.json${{ matrix.SEPARATOR }}${{ env.STUBS_DIR }}" esptool.py - pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico espefuse.py - pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico espsecure.py - pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico esp_rfc2217_server.py - - name: Sign binaries - if: matrix.os == 'windows-latest' && github.event_name != 'pull_request' - env: - CERTIFICATE: ${{ secrets.CERTIFICATE }} - CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} - shell: pwsh - run: | - ./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/esptool.exe - ./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/espefuse.exe - ./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/espsecure.exe - ./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/esp_rfc2217_server.exe - - name: Test binaries - shell: bash - run: | - ./${{ env.DISTPATH }}/esptool${{ matrix.EXTEN }} -h - ./${{ env.DISTPATH }}/espefuse${{ matrix.EXTEN }} -h - ./${{ env.DISTPATH }}/espsecure${{ matrix.EXTEN }} -h - ./${{ env.DISTPATH }}/esp_rfc2217_server${{ matrix.EXTEN }} -h - - name: Add license and readme - shell: bash - run: mv LICENSE README.md ./${{ env.DISTPATH }} - - name: Archive artifact - uses: actions/upload-artifact@master - with: - name: ${{ env.DISTPATH }} - path: ${{ env.DISTPATH }} - - create_release: - name: Create GitHub release - if: startsWith(github.ref, 'refs/tags/') - needs: build-esptool-binaries - runs-on: ubuntu-latest - outputs: - upload_url: ${{ steps.create_release.outputs.upload_url }} - VERSION: ${{ steps.get_version.outputs.VERSION }} - steps: - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Version ${{ github.ref }} - draft: true - prerelease: false - - name: Get version - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - shell: bash - - upload_assets: - name: Upload release assets - if: startsWith(github.ref, 'refs/tags/') - needs: create_release - runs-on: ubuntu-latest - strategy: - matrix: - TARGET: [macos, linux-amd64, win64] - env: - DISTPATH: esptool-${{ needs.create_release.outputs.VERSION }}-${{ matrix.TARGET }} - steps: - - name: Download built binaries - uses: actions/download-artifact@master - - name: Rename and package binaries - run: | - mv esptool-${{ matrix.TARGET }} ${{ env.DISTPATH }} - zip -r ${{ env.DISTPATH }}.zip ./${{ env.DISTPATH }}/* - - name: Upload release assets - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_path: "${{ env.DISTPATH }}.zip" - asset_name: "${{ env.DISTPATH }}.zip" - asset_content_type: application/zip diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml deleted file mode 100644 index 200c49eca..000000000 --- a/.github/workflows/issue_comment.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Sync issue comments to Jira - -# This workflow will be triggered when new issue comment is created (including PR comments) -on: issue_comment - -jobs: - sync_issue_comments_to_jira: - name: Sync Issue Comments to Jira - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Sync issue comments to Jira - uses: espressif/github-actions/sync_issues_to_jira@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: ESPTOOL - JIRA_COMPONENT: GitHub - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/new_issues.yml b/.github/workflows/new_issues.yml deleted file mode 100644 index f79bdcae6..000000000 --- a/.github/workflows/new_issues.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Sync issues to Jira - -# This workflow will be triggered when a new issue is opened -on: issues - -jobs: - sync_issues_to_jira: - name: Sync issues to Jira - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Sync GitHub issues to Jira project - uses: espressif/github-actions/sync_issues_to_jira@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: ESPTOOL - JIRA_COMPONENT: GitHub - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/new_prs.yml b/.github/workflows/new_prs.yml deleted file mode 100644 index 05a56b2f5..000000000 --- a/.github/workflows/new_prs.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Sync remaining PRs to Jira - -# This workflow will be triggered every hour, to sync remaining PRs (i.e. PRs with zero comment) to Jira project -# Note that, PRs can also get synced when new PR comment is created -on: - schedule: - - cron: "0 * * * *" - -jobs: - sync_prs_to_jira: - name: Sync PRs to Jira - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Sync PRs to Jira project - uses: espressif/github-actions/sync_issues_to_jira@master - with: - cron_job: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: ESPTOOL - JIRA_COMPONENT: GitHub - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/release_esptool_pypi.yml b/.github/workflows/release_esptool_pypi.yml deleted file mode 100644 index cd0c01bb0..000000000 --- a/.github/workflows/release_esptool_pypi.yml +++ /dev/null @@ -1,40 +0,0 @@ -# This workflow will upload an esptool Python package when a release is created - -name: PyPI release - -on: - release: - types: [released] - -jobs: - build_and_upload: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Set up Python 3.7 - uses: actions/setup-python@master - with: - python-version: '3.7' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools twine - - name: Build and upload esptool ${{ github.event.release.tag_name }} - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - PUBLISHED_VERSION=$(curl https://pypi.org/pypi/esptool/json 2>/dev/null | jq -r '.info.version') - CURRENT_VERSION=$(python setup.py --version 2>/dev/null) - - if [ "$PUBLISHED_VERSION" == "$CURRENT_VERSION" ]; then - echo "Version ${PUBLISHED_VERSION} already published, skipping..." - exit 1 - else - echo "Packaging and publishing new esptool version: ${CURRENT_VERSION}" - python setup.py sdist - tar -ztvf dist/* - twine upload dist/* - fi diff --git a/.github/workflows/test_esptool.yml b/.github/workflows/test_esptool.yml deleted file mode 100644 index fb1947b35..000000000 --- a/.github/workflows/test_esptool.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Test esptool - -on: [push, pull_request] - -jobs: - test_esptool: - runs-on: ubuntu-latest - - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - - steps: - - name: Checkout ref commit - uses: actions/checkout@master - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@master - with: - python-version: ${{ matrix.python-version }} - - - name: SoftHSM2 setup - run: | - sudo apt-get update - sudo apt-get install -y softhsm2 - sudo chmod -R a+rx /etc/softhsm - sudo chmod a+r /etc/softhsm/softhsm2.conf - sudo chown -R $(whoami) /var/lib/softhsm - ./ci/setup_softhsm2.sh || exit 1 - - - name: Test python components (fast) - run: | - python setup.py build - pip install --extra-index-url https://dl.espressif.com/pypi -e .[dev,hsm] - pytest test/test_imagegen.py - pytest test/test_espsecure.py - pytest test/test_espsecure_hsm.py - pytest test/test_merge_bin.py - pytest test/test_image_info.py - pytest test/test_modules.py - - - name: Check the installed versions can run - run: | - esptool.py --help - espefuse.py --help - espsecure.py --help - - - name: Build stub (Python 3.7 only) - if: matrix.python-version == 3.7 - run: | - export TOOLCHAIN_DIR=$HOME/toolchain - - export ESP8266_BINDIR=$TOOLCHAIN_DIR/xtensa-lx106-elf/bin - export ESP32_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32-elf/bin - export ESP32S2_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32s2-elf/bin - export ESP32S3_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32s3-elf/bin - export ESP32C3_BINDIR=$TOOLCHAIN_DIR/riscv32-esp-elf/bin - - export PATH=$PATH:$ESP8266_BINDIR:$ESP32_BINDIR:$ESP32S2_BINDIR:$ESP32S3_BINDIR:$ESP32C3_BINDIR - - ./ci/setup_ci_build_env.sh - make -C flasher_stub V=1 - cd flasher_stub && python ./compare_stubs.py - - lint_esptool: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Lint with flake8 - run: | - pip install --extra-index-url https://dl.espressif.com/pypi -e .[dev] - python -m flake8 - - - name: Check formatting with Black - uses: psf/black@stable