Update maven.yml #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Set up Python3.6 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.6 | |
- name: Setup sc-docker | |
run: | | |
git clone https://github.com/Bytekeeper/sc-docker.git | |
cp it/sc-docker-support/*.dockerfile sc-docker/docker/dockerfiles | |
pushd sc-docker | |
pip3 install wheel | |
python3 setup.py bdist_wheel | |
pip3 install dist/scbw*.whl | |
cd docker | |
./build_images.sh | |
popd | |
scbw.play --install | |
- name: Install jbwapi | |
run: sh mvnw clean install | |
- name: Run test bots | |
run: | | |
sh mvnw -f it/bots/pom.xml package | |
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 | |
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) |