travis: better s3 artifacts

master
Andrew Kelley 2018-04-03 20:33:33 -04:00
parent 9dfd1a7c8a
commit 2676da61a6
3 changed files with 13 additions and 14 deletions

View File

@ -1,17 +1,11 @@
sudo: required
services:
- docker
addons:
artifacts:
working_dir: artifacts
target_paths:
- /builds
os:
- linux
- osx
dist: trusty
osx_image: xcode8.3
sudo: required
language: cpp
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ci/travis_linux_before_install; fi

View File

@ -4,4 +4,4 @@ set -x
sudo apt-get remove -y llvm-*
sudo rm -rf /usr/local/*
sudo apt-get install -y clang-6.0 libclang-6.0 libclang-6.0-dev llvm-6.0 llvm-6.0-dev liblld-6.0 liblld-6.0-dev cmake wine1.6-amd64
sudo apt-get install -y clang-6.0 libclang-6.0 libclang-6.0-dev llvm-6.0 llvm-6.0-dev liblld-6.0 liblld-6.0-dev cmake wine1.6-amd64 s3cmd

View File

@ -8,11 +8,16 @@ export CXX=clang++-6.0
echo $PATH
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)
make -j2 install
./zig build --build-file ../build.zig test
# cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)
# make -j2 install
# ./zig build --build-file ../build.zig test
cd $TRAVIS_BUILD_DIR
rm .gitignore
git clean -fd
docker run -it --mount type=bind,source="$TRAVIS_BUILD_DIR",target=/z ziglang/static-base:llvm6-1 -j2 $TRAVIS_COMMIT
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=x-amz-website-redirect-location:/builds/$(ls $TRAVIS_BUILD_DIR/artifacts)
fi