Skip to content

Commit

Permalink
Update test-build-deploy.sh to fix lint (minerllabs#497)
Browse files Browse the repository at this point in the history
* Update test script to address linting issues

* Change upload location for pre-built wheel

* Update base forge config to new default

* Remove branch from path

* Remove old comments
  • Loading branch information
brandonhoughton authored May 16, 2021
1 parent 9ac2ecc commit 9ec1c63
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 65 deletions.
126 changes: 66 additions & 60 deletions minerl/Malmo/Minecraft/run/config/forge.cfg
Original file line number Diff line number Diff line change
@@ -1,78 +1,84 @@
# Configuration file

client {
# Replace the vanilla bucket models with Forges own dynamic bucket model. Unifies bucket visuals if a mod uses the Forge bucket model.
B:replaceVanillaBucketModel=false
# Replace the vanilla bucket models with Forges own dynamic bucket model. Unifies bucket visuals if a mod uses the Forge bucket model.
B:replaceVanillaBucketModel=false

# Toggle off to make missing model text in the gui fit inside the slot.
B:zoomInMissingModelTextInGui=false
# Toggle off to make missing model text in the gui fit inside the slot.
B:zoomInMissingModelTextInGui=false

# The timestamp of the last reminder to update to Java 8 in number of milliseconds since January 1, 1970, 00:00:00 GMT. Nag will show only once every 24 hours. To disable it set this to some really high number.
D:java8Reminder=0.0
# The timestamp of the last reminder to update to Java 8 in number of milliseconds since January 1, 1970, 00:00:00 GMT. Nag will show only once every 24 hours. To disable it set this to some really high number.
D:java8Reminder=0

# Disable culling of hidden faces next to stairs and slabs. Causes extra rendering, but may fix some resource packs that exploit this vanilla mechanic.
B:disableStairSlabCulling=false
# Disable culling of hidden faces next to stairs and slabs. Causes extra rendering, but may fix some resource packs that exploit this vanilla mechanic.
B:disableStairSlabCulling=false

# Enable forge to queue all chunk updates to the Chunk Update thread. May increase FPS significantly, but may also cause weird rendering lag. Not recommended for computers without a significant number of cores available.
B:alwaysSetupTerrainOffThread=false
# Enable forge to queue all chunk updates to the Chunk Update thread. May increase FPS significantly, but may also cause weird rendering lag. Not recommended for computers without a significant number of cores available.
B:alwaysSetupTerrainOffThread=false
}


general {
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.
B:disableVersionCheck=false

# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024
I:clumpingThreshold=64

# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipes. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI.
B:sortRecipies=true

# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringEntities=false

# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringTileEntities=false

# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticeable differences in mechanics so default is vanilla behavior. Default: false
B:fullBoundingBoxLadders=false

# Control the range of sky blending for colored skies in biomes.
I:biomeSkyBlendRange <
2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
>

# Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.
D:zombieBaseSummonChance=0.1

# Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.
D:zombieBabyChance=0.05

# Enable the forge block rendering pipeline - fixes the lighting of custom models.
B:forgeLightPipelineEnabled=true
B:enableGlobalConfig=false
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.
B:disableVersionCheck=false

# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024
I:clumpingThreshold=64

# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipes. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI.
B:sortRecipies=true

# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringEntities=false

# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringTileEntities=false

# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticeable differences in mechanics so default is vanilla behavior. Default: false
B:fullBoundingBoxLadders=false

# Control the range of sky blending for colored skies in biomes.
I:biomeSkyBlendRange <
2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
>

# Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.
D:zombieBaseSummonChance=0.1

# Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.
D:zombieBabyChance=0.05

# Enable the forge block rendering pipeline - fixes the lighting of custom models.
B:forgeLightPipelineEnabled=true

# Log cascading chunk generation issues during terrain population.
B:logCascadingWorldGeneration=true

# The time in ticks the server will wait when a dimension was queued to unload. This can be useful when rapidly loading and unloading dimensions, like e.g. throwing items through a nether portal a few time per second.
I:dimensionUnloadQueueDelay=0
B:enableGlobalConfig=false
}


version_checking {
# Enable the entire mod update check system. This only applies to mods using the Forge system.
B:Global=true
# Enable the entire mod update check system. This only applies to mods using the Forge system.
B:Global=true
}


12 changes: 7 additions & 5 deletions scripts/test_build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ set -ex
export PATH=$JAVA_HOME/bin:$PATH
# env variables controlling the build version and location in GCS
export MINERL_VERSION_NUMBER=0.3.7
export DATE_SHORT=$(date +%Y%m%d-%H%M)
export MINERL_BUILD_VERSION=${MINERL_VERSION_NUMBER}+openai.git.${BUILDKITE_COMMIT:0:7}.date.${DATE_SHORT}
export MINERL_BUILD_VERSION="$BUILDKITE_COMMIT"

# Adding a single head directly to the init.sh to avoid zombificiaiton from xvfb-run.
Xvfb :0 -screen 0 1024x768x24 &

#!/bin/bash
set -ex
mkdir -p $MINERL_DATA_ROOT
mkdir -p "$MINERL_DATA_ROOT"

# First, we run the tests in the repo
pip install -e .

# Copy data to the ci machines if needed for tests
#az storage copy -s $AZ_MINERL_DATA -d $MINERL_DATA_ROOT --recursive --subscription sci

pytest . -n 2
Expand All @@ -37,8 +38,9 @@ pip list
cur_dir=$(pwd)
cd ..
python -c "import minerl; import gym, logging; logging.basicConfig(level=logging.DEBUG); env=gym.make('minerl:MineRLTreechop-v0', is_fault_tolerant=False); env.reset(); env.close()"
cd $cur_dir
cd "$cur_dir"
# Finally, if this is not a cron build, we deploy the wheel
# TODO This may fail on subsequent builds with the same commit ID
if [ "$BUILDKITE_SOURCE" != "schedule" ]; then
az storage copy --subscription sci -s dist/* -d $AZ_UPLOAD_LOCATION/$BUILDKITE_BRANCH/${MINERL_VERSION_NUMBER}-${DATE_SHORT}-${BUILDKITE_COMMIT:0:7}/$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)/
az storage copy --subscription sci -s dist/* -d "$AZ_UPLOAD_LOCATION"/
fi

0 comments on commit 9ec1c63

Please sign in to comment.