Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
STEFANO BOSISIO committed Jan 17, 2025
1 parent b42b489 commit 4c66acb
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/_new_reusable_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Reusable Test Workflow

on:
workflow_call:
inputs:
test_name:
type: string
required: true
architecture:
type: string
required: true
image:
type: string
required: true
execute_script:
type: string
required: true
artifacts:
type: string
required: false
default: ''
timeout_minutes:
type: number
required: false
default: 60
secrets:
GITHUB_TOKEN:
required: true

jobs:
test:
name: Build ${{ inputs.test_name }} on ${{ inputs.architecture }}
runs-on: [self-hosted, ${{ inputs.architecture }}, large]
steps:
- name: Print environment variables
run: env

- name: Check out repository
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
timeout-minutes: ${{ inputs.timeout_minutes }}
run: |
#!/bin/bash
set -ex
eval "${{ inputs.execute_script }}"
- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: artifact-${{ inputs.test_name }}-test-${{ inputs.architecture }}
path: |
${{ inputs.artifacts }}
62 changes: 62 additions & 0 deletions .github/workflows/_new_reusable_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# .github/workflows/_reusable_test.yaml
name: Reusable Test Workflow

on:
workflow_call:
inputs:
test_name:
type: string
required: true
architecture:
type: string
required: true
image:
type: string
required: true
execute_script:
type: string
required: true
artifacts:
type: string
required: false
default: ''
timeout_minutes:
type: number
required: false
default: 60
secrets:
GITHUB_TOKEN:
required: true

jobs:
test:
name: Test ${{ inputs.test_name }} on ${{ inputs.architecture }}
runs-on: [self-hosted, ${{ inputs.architecture }}, large]
steps:
- name: Print environment variables
run: env

- name: Check out repository
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
timeout-minutes: ${{ inputs.timeout_minutes }}
run: |
#!/bin/bash
set -ex
eval "${{ inputs.execute_script }}"
- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: artifact-${{ inputs.test_name }}-test-${{ inputs.architecture }}
path: |
${{ inputs.artifacts }}
3 changes: 3 additions & 0 deletions .github/workflows/new_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ jobs:
dockerfile: ${{ format('.github/container/Dockerfile.{0}', matrix.container_name) }}
dockercontext: ${{ matrix.container_name == 'gemma' && '.' || '.github/container' }}
runner_size: ${{ (matrix.container_name == 'jax' || matrix.container_name == 'triton') && 'large' || 'small' }}



# Only merge if everything succeeds
merge-new-manifest:
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 4c66acb

Please sign in to comment.