Skip to content

Commit 7378d6c

Browse files
authored
Update maven.yml
1 parent 05f1be6 commit 7378d6c

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/maven.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,26 @@ jobs:
1313
uses: actions/setup-java@v1
1414
with:
1515
java-version: 1.8
16-
- name: Build with Maven
17-
run: mvn -B test
16+
- name: Set up Python3.6
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.6
20+
- name: Setup sc-docker
21+
run: |
22+
git clone https://github.com/Bytekeeper/sc-docker.git
23+
cp it/sc-docker-support/*.dockerfile sc-docker/docker/dockerfiles
24+
pushd sc-docker
25+
python3 setup.py bdist_wheel
26+
pip3 install dist/scbw*.whl
27+
'[ ! -f /tmp/sc-docker/starcraft.zip ] || (cp /tmp/sc-docker/starcraft.zip scbw/local_docker && echo "Using cached starcraft.zip")'
28+
cd docker
29+
./build_images.sh
30+
popd
31+
"[ -f /tmp/sc-docker/starcraft.zip ] || cp sc-docker/scbw/local_docker/starcraft.zip /tmp/sc-docker/starcraft.zip"
32+
scbw.play --install
33+
- name: Run Integration Test
34+
- run: |
35+
sh mvnw clean install
36+
sh mvnw -f it/bots/pom.xml package
37+
for bot in $(ls -d it/bots/*/); do BOTNAME=$(basename $bot); echo "Setting up $BOTNAME"; mkdir -p "$HOME/.scbw/bots/$BOTNAME/AI" "$HOME/.scbw/bots/$BOTNAME/read" "$HOME/.scbw/bots/$BOTNAME/write"; cp it/sc-docker-support/BWAPI.dll "$HOME/.scbw/bots/$BOTNAME"; cp "$bot/target/"*-with-dependencies.jar "$HOME/.scbw/bots/$BOTNAME/AI"; cp "$bot/bot.json" "$HOME/.scbw/bots/$BOTNAME"; done
38+
scbw.play --headless --bots jbwapibot SittingDuck --timeout 180 --docker_image starcraft:game 2>&1 | grep 'Winner is BotPlayer:jbwapibot:T' || (cat $HOME/.scbw/games/*/logs_0/* && false)

0 commit comments

Comments
 (0)