2017-08-26 22:07:06 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-08-26 22:25:34 -07:00
|
|
|
set -x
|
2017-10-01 08:50:53 -07:00
|
|
|
set -e
|
2017-08-26 22:25:34 -07:00
|
|
|
|
2018-03-08 08:08:50 -08:00
|
|
|
export CC=clang-6.0
|
|
|
|
export CXX=clang++-6.0
|
2017-08-26 22:07:06 -07:00
|
|
|
echo $PATH
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2018-04-03 18:40:36 -07:00
|
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)
|
|
|
|
make -j2 install
|
|
|
|
./zig build --build-file ../build.zig test
|
2017-10-01 08:11:38 -07:00
|
|
|
|
2018-04-03 17:33:33 -07:00
|
|
|
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
|
|
|
mkdir $TRAVIS_BUILD_DIR/artifacts
|
|
|
|
docker run -it --mount type=bind,source="$TRAVIS_BUILD_DIR/artifacts",target=/z ziglang/static-base:llvm6-1 -j2 $TRAVIS_COMMIT
|
|
|
|
echo "access_key = $AWS_ACCESS_KEY_ID" >> ~/.s3cfg
|
|
|
|
echo "secret_key = $AWS_SECRET_ACCESS_KEY" >> ~/.s3cfg
|
|
|
|
s3cmd put -P $TRAVIS_BUILD_DIR/artifacts/* s3://ziglang.org/builds/
|
|
|
|
touch empty
|
2018-04-13 09:16:09 -07:00
|
|
|
s3cmd put -P empty s3://ziglang.org/builds/zig-linux-x86_64-$TRAVIS_BRANCH.tar.xz --add-header="Cache-Control: max-age=0, must-revalidate" --add-header=x-amz-website-redirect-location:/builds/$(ls $TRAVIS_BUILD_DIR/artifacts)
|
2018-04-03 17:33:33 -07:00
|
|
|
fi
|