-
Notifications
You must be signed in to change notification settings - Fork 45
66 lines (59 loc) · 2.1 KB
/
_sandbox.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: "~Sandbox"
on:
workflow_dispatch:
permissions:
contents: read # to fetch code
actions: write # to cancel previous workflows
packages: write # to upload container
jobs:
run-jobs:
uses: ./.github/workflows/_test_jax.yaml
with:
JAX_IMAGE: 'ghcr.io/nvidia/jax:latest'
secrets: inherit
summary:
needs: [run-jobs]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
GPU_ARCH: [V100, A100]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.run-jobs.outputs.ARTIFACTS }}-${{ matrix.GPU_ARCH }}
- name: Write output to step summary
shell: bash -x -e {0}
run: |
source outputs.env
echo "${SUMMARY}" >> $GITHUB_STEP_SUMMARY
# publish-badge:
# needs: [metadata, run-jobs]
# strategy:
# fail-fast: false
# matrix:
# GPU_ARCH: [V100, A100]
# uses: ./.github/workflows/_publish_badge.yaml
# if: (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'workflow_dispatch'
# secrets: inherit
# with:
# ENDPOINT_FILENAME: 'jax-unit-test-status-${{ matrix.GPU_ARCH }}.json'
# PUBLISH: ${{ github.event_name == 'workflow_run' || needs.metadata.outputs.PUBLISH == 'true' }}
# SCRIPT: |
# ARTIFACTS="${{ needs.run-jobs.outputs.ARTIFACT_NAME }}-${{ matrix.GPU_ARCH }}/*"
# FAILED_TESTS=$(cat $ARTIFACTS | grep -c 'FAILED in' || true)
# PASSED_TESTS=$(cat $ARTIFACTS | grep -c 'PASSED in' || true)
# TOTAL_TESTS=$((FAILED_TESTS + PASSED_TESTS))
# if [[ $FAILED_TESTS == 0 ]]; then
# BADGE_COLOR=brightgreen
# else
# if [[ $FAILED_TESTS < $TOTAL_TESTS ]]; then
# BADGE_COLOR=yellow
# else
# BADGE_COLOR=red
# fi
# fi
# echo "LABEL='${{ matrix.GPU_ARCH }} Unit'" >> $GITHUB_OUTPUT
# echo "MESSAGE='${PASSED_TESTS}/${TOTAL_TESTS} passed'" >> $GITHUB_OUTPUT
# echo "COLOR='${BADGE_COLOR}'" >> $GITHUB_OUTPUT