| 
1 |  | -name: "~Sandbox"  | 
2 |  | - | 
 | 1 | +name: Sandbox  | 
 | 2 | +run-name: CI-amd64  | 
3 | 3 | on:  | 
4 |  | -  workflow_dispatch:  | 
 | 4 | +  pull_request:  | 
 | 5 | +    types:  | 
 | 6 | +      - opened  | 
 | 7 | +      - reopened  | 
 | 8 | +      - ready_for_review  | 
 | 9 | +      - synchronize  | 
 | 10 | +    paths-ignore:  | 
 | 11 | +      - "**.md"  | 
 | 12 | + | 
 | 13 | +permissions:  | 
 | 14 | +  contents: read # to fetch code  | 
 | 15 | +  actions: write # to cancel previous workflows  | 
 | 16 | +  packages: write # to upload container  | 
5 | 17 | 
 
  | 
6 | 18 | jobs:  | 
7 |  | -  sandbox:  | 
8 |  | -    runs-on: ubuntu-22.04  | 
9 |  | -    steps:  | 
10 |  | -      - name: Login to GitHub Container Registry  | 
11 |  | -        uses: docker/login-action@v3  | 
12 |  | -        with:  | 
13 |  | -          registry: ghcr.io  | 
14 |  | -          username: ${{ github.repository_owner }}  | 
15 |  | -          password: ${{ secrets.GITHUB_TOKEN }}  | 
 | 19 | +  build-base:  | 
 | 20 | +    uses: ./.github/workflows/_build_base.yaml  | 
 | 21 | +    with:  | 
 | 22 | +      ARCHITECTURE: amd64  | 
 | 23 | +      BUILD_DATE: 20240418  | 
 | 24 | +      MANIFEST_ARTIFACT_NAME: ""  | 
 | 25 | +    secrets: inherit  | 
 | 26 | + | 
 | 27 | +  build-jax:  | 
 | 28 | +    needs: build-base  | 
 | 29 | +    uses: ./.github/workflows/_build.yaml  | 
 | 30 | +    with:  | 
 | 31 | +      ARCHITECTURE: amd64  | 
 | 32 | +      ARTIFACT_NAME: artifact-jax-build  | 
 | 33 | +      BADGE_FILENAME: badge-jax-build  | 
 | 34 | +      BUILD_DATE: 20240418  | 
 | 35 | +      BASE_IMAGE: ${{ needs.build-base.outputs.DOCKER_TAG }}  | 
 | 36 | +      CONTAINER_NAME: jax  | 
 | 37 | +      DOCKERFILE: .github/container/Dockerfile.jax  | 
 | 38 | +      RUNNER_SIZE: large  | 
 | 39 | +    secrets: inherit  | 
16 | 40 | 
 
  | 
17 |  | -      - name: Print usage  | 
18 |  | -        run: |  | 
19 |  | -          cat << EOF  | 
20 |  | -          This is an empty workflow file located in the main branch of your  | 
21 |  | -          repository. It serves as a testing ground for new GitHub Actions on  | 
22 |  | -          development branches before merging them to the main branch. By  | 
23 |  | -          defining and overloading this workflow on your development branch,  | 
24 |  | -          you can test new actions without affecting your main branch, ensuring  | 
25 |  | -          a smooth integration process once the changes are ready to be merged.  | 
 | 41 | +  build-upstream-maxtext:  | 
 | 42 | +    needs: build-jax  | 
 | 43 | +    if: inputs.ARCHITECTURE == 'amd64' # Triton does not seem to support arm64  | 
 | 44 | +    uses: ./.github/workflows/_build.yaml  | 
 | 45 | +    with:  | 
 | 46 | +      ARCHITECTURE: amd64  | 
 | 47 | +      ARTIFACT_NAME: artifact-maxtext-build  | 
 | 48 | +      BADGE_FILENAME: badge-maxtext-build  | 
 | 49 | +      BUILD_DATE: 20240418  | 
 | 50 | +      BASE_IMAGE: ${{ needs.build-jax.outputs.DOCKER_TAG_MEALKIT }}  | 
 | 51 | +      CONTAINER_NAME: maxtext  | 
 | 52 | +      DOCKERFILE: .github/container/Dockerfile.maxtext.amd64  | 
 | 53 | +    secrets: inherit  | 
26 | 54 | 
 
  | 
27 |  | -          Usage:  | 
28 |  | -            | 
29 |  | -          1. In your development branch, modify the sandbox.yml workflow file  | 
30 |  | -             to include the new actions you want to test. Make sure to commit  | 
31 |  | -             the changes to the development branch.  | 
32 |  | -          2. Navigate to the 'Actions' tab in your repository, select the  | 
33 |  | -             '~Sandbox' workflow, and choose your development branch from the  | 
34 |  | -             branch dropdown menu. Click on 'Run workflow' to trigger the  | 
35 |  | -             workflow on your development branch.  | 
36 |  | -          3. Once you have tested and verified the new actions in the Sandbox  | 
37 |  | -             workflow, you can incorporate them into your main workflow(s) and  | 
38 |  | -             merge the development branch into the main branch. Remember to  | 
39 |  | -             revert the changes to the sandbox.yml file in the main branch to  | 
40 |  | -             keep it empty for future testing.  | 
41 |  | -          EOF  | 
 | 55 | +  build-rosetta-maxtext:  | 
 | 56 | +    needs: build-upstream-maxtext  | 
 | 57 | +    uses: ./.github/workflows/_build_rosetta.yaml  | 
 | 58 | +    with:  | 
 | 59 | +      ARCHITECTURE: amd64  | 
 | 60 | +      BUILD_DATE: 20240418  | 
 | 61 | +      BASE_IMAGE: ${{ needs.build-upstream-maxtext.outputs.DOCKER_TAG_MEALKIT }}  | 
 | 62 | +      BASE_LIBRARY: maxtext  | 
 | 63 | +    secrets: inherit  | 
0 commit comments