zig/ci/travis_linux_script

24 lines
836 B
Plaintext
Raw Normal View History

2017-08-26 22:07:06 -07:00
#!/bin/sh
2017-08-26 22:25:34 -07:00
set -x
set -e
2017-08-26 22:25:34 -07: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
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j2 install
./zig build --build-file ../build.zig test
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
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