#4121: Unset TT_METAL_SLOW_DISPATCH_MODE when empty string in yaml. R… #114
This file contains 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: Package and release | |
on: | |
push: | |
branches: ["release"] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
get-params: | |
runs-on: ubuntu-latest | |
outputs: | |
is-release-candidate: ${{ steps.get-is-release-candidate.outputs.is-release-candidate }} | |
steps: | |
- name: Get is-release-candidate | |
id: get-is-release-candidate | |
run: | | |
isReleaseCandidate=${{ github.ref_type == 'branch' && github.event_name == 'push' }} | |
echo "is-release-candidate=$isReleaseCandidate" >> "$GITHUB_OUTPUT" | |
create-tag: | |
needs: [get-params] | |
uses: tenstorrent-metal/metal-workflows/.github/workflows/release-verify-or-create-tag.yaml@main | |
with: | |
fetch_depth: 0 | |
bump_each_commit: false | |
release_candidate_suffix: ${{ needs.get-params.outputs.is-release-candidate && fromJSON(needs.get-params.outputs.is-release-candidate) }} | |
secrets: | |
CHECKOUT_TOKEN: ${{ secrets.CHECKOUT_TOKEN }} | |
create-changelog: | |
permissions: read-all | |
needs: create-tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create changelog | |
id: create-changelog | |
uses: mikepenz/release-changelog-builder-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ignorePreReleases: true | |
failOnError: true | |
outputFile: CHANGELOG.txt | |
- name: Output changelog | |
run: cat CHANGELOG.txt | |
- name: Upload changelog as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: changelog | |
path: CHANGELOG.txt | |
build-eager-package: | |
needs: create-tag | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
arch: [grayskull, wormhole_b0] | |
uses: ./.github/workflows/eager-package.yaml | |
with: | |
environment: dev | |
os: ${{ matrix.os }} | |
arch: ${{ matrix.arch }} | |
secrets: | |
CHECKOUT_TOKEN: ${{ secrets.CHECKOUT_TOKEN }} | |
release-run-frequent-slow-dispatch: | |
uses: ./.github/workflows/full-regressions-and-models.yaml | |
secrets: inherit | |
release-run-frequent-fast-dispatch: | |
uses: ./.github/workflows/fast-dispatch-full-regressions-and-models.yaml | |
secrets: inherit | |
# Candidate for breaking up | |
create-and-upload-draft-release: | |
needs: [ | |
create-tag, | |
create-changelog, | |
build-eager-package, | |
release-run-frequent-slow-dispatch, | |
release-run-frequent-fast-dispatch, | |
] | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
arch: [grayskull, wormhole_b0] | |
# May accidentally create two releases without restricting to 1 job | |
concurrency: create_upload_draft_release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download eager Python packages | |
uses: actions/download-artifact@v3 | |
with: | |
name: eager-dist-${{ matrix.os }}-${{ matrix.arch }} | |
- name: Create VERSION | |
run: echo ${{ needs.create-tag.outputs.version }} > VERSION | |
- name : Download changelog | |
uses: actions/download-artifact@v3 | |
with: | |
name: changelog | |
- name: Assert wheels exist | |
# Issue #3443 wants us to delete the wheel from the release assets. | |
# We are still committed to making this eventually work for proper | |
# releases to allow for easier installing for Python users. | |
run: ls -arhl metal_libs-*+*.whl | |
- name: Download syseng assets for release | |
env: | |
GITHUB_TOKEN: ${{ secrets.CHECKOUT_TOKEN }} | |
run: | | |
cd infra/machine_setup | |
./scripts/download_public_machine_setup_assets.sh -r | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ needs.create-tag.outputs.version }} | |
name: ${{ needs.create-tag.outputs.version }} | |
draft: true | |
body_path: CHANGELOG.txt | |
files: | | |
VERSION | |
CHANGELOG.txt | |
infra/machine_setup/assets/* | |
fail_on_unmatched_files: true |