diff --git a/.circleci/config.yml b/.circleci/config.yml index 338f71885af7..f400dc446420 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -283,6 +299,7 @@ jobs: workflows: version: 2 gpu_tests: + jobs: - one_gpu_tests - two_gpus_tests diff --git a/.circleci/trigger_if_modified.sh b/.circleci/trigger_if_modified.sh new file mode 100644 index 000000000000..ccaa128cb866 --- /dev/null +++ b/.circleci/trigger_if_modified.sh @@ -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 [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 " + 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 \ No newline at end of file diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index d8a9a2dc6278..6478d998e1ab 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -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 diff --git a/.github/workflows/hvd-tests.yml b/.github/workflows/hvd-tests.yml index 3fdc4ef0d218..994a30c8e0b5 100644 --- a/.github/workflows/hvd-tests.yml +++ b/.github/workflows/hvd-tests.yml @@ -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: diff --git a/.github/workflows/pytorch-version-tests.yml b/.github/workflows/pytorch-version-tests.yml index 85cae46c01f6..b8fe4d907122 100644 --- a/.github/workflows/pytorch-version-tests.yml +++ b/.github/workflows/pytorch-version-tests.yml @@ -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 diff --git a/.github/workflows/tpu-tests.yml b/.github/workflows/tpu-tests.yml index e203a2c4fc27..e0121a973c13 100644 --- a/.github/workflows/tpu-tests.yml +++ b/.github/workflows/tpu-tests.yml @@ -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: diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index df172b35006b..9b920a76b36b 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -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: