Commit feac979e authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Update the generating CI

Now the script uses the new programs, and fails when all generations
failed for a specific category.
parent c0bcfa32
Pipeline #160591 failed with stages
in 17 minutes and 9 seconds
......@@ -6,20 +6,24 @@ version=$(cat ../dist/version)
for n_players in 3 4 5
do
>&2 echo "Generating $seed for version $version, $n_players players"
(tarot --generate=mcts -n $n_players -s $seed > $seed-${n_players}p.tarot-t \
&& mv $seed-${n_players}p.tarot-t dataset/generated/mcts/$seed-${n_players}p.tarot) \
(tarot-deal -n $n_players -s $seed | tarot-mcts --generate -s $seed > $seed-${n_players}p.tarot-t \
&& mv $seed-${n_players}p.tarot-t dataset/generated/mcts/$seed-${n_players}p.tarot \
&& echo "no" > /tmp/all-mcts-${n_players}p-failed) \
|| >&2 echo "It failed."
(tarot --generate=stacking -n $n_players -s $version-$seed > $seed-${n_players}p.tarot-t \
&& mv $seed-${n_players}p.tarot-t dataset/generated/stacking/$version-$seed-${n_players}p.tarot) \
(tarot-deal -n $n_players -s $seed | tarot-stacking --generate > $seed-${n_players}p.tarot-t \
&& mv $seed-${n_players}p.tarot-t dataset/generated/stacking/$version-$seed-${n_players}p.tarot \
&& echo "no" > /tmp/all-stacking-${n_players}p-failed) \
|| >&2 echo "It failed."
if [ "x$n_players" = "x5" ]
then
>&2 echo "Generating $seed for verision $version, 5 players with call"
(tarot --generate=mcts -n 5 -c -s $seed > $seed-5pc.tarot-t \
&& mv $seed-5pc.tarot-t dataset/generated/mcts/$seed-5pc.tarot) \
(tarot-deal -n 5 -c -s $seed | tarot-mcts --generate -s $seed > $seed-5pc.tarot-t \
&& mv $seed-5pc.tarot-t dataset/generated/mcts/$seed-5pc.tarot \
&& echo "no" > /tmp/all-mcts-5pc-failed) \
|| >&2 echo "It failed."
(tarot --generate=stacking -n 5 -c -s $version-$seed > $seed-5pc.tarot-t \
&& mv $seed-5pc.tarot-t dataset/generated/stacking/$version-$seed-5pc.tarot) \
(tarot-deal -n 5 -c -s $seed | tarot-stacking --generate > $seed-5pc.tarot-t \
&& mv $seed-5pc.tarot-t dataset/generated/stacking/$version-$seed-5pc.tarot \
&& echo "no" > /tmp/all-stacking-5pc-failed) \
|| >&2 echo "It failed."
fi
done
......@@ -50,6 +50,14 @@ mkdir -p dataset/generated/mcts || exit 1
mkdir -p dataset/generated/stacking || exit 1
seq 1 10 | parallel ../tarot-$VERSION/ci/generate-seed.sh {}
for check in /tmp/all-*-*-failed
do
if test "x$(cat $check)" != "xno"
then
echo "Could not generate anything for test '$check'."
exit 1
fi
done
if test "x$CI_COMMIT_TAG" != "x" \
|| test "x$CI_COMMIT_REF_NAME" = "xmaster" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment