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
17 changes: 17 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ jobs:

steps:
- checkout
- run:
name: Trigger job if modified
command: |
bash .circleci/trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*"
- <<: *pull_pytorch_stable_image
- <<: *run_pytorch_container
- <<: *install_dependencies
Expand Down Expand Up @@ -149,6 +153,10 @@ jobs:

steps:
- checkout
- run:
name: Trigger job if modified
command: |
bash .circleci/trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*"
- <<: *pull_pytorch_stable_image
- <<: *run_pytorch_container
- <<: *install_dependencies
Expand All @@ -171,6 +179,10 @@ jobs:

steps:
- checkout
- run:
name: Trigger job if modified
command: |
bash .circleci/trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*"
- <<: *pull_pytorch_stable_image
- <<: *run_pytorch_container
- <<: *install_dependencies
Expand Down Expand Up @@ -222,6 +234,10 @@ jobs:

steps:
- checkout
- run:
name: Trigger job if modified
command: |
bash .circleci/trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*"
- <<: *pull_pytorch_stable_devel_image
- <<: *run_pytorch_devel_container
- <<: *install_dependencies
Expand Down Expand Up @@ -283,6 +299,7 @@ jobs:
workflows:
version: 2
gpu_tests:

jobs:
- one_gpu_tests
- two_gpus_tests
Expand Down
45 changes: 45 additions & 0 deletions .circleci/trigger_if_modified.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

# Script is taken from https://circleci.com/developer/orbs/orb/roopakv/swissknife#commands-run_if_modified
# Usage: sh trigger_if_modified.sh <pattern> [base-branch]
# - for example: sh trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*"

if [ -z "$1" ]; then
echo "Pattern should be provided. Usage: sh trigger_if_modified.sh <pattern>"
exit 1
fi

pattern=$1

if [ -z "$2" ]; then
base_branch=master
else
base_branch=$2
fi

echo "- Pattern: ${pattern}"
echo "- Base branch: ${base_branch}"

if [ -z "$BASH" ]; then
echo Bash not installed.
exit 1
fi

git status >/dev/null 2>&1 || { echo >&2 "Not in a git directory or no git"; exit 1; }

circleci-agent >/dev/null 2>&1 || { echo >&2 "No Circle CI agent. These are in all Circle CI containers"; exit 1; }

FILES_MODIFIED=""

setcommit () {
FILES_MODIFIED=$(git diff --name-only origin/${base_branch}..HEAD | grep -i -E ${pattern})
}

setcommit || true

if [ -z "$FILES_MODIFIED" ]; then
echo "Files not modified. Halting job"
circleci-agent step halt
else
echo "Files modified: ${FILES_MODIFIED}, continuing steps"
fi
20 changes: 19 additions & 1 deletion .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
name: Format python code
on: push

on:
push:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'
pull_request:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'

jobs:
code-style:
runs-on: ubuntu-latest
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/hvd-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
name: Run Horovod tests
on: [push, pull_request]
on:
push:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'
pull_request:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'

jobs:
horovod-tests:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pytorch-version-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ jobs:
fail-fast: false
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
pytorch-version: [1.5.1, 1.4.0, 1.3.1]
pytorch-version: [1.6.0, 1.5.1, 1.4.0, 1.3.1]
exclude:
- pytorch-version: 1.3.1
python-version: 3.8
exclude:
- pytorch-version: 1.6.0
python-version: 3.5

steps:
- uses: actions/checkout@v2
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/tpu-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
name: Run TPU tests
on: [push, pull_request]
on:
push:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'
pull_request:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'


jobs:
tpu-tests:
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
on: [push, pull_request]
name: Run unit tests
on:
push:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'
pull_request:
paths-ignore:
- 'assets/**'
- '.circleci/**'
- 'docker/**'
- 'docs/**'
- 'conda.recipe'
- '**.md'

jobs:
build:
Expand Down