Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 14 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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 && \
Expand All @@ -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
Expand Down Expand Up @@ -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 changes: 28 additions & 0 deletions .github/workflows/ci-circleci.yml
Original file line number Diff line number Diff line change
@@ -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 }}