-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_s2s.sh
executable file
·49 lines (42 loc) · 1.28 KB
/
update_s2s.sh
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
#!/bin/bash -e
integration=$1
file=$2
binaries=$3
backend_compile=$4
target=$5
workflow_link=$6
api_key=$7
export VERSION=$binaries # set the branch to pull the binaries from
export IVY_KEY=$api_key
pip3 install -e ivy/
cd ivy-integration-tests
pip3 install -r requirements.txt
pip3 install color-operations
pip3 install onnx
if [ "$integration" = "transformers" ]; then
pip3 install tf_keras
pip3 install datasets
pip3 install transformers
fi
# get the nightly binaries
python << 'EOF'
import ivy
ivy.utils.cleanup_and_fetch_binaries()
EOF
# runs the tests on the latest ivy commit, and the linux binaries that are built nightly
set +e
if [ "$backend_compile" = "T" ]; then
touch test_logs.txt
DEBUG=0 COLUMNS=200 pytest $integration/$file.py --backend-compile --source-to-source --target=$target -p no:warnings --tb=long --json-report --json-report-file=test_report.json
pytest_exit_code=$?
else
DEBUG=0 COLUMNS=200 pytest $integration/$file.py -p no:warnings --source-to-source --target=$target --tb=long --json-report --json-report-file=test_report.json > test_logs.txt
pytest_exit_code=$?
fi
set -e
if [ $pytest_exit_code -eq 0 ] || [ $pytest_exit_code -eq 1 ]; then
python report_file_to_txt.py --workflow-link $workflow_link
exit 0
else
exit 1
fi