-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,63 @@ | ||
name: "~Sandbox" | ||
|
||
name: Sandbox | ||
run-name: CI-amd64 | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- ready_for_review | ||
- synchronize | ||
paths-ignore: | ||
- "**.md" | ||
|
||
permissions: | ||
contents: read # to fetch code | ||
actions: write # to cancel previous workflows | ||
packages: write # to upload container | ||
|
||
jobs: | ||
sandbox: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
build-base: | ||
uses: ./.github/workflows/_build_base.yaml | ||
with: | ||
ARCHITECTURE: amd64 | ||
BUILD_DATE: 20240418 | ||
MANIFEST_ARTIFACT_NAME: "" | ||
secrets: inherit | ||
|
||
build-jax: | ||
needs: build-base | ||
uses: ./.github/workflows/_build.yaml | ||
with: | ||
ARCHITECTURE: amd64 | ||
ARTIFACT_NAME: artifact-jax-build | ||
BADGE_FILENAME: badge-jax-build | ||
BUILD_DATE: 20240418 | ||
BASE_IMAGE: ${{ needs.build-base.outputs.DOCKER_TAG }} | ||
CONTAINER_NAME: jax | ||
DOCKERFILE: .github/container/Dockerfile.jax | ||
RUNNER_SIZE: large | ||
secrets: inherit | ||
|
||
- name: Print usage | ||
run: | | ||
cat << EOF | ||
This is an empty workflow file located in the main branch of your | ||
repository. It serves as a testing ground for new GitHub Actions on | ||
development branches before merging them to the main branch. By | ||
defining and overloading this workflow on your development branch, | ||
you can test new actions without affecting your main branch, ensuring | ||
a smooth integration process once the changes are ready to be merged. | ||
build-upstream-maxtext: | ||
needs: build-jax | ||
if: inputs.ARCHITECTURE == 'amd64' # Triton does not seem to support arm64 | ||
uses: ./.github/workflows/_build.yaml | ||
with: | ||
ARCHITECTURE: amd64 | ||
ARTIFACT_NAME: artifact-maxtext-build | ||
BADGE_FILENAME: badge-maxtext-build | ||
BUILD_DATE: 20240418 | ||
BASE_IMAGE: ${{ needs.build-jax.outputs.DOCKER_TAG_MEALKIT }} | ||
CONTAINER_NAME: maxtext | ||
DOCKERFILE: .github/container/Dockerfile.maxtext.amd64 | ||
secrets: inherit | ||
|
||
Usage: | ||
1. In your development branch, modify the sandbox.yml workflow file | ||
to include the new actions you want to test. Make sure to commit | ||
the changes to the development branch. | ||
2. Navigate to the 'Actions' tab in your repository, select the | ||
'~Sandbox' workflow, and choose your development branch from the | ||
branch dropdown menu. Click on 'Run workflow' to trigger the | ||
workflow on your development branch. | ||
3. Once you have tested and verified the new actions in the Sandbox | ||
workflow, you can incorporate them into your main workflow(s) and | ||
merge the development branch into the main branch. Remember to | ||
revert the changes to the sandbox.yml file in the main branch to | ||
keep it empty for future testing. | ||
EOF | ||
build-rosetta-maxtext: | ||
needs: build-upstream-maxtext | ||
uses: ./.github/workflows/_build_rosetta.yaml | ||
with: | ||
ARCHITECTURE: amd64 | ||
BUILD_DATE: 20240418 | ||
BASE_IMAGE: ${{ needs.build-upstream-maxtext.outputs.DOCKER_TAG_MEALKIT }} | ||
BASE_LIBRARY: maxtext | ||
secrets: inherit |