Skip to content

Commit

Permalink
Added .travis.yml and scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulthomson committed Apr 6, 2017
1 parent a279a49 commit 6d53363
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 7 deletions.
49 changes: 49 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

language: generic

env:
global:
- CO="chromium/3029"

matrix:
include:
- os: linux
dist: trusty
sudo: required
env: BUILD_PLATFORM="Linux-x64" Configuration="Debug"
- os: linux
dist: trusty
sudo: required
env: BUILD_PLATFORM="Linux-x64" Configuration="Release"
- os: osx
osx_image: xcode7.3
env: BUILD_PLATFORM="Darwin-x64" Configuration="Debug"
- os: osx
osx_image: xcode7.3
env: BUILD_PLATFORM="Darwin-x64" Configuration="Release"

install:
- ./1-install-deps-travis.sh
- export PATH=/data/bin:$PATH

script:
- echo Building ${CO}
- git clone https://github.com/google/angle.git
- wget https://storage.googleapis.com/chrome-infra/depot_tools.zip
- 7z x depot_tools.zip -odepot_tools
- export PATH=$(pwd)/depot_tools:$PATH
- gclient
- export GYP_GENERATORS=ninja
- cd angle
- git checkout ${CO}
- python scripts/bootstrap.py
- gclient sync
- git checkout ${CO}
- ninja -C "out/${Configuration}"
- cd ..

after_success:
- cd angle/out
- INSTALL_DIR="${Configuration}" COMMIT_ID="${TRAVIS_COMMIT}" RELEASE_ZIP="${BUILD_PLATFORM}-${Configuration}" ../../3-release-travis.sh


File renamed without changes.
30 changes: 30 additions & 0 deletions 1-install-deps-travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
set -x
set -e
set -u

sudo mkdir -p /data/bin
sudo chmod uga+rwx /data/bin

GITHUB_RELEASE_TOOL_USER="paulthomson"
GITHUB_RELEASE_TOOL_VERSION="v1.0.9.1"


if [ "$(uname)" == "Darwin" ];
then
brew install p7zip
GITHUB_RELEASE_TOOL_ARCH="darwin_amd64"
fi

if [ "$(uname)" == "Linux" ];
then
sudo apt-get update
sudo apt-get -y install g++ git wget zip tar p7zip-full libxi-dev libgl1-mesa-dev libpci-dev
GITHUB_RELEASE_TOOL_ARCH="linux_amd64"
fi

pushd /data/bin
wget "https://github.com/${GITHUB_RELEASE_TOOL_USER}/github-release/releases/download/${GITHUB_RELEASE_TOOL_VERSION}/github-release_${GITHUB_RELEASE_TOOL_VERSION}_${GITHUB_RELEASE_TOOL_ARCH}.tar.gz"
tar xf "github-release_${GITHUB_RELEASE_TOOL_VERSION}_${GITHUB_RELEASE_TOOL_ARCH}.tar.gz"
popd

7 changes: 4 additions & 3 deletions 3-release.sh → 3-release-appveyor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ set -u


echo "${INSTALL_DIR}"
COMMIT_ID="${APPVEYOR_REPO_COMMIT}"
echo "${COMMIT_ID}"
echo "${RELEASE_ZIP}"

cd "${INSTALL_DIR}"
7z a "../${INSTALL_DIR}.zip" "*.*"
7z a "../${RELEASE_ZIP}.zip" *.*
cd ..

github-release \
paulthomson/build-angle \
"v-${COMMIT_ID}" \
"${COMMIT_ID}" \
"$(echo -e "Automated build.\n$(git log --graph -n 3 --abbrev-commit --pretty='format:%h - %s <%an>')")" \
"${INSTALL_DIR}.zip"
"${RELEASE_ZIP}.zip"

24 changes: 24 additions & 0 deletions 3-release-travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -x
set -e
set -u

shopt -s extglob


echo "${INSTALL_DIR}"
echo "${COMMIT_ID}"
echo "${RELEASE_ZIP}"

cd "${INSTALL_DIR}"
# All files except "obj" dir
7z a "../${RELEASE_ZIP}.zip" !(obj)
cd ..

github-release \
paulthomson/build-angle \
"v-${COMMIT_ID}" \
"${COMMIT_ID}" \
"$(echo -e "Automated build.\n$(git log --graph -n 3 --abbrev-commit --pretty='format:%h - %s <%an>')")" \
"${RELEASE_ZIP}.zip"

10 changes: 6 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ clone_depth: 5
skip_tags: true

configuration:
- Debug
- Release
- Debug

platform:
- x64
# - x86

install:
- set BRANCH_TO_CO=chromium/3029
- echo Building branch %BRANCH_TO_CO%
- bash 1-install.sh
- echo Building %BRANCH_TO_CO%
- bash 1-install-deps-appveyor.sh
- refreshenv
- set PATH=%cd%\temp;%PATH%
- git clone https://github.com/google/angle.git
Expand All @@ -45,5 +45,7 @@ build_script:
on_success:
- cd angle\gyp
- set INSTALL_DIR=%Configuration%_%Platform%
- bash ..\..\3-release.sh
- set RELEASE_ZIP=MSVC2015-%Configuration%-%Platform%
- set COMMIT_ID=%APPVEYOR_REPO_COMMIT%
- bash ..\..\3-release-appveyor.sh

0 comments on commit 6d53363

Please sign in to comment.