Skip to content

Commit f065a20

Browse files
committed
Add workflow for build and test release candidate for TPU
1 parent 4bcec6a commit f065a20

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This workflow will build and test the MaxText package, and build Docker images
16+
# for a Release Candidate when a new release tag is created.
17+
18+
name: MaxText Release Pipeline
19+
20+
# Triggers when a new "release" is published in the GitHub UI
21+
on:
22+
release:
23+
types: [published]
24+
workflow_dispatch:
25+
26+
permissions:
27+
contents: read
28+
issues: write
29+
id-token: write
30+
31+
jobs:
32+
release_approval:
33+
name: Approve Release Candidate
34+
if: github.event_name != 'workflow_dispatch'
35+
runs-on: ubuntu-latest
36+
# "release" environment is configured in MaxText repository settings.
37+
# This environment requires manual approval before proceeding to the next job.
38+
environment: release
39+
steps:
40+
- name: Acknowledge Approval
41+
run: echo "Release candidate approved, proceeding to build and test MaxText package."
42+
43+
build_and_test_maxtext_package:
44+
name: Build and Test MaxText Package
45+
needs: [release_approval]
46+
if: |
47+
always() &&
48+
(needs.release_approval.result == 'success' || needs.release_approval.result == 'skipped')
49+
uses: ./.github/workflows/build_and_test_maxtext.yml
50+
secrets: inherit
51+
52+
build_release_candidate_images:
53+
name: ${{ matrix.image_name }}
54+
needs: [build_and_test_maxtext_package]
55+
if: |
56+
always() &&
57+
(needs.build_and_test_maxtext_package.result == 'success' || needs.build_and_test_maxtext_package.result == 'skipped')
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
include:
62+
- device: tpu
63+
build_mode: stable
64+
image_name: maxtext_jax_stable
65+
workflow: pre-training
66+
dockerfile: maxtext_tpu_dependencies.Dockerfile
67+
- device: tpu
68+
build_mode: stable
69+
image_name: maxtext_post_training_stable
70+
workflow: post-training
71+
dockerfile: maxtext_tpu_dependencies.Dockerfile
72+
uses: ./.github/workflows/build_and_push_docker_image.yml
73+
with:
74+
image_name: ${{ matrix.image_name }}
75+
device: ${{ matrix.device }}
76+
build_mode: ${{ matrix.build_mode }}
77+
workflow: ${{ matrix.workflow }}
78+
dockerfile: ${{ matrix.dockerfile }}
79+
maxtext_sha: ${{ github.sha }}
80+
include_test_assets: true
81+
secrets:
82+
HF_TOKEN: ${{ secrets.HF_TOKEN }}

0 commit comments

Comments
 (0)