File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 99#
1010# If you want to customize it or adapt the checks, just add or remove it from/ to the ACTIONS
1111
12+ # Preparation steps run before the first action is executed
13+ # Typically we clear here the python cache to prevent dirty
14+ # test results from cached python programs.
15+ PRE_GLOBAL=(" clear_pycache" )
16+
17+ # Postprocessing steps run after the last ACTION has finished
18+ POST_GLOBAL=()
19+
20+ # Preprocessing steps run before each action is executed
21+ PRE_ACT=()
22+
23+ # Postprocessing steps run after each action is executed
24+ POST_ACT=()
1225
1326ACTIONS=(" cargo build" " cargo build --release" " cargo fmt --all" " cargo clippy --all -- -Dwarnings" " cargo test --all" " cargo run --release -- -m test -v" " cd tests" " pytest" " cd .." )
1427
1528# Usually, there should be no need to adapt the remaining file, when adding or removing actions.
1629
30+ # clears the python cache or RustPython
31+ clear_pycache () { find . -name __pycache__ -type d -exec rm -r {} \; ; }
1732
1833RUSTPYTHONPATH=Lib
1934export RUSTPYTHONPATH
2035
2136ACT_RES=0
2237FAILS=()
2338
39+ for pre in " ${PRE_GLOBAL[@]} " ; do
40+ $pre
41+ done
42+
2443for act in " ${ACTIONS[@]} " ; do
44+
45+ for pre in " ${PRE_ACTION[@]} " ; do
46+ $pre
47+ done
48+
2549 $act
2650 if ! [ $? -eq 0 ]; then
2751 ACT_RES=1
2852 FAILS+=(" ${act} " )
2953 fi
54+
55+ for pst in " ${POST_ACTION[@]} " ; do
56+ $pst
57+ done
58+ done
59+
60+ for pst in " ${OST_GLOBAL[@]} " ; do
61+ $pst
3062done
3163
3264echo
You can’t perform that action at this time.
0 commit comments