File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 9595 args : --workspace --no-fail-fast
9696 env :
9797 RUST_BACKTRACE : full
98+
99+ expander_test :
100+ strategy :
101+ fail-fast : false
102+ matrix :
103+ toolchain :
104+ - 1.42.0-x86_64-unknown-linux-gnu
105+ - stable-x86_64-unknown-linux-gnu
106+
107+ name : Expand_test (${{ matrix.toolchain }})
108+ runs-on : ubuntu-18.04
109+
110+ steps :
111+ - name : Checkout
112+ uses : actions/checkout@v2
113+
114+ - name : expand.py tests
115+ run : bash ./.github/workflows/test-expand.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ TEST_MODULES=(convolution dsu fenwicktree lazysegtree math maxflow mincostflow modint scc segtree string twosat)
4+ TMP_PATH=$( mktemp -d)
5+ SCRIPT_DIR=$( cd $( dirname $0 ) ; pwd)
6+ TEST_FILE=" test.rs"
7+ FILE_HEAD=" fn main() {}"
8+
9+ for MODULE in ${TEST_MODULES[@]} ; do
10+ python3 $SCRIPT_DIR /../../expand.py $MODULE > $TMP_PATH /$TEST_FILE
11+ echo $FILE_HEAD >> $TMP_PATH /$TEST_FILE
12+ rustc $TMP_PATH /$TEST_FILE 2> /dev/null
13+ if [ $? -ne 0 ]; then
14+ echo " Error compiling for $MODULE "
15+ exit 1
16+ else
17+ echo " Test passed($MODULE )"
18+ fi
19+ done
You can’t perform that action at this time.
0 commit comments