Add path filters to the TPU job (#14543)

This commit is contained in:
Carlos Mocholí 2022-09-07 15:55:45 +02:00 committed by GitHub
parent bda70a2f2f
commit 46519e2fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 30 deletions

View File

@ -4,33 +4,16 @@ orbs:
gcp-gke: circleci/gcp-gke@1.4.0
go: circleci/go@1.7.1
codecov: codecov/codecov@1.1.0
trigger:
tags:
include:
- '*'
branches:
include:
- "master"
- "release/*"
- "refs/tags/*"
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
parameters:
GHA_Actor:
type: string
default: ""
GHA_Action:
type: string
default: ""
GHA_Event:
type: string
default: ""
references:
@ -92,7 +75,7 @@ references:
# still the job hasn't finished, give up and return the starting
# non-zero status code.
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" && \
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 && \
@ -116,7 +99,7 @@ jobs:
- XLA_VER: 1.12
- PYTHON_VER: 3.7
- MAX_CHECKS: 1000
- CHECK_SPEEP: 5
- CHECK_SLEEP: 5
steps:
- checkout
- go/install
@ -153,10 +136,11 @@ jobs:
destination: html
workflows:
version: 2
#build-docs: # FixMe
# when: << pipeline.parameters.GHA_Action >>
# jobs:
# - build-Docs
test-on-tpus:
when: << pipeline.parameters.GHA_Action >>
jobs:
- TPU-tests

28
.github/workflows/ci-circleci.yml vendored Normal file
View File

@ -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 }}