chore: fix README's links on ExecuTorch backend to version 1.0 (#92) #18
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: PTE Adapter for Model Explorer CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| tags: | |
| - "v*.*.*" | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| env: | |
| DEFAULT_PY_VERSION: "3.10" | |
| DEFAULT_OS: "ubuntu-22.04" | |
| ME_REPO_ACCESS_APP_ID: ${{ secrets.ME_REPO_ACCESS_APP_ID }} | |
| ME_REPO_ACCESS_PRIVATE_KEY: ${{ secrets.ME_REPO_ACCESS_PRIVATE_KEY }} | |
| jobs: | |
| tests-x64: | |
| name: Run tests on x64 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| runner: [ubuntu-22.04, windows-2022] | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Checkout plugin repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up virtual environment | |
| run: | | |
| python -m pip install . --group dev | |
| - name: Lint and Format Check | |
| run: | | |
| ruff check --output-format=github | |
| ruff format --check | |
| - name: Type Check | |
| run: | | |
| pyright | |
| - name: Run Tests | |
| shell: bash | |
| run: | | |
| python -m pip install . --group dev | |
| PYTEST_CVG_FLAGS="" | |
| if [[ "${{ matrix.runner }}" == "${{ env.DEFAULT_OS }}" && \ | |
| "${{ matrix.python-version }}" == "${{ env.DEFAULT_PY_VERSION }}" ]]; then | |
| python -m pip install --group coverage | |
| PYTEST_CVG_FLAGS="-v --cov=pte_adapter_model_explorer --cov-report=lcov:reports/lcov.info" | |
| fi | |
| pytest --tb=short ${PYTEST_CVG_FLAGS} | |
| - name: Upload coverage to Qlty | |
| if: matrix.runner == env.DEFAULT_OS && matrix.python-version == env.DEFAULT_PY_VERSION | |
| uses: qltysh/qlty-action/coverage@9e8e09dfc3d82a968f4034f5265eaf3c142881f7 # v2.0.0 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: reports/lcov.info | |
| tests-arm64: | |
| if: ${{ !github.event.repository.private }} | |
| name: Run tests on arm64 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| runner: [ubuntu-22.04-arm, macos-14] | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - shell: bash | |
| run: | | |
| python -m pip install . --group dev | |
| pytest --tb=short | |
| build: | |
| name: Build and Publish Wheels | |
| needs: [tests-x64] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: ./.github/actions/build-wheel | |
| with: | |
| python-version: ${{ env.DEFAULT_PY_VERSION }} | |
| release: | |
| name: Release | |
| if: startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'arm' | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/pte-adapter-model-explorer | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: getsentry/action-github-app-token@d4b5da6c5e37703f8c3b3e43abb5705b46e159cc #v3.0.0 | |
| id: get_app_token | |
| with: | |
| app_id: ${{ env.ME_REPO_ACCESS_APP_ID }} | |
| private_key: ${{ env.ME_REPO_ACCESS_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.get_app_token.outputs.token }} | |
| - name: Generate release notes | |
| uses: orhun/git-cliff-action@d77b37db2e3f7398432d34b72a12aa3e2ba87e51 # v4.6.0 | |
| id: git-cliff | |
| with: | |
| config: cliff.toml | |
| args: --latest | |
| env: | |
| OUTPUT: CHANGELOG.md | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPO: ${{ github.repository }} | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Publish distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1.12.4 | |
| - name: Publish GitHub release | |
| uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| body_path: CHANGELOG.md | |
| files: dist/*.whl | |
| token: ${{ steps.get_app_token.outputs.token }} | |
| sync-commits-to-public-repo: | |
| name: Sync commits to public repo | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner != 'arm' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout target repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: arm/pte-adapter-model-explorer | |
| token: ${{ secrets.ARM_ORG_TOKEN }} | |
| path: target-repo | |
| - name: Push commits to public repo | |
| run: | | |
| cd target-repo | |
| git remote add source ${{ github.server_url }}/${{ github.repository }} | |
| git fetch source main | |
| git checkout main | |
| git merge source/main | |
| git push origin main | |
| sync-release-tags-to-public-repo: | |
| name: Sync release tags to public repo | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository_owner != 'arm' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout target repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: arm/pte-adapter-model-explorer | |
| token: ${{ secrets.ARM_ORG_TOKEN }} | |
| path: target-repo | |
| - name: Push tags to public repo | |
| run: | | |
| cd target-repo | |
| git remote add source ${{ github.server_url }}/${{ github.repository }} | |
| git fetch source --tags | |
| git push origin ${{ github.ref_name }} |