Add path filters to the TPU job (#14543)
This commit is contained in:
parent
bda70a2f2f
commit
46519e2fc7
|
@ -4,33 +4,16 @@ orbs:
|
||||||
gcp-gke: circleci/gcp-gke@1.4.0
|
gcp-gke: circleci/gcp-gke@1.4.0
|
||||||
go: circleci/go@1.7.1
|
go: circleci/go@1.7.1
|
||||||
codecov: codecov/codecov@1.1.0
|
codecov: codecov/codecov@1.1.0
|
||||||
|
parameters:
|
||||||
trigger:
|
GHA_Actor:
|
||||||
tags:
|
type: string
|
||||||
include:
|
default: ""
|
||||||
- '*'
|
GHA_Action:
|
||||||
branches:
|
type: string
|
||||||
include:
|
default: ""
|
||||||
- "master"
|
GHA_Event:
|
||||||
- "release/*"
|
type: string
|
||||||
- "refs/tags/*"
|
default: ""
|
||||||
|
|
||||||
pr:
|
|
||||||
- "master"
|
|
||||||
- "release/*"
|
|
||||||
|
|
||||||
# Workflow Steps:
|
|
||||||
# 1. Checkout
|
|
||||||
# 2. Install GO
|
|
||||||
# 3. Checkout ml-testing-accelerators
|
|
||||||
# 4. GCP GKE install
|
|
||||||
# 5. Update Kubeconfig with credintials
|
|
||||||
# 6. Install jsonnet
|
|
||||||
# 7. Update jsonnet
|
|
||||||
# 8. Deploy the job on the kubernetes cluster
|
|
||||||
# 9. Statistics
|
|
||||||
# 10. Upload coverage results
|
|
||||||
# 11. Upload coverage to Codecov
|
|
||||||
|
|
||||||
references:
|
references:
|
||||||
|
|
||||||
|
@ -92,7 +75,7 @@ references:
|
||||||
# still the job hasn't finished, give up and return the starting
|
# still the job hasn't finished, give up and return the starting
|
||||||
# non-zero status code.
|
# non-zero status code.
|
||||||
printf "Waiting for job to finish: " && \
|
printf "Waiting for job to finish: " && \
|
||||||
while [ $i -lt $MAX_CHECKS ]; do ((i++)); if kubectl get jobs $job_name -o jsonpath='Failed:{.status.failed}' | grep "Failed:1"; then status_code=1 && break; elif kubectl get jobs $job_name -o jsonpath='Succeeded:{.status.succeeded}' | grep "Succeeded:1" ; then status_code=0 && break; else printf "."; fi; sleep $CHECK_SPEEP; done && \
|
while [ $i -lt $MAX_CHECKS ]; do ((i++)); if kubectl get jobs $job_name -o jsonpath='Failed:{.status.failed}' | grep "Failed:1"; then status_code=1 && break; elif kubectl get jobs $job_name -o jsonpath='Succeeded:{.status.succeeded}' | grep "Succeeded:1" ; then status_code=0 && break; else printf "."; fi; sleep $CHECK_SLEEP; done && \
|
||||||
echo "Done waiting. Job status code: $status_code" && \
|
echo "Done waiting. Job status code: $status_code" && \
|
||||||
kubectl logs -f $pod_name --container=train > /tmp/full_output.txt
|
kubectl logs -f $pod_name --container=train > /tmp/full_output.txt
|
||||||
if grep -q '<?xml version="1.0" ?>' /tmp/full_output.txt ; then csplit /tmp/full_output.txt '/<?xml version="1.0" ?>/'; else mv /tmp/full_output.txt xx00; fi && \
|
if grep -q '<?xml version="1.0" ?>' /tmp/full_output.txt ; then csplit /tmp/full_output.txt '/<?xml version="1.0" ?>/'; else mv /tmp/full_output.txt xx00; fi && \
|
||||||
|
@ -116,7 +99,7 @@ jobs:
|
||||||
- XLA_VER: 1.12
|
- XLA_VER: 1.12
|
||||||
- PYTHON_VER: 3.7
|
- PYTHON_VER: 3.7
|
||||||
- MAX_CHECKS: 1000
|
- MAX_CHECKS: 1000
|
||||||
- CHECK_SPEEP: 5
|
- CHECK_SLEEP: 5
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- go/install
|
- go/install
|
||||||
|
@ -153,10 +136,11 @@ jobs:
|
||||||
destination: html
|
destination: html
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
|
||||||
#build-docs: # FixMe
|
#build-docs: # FixMe
|
||||||
|
# when: << pipeline.parameters.GHA_Action >>
|
||||||
# jobs:
|
# jobs:
|
||||||
# - build-Docs
|
# - build-Docs
|
||||||
test-on-tpus:
|
test-on-tpus:
|
||||||
|
when: << pipeline.parameters.GHA_Action >>
|
||||||
jobs:
|
jobs:
|
||||||
- TPU-tests
|
- TPU-tests
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master, "release/*"]
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/ci-circleci.yml"
|
||||||
|
- ".circleci/config.yml"
|
||||||
|
- "requirements/pytorch/**"
|
||||||
|
- "src/pytorch_lightning/**"
|
||||||
|
- "tests/tests_pytorch/**"
|
||||||
|
- "setup.cfg" # includes pytest config
|
||||||
|
pull_request:
|
||||||
|
branches: [master, "release/*"]
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/ci-circleci.yml"
|
||||||
|
- ".circleci/config.yml"
|
||||||
|
- "requirements/pytorch/**"
|
||||||
|
- "src/pytorch_lightning/**"
|
||||||
|
- "tests/tests_pytorch/**"
|
||||||
|
- "setup.cfg" # includes pytest config
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# https://github.com/marketplace/actions/trigger-circleci-pipeline
|
||||||
|
trigger-circleci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5
|
||||||
|
env:
|
||||||
|
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
|
Loading…
Reference in New Issue