-
Notifications
You must be signed in to change notification settings - Fork 79
/
.travis.yml
66 lines (64 loc) · 4.43 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: ~> 1.0
language: python
dist: jammy
env:
global:
- PYTEST_SETTINGS="not requires_gpu and not memory_intense and not slow and not travis_slow"
- DOMAIN="vision"
- MODIFIES_PLUGIN="False"
- PLUGIN_ONLY="False"
- WEB_SUBMISSION="False"
before_install:
- pip install --upgrade pip
- pip install setuptools
- pip install pytest
# download large files
- pip install awscli
install:
- pip install --no-cache-dir torch torchvision --default-timeout=1000 --retries=5
- pip install --no-cache-dir -e ".[test]"
# install conda for plugin runner
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- pip list # list installed package versions
import:
- brain-score/core:brainscore_core/travis/script.yml@main # run tests
- brain-score/core:brainscore_core/travis/submission_failure.yml@main # if tests fail on web submission, email submitter
jobs:
include:
- name: 3.11 public
python: '3.11'
- name: 3.11 private
if: fork = false
python: '3.11'
env:
- PRIVATE_ACCESS=1
- secure: f1rWEwrslh7qa2g/QlKs001sGC3uaOxZNQSfNOPj+TMCqEo2c6OzImC4hyz+WqCyc6N/lFT4yYo2RhvaqStHMRmu/+9aZmuH05Bb0KQpfzNFA+yGa/U5WR3/4u6KRvDAeNEi9drT2LuacTyGbldmQsquujK0jrPpFWpe7zUUKv0zb0lJf0zcjeSrZlDXLlgD6DCqow7OqHRvW04dPZVy1OArRwtPV6DJ6Rqo1MqFQGHJ806VPlXhSoydb7a58dhGajqPjomdmZjhd3wS6Lv6uetTE/VVb4EP4e7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dXE=
- AWS_DEFAULT_REGION=us-east-1
- stage: "Automerge check"
python: '3.11'
install:
- pip install --no-cache-dir torch torchvision --default-timeout=1000 --retries=5
- pip install --no-cache-dir -e ".[test]"
if: type = pull_request
script:
- |
CHANGED_FILES=$( git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch && echo $(git diff --name-only origin/$TRAVIS_BRANCH...origin/$TRAVIS_PULL_REQUEST_BRANCH -C $TRAVIS_BUILD_DIR) | tr '\n' ' ' ) &&
PLUGIN_ONLY=$( python -c "from brainscore_core.plugin_management.parse_plugin_changes import is_plugin_only; is_plugin_only(\"${CHANGED_FILES}\", \"brainscore_${DOMAIN}\")" )
if [ "$PLUGIN_ONLY" = "True" ] && [ "$TRAVIS_SECURE_ENV_VARS" = true ]; then
bash ${TRAVIS_BUILD_DIR}/.github/workflows/workflow_trigger.sh $GH_WORKFLOW_TRIGGER $TRAVIS_PULL_REQUEST_SHA "Successful Travis PR build for plugin-only PR" "continuous-integration/travis";
fi
notifications:
slack:
if: |
branch = master AND \
type IN (push, api, cron)
on_success: change
on_failure: always
secure: m86mcMqLJGtsv7OQCLcSzPsxLEkVQDEsCNnJ02gLy8Lkh3bJHmOGQ9DUGyR7tACy+++N8uuBZETBK9jjcROxhlM8r0CeEvBzFbGm5lHmx+Crq5Fn3NphTDVdoPJDEgtxgFpC6ZZZaBZQ0gGDLvSyF8hkkufKJXiC5I85IIvrQDVZOnXKcDU1fUnic2xwaZlbLZGOPd1LIELYb9cG37SXW9dTxV8+9wPQLs8geRCeqhkvr2Qzqva+DXp0kTKGrpKW58ZrunLvIogIx50+4nBZOQjcz2U7IgWX1lF1OKZRTCHbBOnKMRZeexx1VS6WGLat67k9LW2p50k7rRJ/Nz1msIn4qJOpchgys4MtnC01uUG0Lpxxo1h0Y2L1nW2uvzSA55hb1Ax/5jNKP7mjAArmrjvSooYfwkSTj4rQJvWsM+NErBGTrNWgAMydItmhLN8WYyUBiTSmd6DBv0WtUAhwTMxK9ZzETrFEi8y6cTqSNY09Qi9mgrJcRnKTlhqRrtJXwwefs5wii+rwFppb3+qhlo3duYanc721RSF7kKdOvOM/K84uIIUm+SwZJjXIK4tUjBHzWKSMUX8YqhgZCMRaRqVqYqo2AR7aOJXz69SD3QyBI7+DGoR4k2QxYcWEx/iUtW/6qePRKra0rb6iH7kCcy5mycd5gjGBdk197oDKNhU=