Skip to content

Commit bf1fd15

Browse files
committed
test: using a single command
1 parent 017756d commit bf1fd15

2 files changed

Lines changed: 39 additions & 42 deletions

File tree

.cirrus.yml

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,26 @@ jammy_task:
99
format_script:
1010
- apt update && apt install -y clang-format
1111
- ./tools/scripts/check_format.sh
12-
test_script:
13-
- export CC=clang-15
14-
- export CXX=clang++-15
15-
- apt update && apt install -y python3-venv
16-
- python3 -m venv .venv --system-site-packages
17-
- source .venv/bin/activate && pip install --quiet -r bindings/pyc3/requirements.txt
18-
- source .venv/bin/activate && bazel build
19-
--local_resources=ram=24000
20-
--local_resources=cpu=8
21-
--jobs=8
22-
--noallow_analysis_cache_discard
23-
--python_path=$(which python3)
24-
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
12+
test_script: |
13+
export CC=clang-15
14+
export CXX=clang++-15
15+
apt update && apt install -y python3-venv
16+
python3 -m venv .venv --system-site-packages
17+
source .venv/bin/activate
18+
pip install --quiet -r bindings/pyc3/requirements.txt
19+
export PYTHONPATH=$(python3 -c "import site; print(':'.join(site.getsitepackages()))")
20+
bazel build \
21+
--local_resources=ram=24000 \
22+
--local_resources=cpu=8 \
23+
--jobs=8 \
24+
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST \
2525
//...
26-
- source .venv/bin/activate && source .venv/bin/activate && bazel test
27-
--local_resources=ram=24000
28-
--local_resources=cpu=8
29-
--jobs=8
30-
--noallow_analysis_cache_discard
31-
--python_path=$(which python3)
32-
--test_output=all
33-
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
26+
bazel test \
27+
--local_resources=ram=24000 \
28+
--local_resources=cpu=8 \
29+
--jobs=8 \
30+
--test_output=all \
31+
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST \
3432
//...
3533
jammy_test_artifacts:
3634
path: "bazel-testlogs/**/test.xml"
@@ -46,28 +44,26 @@ noble_task:
4644
format_script:
4745
- apt update && apt install -y clang-format
4846
- ./tools/scripts/check_format.sh
49-
test_script:
50-
- export CC=clang-15
51-
- export CXX=clang++-15
52-
- apt update && apt install -y python3-venv
53-
- python3 -m venv .venv --system-site-packages
54-
- source .venv/bin/activate && pip install --quiet -r bindings/pyc3/requirements.txt
55-
- source .venv/bin/activate && bazel build
56-
--local_resources=ram=24000
57-
--local_resources=cpu=8
58-
--jobs=8
59-
--noallow_analysis_cache_discard
60-
--python_path=$(which python3)
61-
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
47+
test_script: |
48+
export CC=clang-15
49+
export CXX=clang++-15
50+
apt update && apt install -y python3-venv
51+
python3 -m venv .venv --system-site-packages
52+
source .venv/bin/activate
53+
pip install --quiet -r bindings/pyc3/requirements.txt
54+
export PYTHONPATH=$(python3 -c "import site; print(':'.join(site.getsitepackages()))")
55+
bazel build \
56+
--local_resources=ram=24000 \
57+
--local_resources=cpu=8 \
58+
--jobs=8 \
59+
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST \
6260
//...
63-
- source .venv/bin/activate && bazel test
64-
--local_resources=ram=24000
65-
--local_resources=cpu=8
66-
--jobs=8
67-
--test_output=all
68-
--noallow_analysis_cache_discard
69-
--python_path=$(which python3)
70-
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
61+
bazel test \
62+
--local_resources=ram=24000 \
63+
--local_resources=cpu=8 \
64+
--jobs=8 \
65+
--test_output=all \
66+
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST \
7167
//...
7268
noble_test_artifacts:
7369
path: "bazel-testlogs/**/test.xml"

bindings/pyc3/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
drake
12
numpy
23
scipy
34

0 commit comments

Comments
 (0)