File tree Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 12
12
env :
13
13
RUST_BACKTRACE : 1
14
14
jobs :
15
- test :
16
- name : Test
15
+ rust-tests :
16
+ name : Rust tests
17
17
18
18
runs-on : ${{ matrix.os }}
19
19
strategy :
65
65
run : |
66
66
set -e
67
67
cd $GITHUB_WORKSPACE
68
- python ci/build_and_run_tests.py
68
+ python ci/build_and_run_tests.py --rust-only
69
+ shell : bash
70
+ cpp-tests :
71
+ name : C++ tests
72
+ runs-on : ${{ matrix.os }}
73
+ strategy :
74
+ fail-fast : false
75
+
76
+ matrix :
77
+ os : [ubuntu-latest, macos-latest]
78
+ steps :
79
+ - uses : actions/checkout@v2
80
+ with :
81
+ submodules : ' recursive'
82
+ - uses : actions/setup-python@v2
83
+ with :
84
+ python-version : ' 3.8.2'
85
+ - uses : jwlawson/actions-setup-cmake@v1.0
86
+ with :
87
+ cmake-version : ' 3.9.6'
88
+ github-api-token : ${{ secrets.GITHUB_TOKEN }}
89
+ - name : Run tests
90
+ run : |
91
+ set -e
92
+ cd $GITHUB_WORKSPACE
93
+ python ci/build_and_run_tests.py --cpp-only
69
94
shell : bash
70
95
# Detect cases where documentation links don't resolve and such.
71
96
doc :
Original file line number Diff line number Diff line change @@ -47,8 +47,17 @@ def build_and_test_rust_part(src_root: str):
47
47
def main ():
48
48
ci_dir = Path (get_src_root_path (sys .argv [0 ]))
49
49
src_root = ci_dir .parent
50
- build_and_test_cpp_part (src_root )
51
- build_and_test_rust_part (src_root )
50
+ CPP_TESTS = "cpp"
51
+ RUST_TESTS = "rust"
52
+ tests = set ([CPP_TESTS , RUST_TESTS ])
53
+ if len (sys .argv ) >= 2 and sys .argv [1 ] == "--rust-only" :
54
+ tests = set ([RUST_TESTS ])
55
+ if len (sys .argv ) >= 2 and sys .argv [1 ] == "--cpp-only" :
56
+ tests = set ([CPP_TESTS ])
57
+ if CPP_TESTS in tests :
58
+ build_and_test_cpp_part (src_root )
59
+ if RUST_TESTS in tests :
60
+ build_and_test_rust_part (src_root )
52
61
53
62
if __name__ == "__main__" :
54
63
main ()
You can’t perform that action at this time.
0 commit comments