Skip to content

Commit

Permalink
i#2861: Build cronbuilds as official packages
Browse files Browse the repository at this point in the history
Switches to a separate invocation of package.cmake for cronbuilds, to
make them look like release packages.

Checks out Dr. Memory to include it in the package.

Fixes #2861
  • Loading branch information
derekbruening committed Feb 9, 2020
1 parent 55172f9 commit 75de953
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
9 changes: 7 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2017-2019 Google, Inc. All rights reserved.
# Copyright (c) 2017-2020 Google, Inc. All rights reserved.
# **********************************************************

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -108,9 +108,14 @@ build_script:
# We disable test running for these package builds in runsuite.cmake by
# looking for $APPVEYOR_REPO_TAG=="true".
artifacts:
- path: 'build\build_*\DynamoRIO*.zip'
- path: 'DynamoRIO*.zip'
name: DR.zip
type: zip
before_deploy:
- git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
- cd drmemory
- git submodule update --init --depth 2
- cd ..
deploy:
provider: GitHub
auth_token:
Expand Down
39 changes: 27 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2016-2019 Google, Inc. All rights reserved.
# Copyright (c) 2016-2020 Google, Inc. All rights reserved.
# **********************************************************

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -55,23 +55,28 @@ language:
jobs:
include:
# 32-bit Linux build with gcc and run tests:
- os: linux
- if: env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=yes EXTRA_ARGS="32_only package"
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS="32_only"
# 64-bit Linux build with gcc and run tests:
- os: linux
- if: env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=yes EXTRA_ARGS="64_only package"
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS="64_only"
# AArchXX cross-compile with gcc, no tests:
- os: linux
- if: env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=yes DEPLOY=no
# Android ARM cross-compile with gcc, no tests:
- os: linux
- if: env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_ANDROID_ONLY=yes DEPLOY=no DYNAMORIO_ANDROID_TOOLCHAIN='/tmp/android-gcc-arm-ndk-10e'
# 32-bit Linux build with clang, no tests (runsuite.cmake disables the tests):
- os: linux
- if: env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: clang
# We need clang 9.0 to avoid a compiler bug: i#3989.
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS=32_only CC=clang-9 && CXX=clang++-9
Expand All @@ -85,7 +90,8 @@ jobs:
- clang-9
# 64-bit Linux build with clang, no tests (runsuite.cmake disables the tests),
# install and require clang-format:
- os: linux
- if: env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: clang
# We need clang 9.0 to avoid a compiler bug: i#3989.
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS="64_only require_format" CC=clang-9 && CXX=clang++-9
Expand All @@ -99,11 +105,18 @@ jobs:
- clang-9
- clang-format-6.0
# 32-bit OSX build with clang and run tests:
- os: osx
- if: env(TRAVIS_EVENT_TYPE) != cron
os: osx
# gcc on Travis claims to not be CMAKE_COMPILER_IS_GNUCC so we only run clang.
compiler: clang
# We do not have 64-bit support on OSX yet (i#1979).
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS=32_only
# Package builds.
- if: env(TRAVIS_EVENT_TYPE) = cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=yes
# TODO i#3002: Build packages for AArchXX.

# For C/C++ there is no default install, so we set "install", not "before_install".
install:
Expand Down Expand Up @@ -150,6 +163,8 @@ script:
before_deploy:
- git config --local user.name "Travis Auto-Tag"
- git config --local user.email "dynamorio-devs@googlegroups.com"
- git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
- cd drmemory && git submodule update --init --depth 2 && cd ..
# XXX: for now we duplicate this version number here with CMakeLists.txt.
# We should find a way to share (xref i#1565).
# We support setting TAG_SUFFIX on triggered builds so we can have
Expand All @@ -161,12 +176,12 @@ deploy:
api_key:
secure: V3kgcRiwijjpmcSuVio1+/oZ8cqJGaVlL42hN0w/jjO6LoELy2kknT5h80H7wMVKpZnMg+2v/yWj5hawlrwh8nCS51lYllPHN7K+ivzkyJ3R4cp1WAzL56vnYFYz1/twYpeS10Zl6JL6wt788WcibpShMOIlAnXnm1kU9BBVtYE=
file_glob: true
file: "build*/DynamoRIO*.tar.gz"
file: "DynamoRIO*.tar.gz"
skip_cleanup: true
# The name must just be the tag in order to match Appveyor.
name: $GIT_TAG
# This body is clobbered by Appveyor.
body: "Auto-generated periodic build (Travis build $TRAVIS_BUILD_NUMBER). Unlike official release builds, Dr. Memory is not included in this build, and i686 is separated from x86_64 rather than combined in one package."
body: "Auto-generated periodic build (Travis build $TRAVIS_BUILD_NUMBER)."
on:
repo: DynamoRIO/dynamorio
branch: master
Expand Down
6 changes: 6 additions & 0 deletions suite/runsuite_wrapper.pl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
$res .= $_;
}
close(CHILD);
} elsif ($ENV{'TRAVIS_EVENT_TYPE'} eq 'cron' OR
$ENV{'APPVEYOR_REPO_TAG'} eq 'true') {
# A package build.
$standard_args = "invoke=${mydir}/../drmemory/package.cmake;drmem_only";
$args =~ s/^,/;/;
system("ctest -VV -S \"${mydir}/../make/package.cmake,${standard_args}${args}\" 2>&1");
} else {
# We have no way to access the log files, so we can -VV to ensure
# we can diagnose failures, but it makes for a large online result
Expand Down

0 comments on commit 75de953

Please sign in to comment.