diff --git a/util/cron/docker-chapel.bash b/util/cron/docker-chapel.bash deleted file mode 100755 index d05a1253b631..000000000000 --- a/util/cron/docker-chapel.bash +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -#This script will compile and execute helloworld inside a docker image and check if chapel is installed correctly - -# Check if chapel is installed correctly -which chpl -if [ $? -ne 0 ] -then - echo "which chpl failed inside chapel container" - exit 1 -fi - -chpl --version -if [ $? -ne 0 ] -then - echo "chpl --version failed inside chapel container" - exit 1 -fi - - -# Compile and execute chapel hello -echo 'writeln("Hello, world!");' > hello.chpl -chpl -o hello hello.chpl -if [ $? -ne 0 ] -then - echo "hello.chpl compile failed inside chapel container" - exit 1 -else - echo "hello.chpl compiled inside chapel container" -fi - -./hello -if [ $? -ne 0 ] -then - echo "./hello failed inside chapel container" - exit 1 -else - echo "./hello succeeded inside chapel container" -fi diff --git a/util/cron/docker-gasnet.bash b/util/cron/docker-gasnet.bash deleted file mode 100755 index 91687d3ab9f8..000000000000 --- a/util/cron/docker-gasnet.bash +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# This script will compile and execute hello world inside a docker-gasnet and docker-gasnet-smp container(s) and check if chapel is installed - - -#check chpl install inside chapel(gasnet/gasnet-smp) container -which chpl -if [ $? -ne 0 ] -then - echo "which chpl failed inside chapel container" - exit 1 -fi - -chpl --version -if [ $? -ne 0 ] -then - echo "chpl --version failed inside chapel container" - exit 1 -fi - - -# Compile and execute chapel hello inside the container -echo 'writeln("Hello, world!");' > hello.chpl -chpl -o hello hello.chpl -if [ $? -ne 0 ] -then - echo "hello.chpl compile failed inside chapel container" - exit 1 -else - echo "hello.chpl compiled inside chapel container" -fi - -./hello -nl 1 -if [ $? -ne 0 ] -then - echo "./hello -nl 1 failed inside chapel gasnet container" - exit 1 -else - echo "./hello -nl 1 succeeded inside chapel gasnet container" -fi - diff --git a/util/cron/test-docker.bash b/util/cron/test-docker.bash index 7dd069864410..6350730e3218 100755 --- a/util/cron/test-docker.bash +++ b/util/cron/test-docker.bash @@ -97,11 +97,8 @@ update_image() { fi # Run test script inside container - echo 'writeln("Hello, world!");' > hello.chpl docker run --rm -i "$imageName" < "$script" CONTAINER_RUN=$? - # Clean up scratch chpl file for testing - rm hello.chpl if [ $CONTAINER_RUN -ne 0 ] then @@ -121,18 +118,21 @@ update_all_images() { local release_tag="$1" cd "$CHPL_HOME" - update_image chapel/chapel "${CHPL_HOME}/util/cron/docker-chapel.bash" "$release_tag" + update_image chapel/chapel "$CHPL_HOME/util/packaging/docker/test/docker-chapel.bash" "$release_tag" cd "$CHPL_HOME/util/packaging/docker/gasnet" dockerfile_nightly_patch - update_image chapel/chapel-gasnet "${CHPL_HOME}/util/cron/docker-gasnet.bash" "$release_tag" - # Clean up after patch changes + update_image chapel/chapel-gasnet "$CHPL_HOME/util/packaging/docker/test/docker-gasnet.bash" "$release_tag" dockerfile_nightly_patch -R cd "$CHPL_HOME/util/packaging/docker/gasnet-smp" dockerfile_nightly_patch - update_image chapel/chapel-gasnet-smp "${CHPL_HOME}/util/cron/docker-gasnet.bash" "$release_tag" - # Clean up after patch changes + update_image chapel/chapel-gasnet-smp "$CHPL_HOME/util/packaging/docker/test/docker-gasnet.bash" "$release_tag" + dockerfile_nightly_patch -R + + cd "$CHPL_HOME/util/packaging/docker/gasnet-udp" + dockerfile_nightly_patch + update_image chapel/chapel-gasnet-udp "$CHPL_HOME/util/packaging/docker/test/docker-gasnet.bash" "$release_tag" dockerfile_nightly_patch -R } # END FUNCTIONS diff --git a/util/packaging/docker/gasnet-udp/Dockerfile b/util/packaging/docker/gasnet-udp/Dockerfile new file mode 100644 index 000000000000..8107d224cdf8 --- /dev/null +++ b/util/packaging/docker/gasnet-udp/Dockerfile @@ -0,0 +1,12 @@ +FROM chapel/chapel:latest + +ARG MAKE_THREADS=1 + +ENV CHPL_COMM=gasnet +ENV CHPL_COMM_SUBSTRATE=udp +ENV CHPL_LAUNCHER=amudprun + +RUN CHPL_TARGET_COMPILER=llvm make -j$MAKE_THREADS -C $CHPL_HOME +RUN CHPL_TARGET_COMPILER=gnu make -j$MAKE_THREADS -C $CHPL_HOME +RUN make -j$MAKE_THREADS -C $CHPL_HOME chpldoc test-venv mason +RUN make -j$MAKE_THREADS -C $CHPL_HOME cleanall diff --git a/util/packaging/docker/test/docker-chapel.bash b/util/packaging/docker/test/docker-chapel.bash new file mode 100755 index 000000000000..79d03467a360 --- /dev/null +++ b/util/packaging/docker/test/docker-chapel.bash @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -exuo pipefail + +which chpl +chpl --version +echo 'writeln("Hello, world!");' > hello.chpl +chpl -o hello hello.chpl +./hello diff --git a/util/packaging/docker/test/docker-gasnet.bash b/util/packaging/docker/test/docker-gasnet.bash new file mode 100755 index 000000000000..bd36627fd373 --- /dev/null +++ b/util/packaging/docker/test/docker-gasnet.bash @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -exuo pipefail + +which chpl +chpl --version +echo 'writeln("Hello, world!");' > hello.chpl +chpl -o hello hello.chpl +./hello -nl 1 +./hello -nl 2