File tree Expand file tree Collapse file tree 3 files changed +126
-0
lines changed Expand file tree Collapse file tree 3 files changed +126
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Reusable Test Workflow
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ test_name :
7+ type : string
8+ required : true
9+ architecture :
10+ type : string
11+ required : true
12+ image :
13+ type : string
14+ required : true
15+ execute_script :
16+ type : string
17+ required : true
18+ artifacts :
19+ type : string
20+ required : false
21+ default : ' '
22+ timeout_minutes :
23+ type : number
24+ required : false
25+ default : 60
26+ secrets :
27+ GITHUB_TOKEN :
28+ required : true
29+
30+ jobs :
31+ test :
32+ name : Build ${{ inputs.test_name }} on ${{ inputs.architecture }}
33+ runs-on : [self-hosted, ${{ inputs.architecture }}, large]
34+ steps :
35+ - name : Print environment variables
36+ run : env
37+
38+ - name : Check out repository
39+ uses : actions/checkout@v4
40+
41+ - name : Login to GitHub Container Registry
42+ uses : docker/login-action@v3
43+ with :
44+ registry : ghcr.io
45+ username : ${{ github.repository_owner }}
46+ password : ${{ secrets.GITHUB_TOKEN }}
47+
48+ - name : Run tests
49+ timeout-minutes : ${{ inputs.timeout_minutes }}
50+ run : |
51+ #!/bin/bash
52+ set -ex
53+ eval "${{ inputs.execute_script }}"
54+
55+ - name : Upload artifacts
56+ if : success() || failure()
57+ uses : actions/upload-artifact@v4
58+ with :
59+ name : artifact-${{ inputs.test_name }}-test-${{ inputs.architecture }}
60+ path : |
61+ ${{ inputs.artifacts }}
Original file line number Diff line number Diff line change 1+ # .github/workflows/_reusable_test.yaml
2+ name : Reusable Test Workflow
3+
4+ on :
5+ workflow_call :
6+ inputs :
7+ test_name :
8+ type : string
9+ required : true
10+ architecture :
11+ type : string
12+ required : true
13+ image :
14+ type : string
15+ required : true
16+ execute_script :
17+ type : string
18+ required : true
19+ artifacts :
20+ type : string
21+ required : false
22+ default : ' '
23+ timeout_minutes :
24+ type : number
25+ required : false
26+ default : 60
27+ secrets :
28+ GITHUB_TOKEN :
29+ required : true
30+
31+ jobs :
32+ test :
33+ name : Test ${{ inputs.test_name }} on ${{ inputs.architecture }}
34+ runs-on : [self-hosted, ${{ inputs.architecture }}, large]
35+ steps :
36+ - name : Print environment variables
37+ run : env
38+
39+ - name : Check out repository
40+ uses : actions/checkout@v4
41+
42+ - name : Login to GitHub Container Registry
43+ uses : docker/login-action@v3
44+ with :
45+ registry : ghcr.io
46+ username : ${{ github.repository_owner }}
47+ password : ${{ secrets.GITHUB_TOKEN }}
48+
49+ - name : Run tests
50+ timeout-minutes : ${{ inputs.timeout_minutes }}
51+ run : |
52+ #!/bin/bash
53+ set -ex
54+ eval "${{ inputs.execute_script }}"
55+
56+ - name : Upload artifacts
57+ if : success() || failure()
58+ uses : actions/upload-artifact@v4
59+ with :
60+ name : artifact-${{ inputs.test_name }}-test-${{ inputs.architecture }}
61+ path : |
62+ ${{ inputs.artifacts }}
Original file line number Diff line number Diff line change @@ -280,6 +280,9 @@ jobs:
280280 dockerfile : ${{ format('.github/container/Dockerfile.{0}', matrix.container_name) }}
281281 dockercontext : ${{ matrix.container_name == 'gemma' && '.' || '.github/container' }}
282282 runner_size : ${{ (matrix.container_name == 'jax' || matrix.container_name == 'triton') && 'large' || 'small' }}
283+
284+
285+
283286 # Only merge if everything succeeds
284287 merge-new-manifest :
285288 runs-on : ubuntu-22.04
You can’t perform that action at this time.
0 commit comments