Commit 47f8afd3 authored by Hao, Hao's avatar Hao, Hao
Browse files

git rm epics-base-7.0

parent 1a60fcb3
# Appveyor configuration file for EPICS Base 7 builds
# (see also https://github.com/epics-base/ci-scripts)
# Version format
version: base-{branch}-{build}
#---------------------------------#
# build cache #
#---------------------------------#
# The AppVeyor cache allowance is way too small (1GB per account across all projects, branches and jobs)
# to be used for the dependency builds.
cache:
- C:\Users\appveyor\.tools
#---------------------------------#
# repository cloning #
#---------------------------------#
# Called at very beginning, before repo cloning
init:
# Set autocrlf to make batch files work
- git config --global core.autocrlf true
# Set clone depth (do not fetch complete history)
clone_depth: 5
# Skipping commits affecting only specific files
skip_commits:
files:
- 'documentation/*'
- 'startup/*'
- '.github/*'
- '.tools/*'
- '.gitattributes'
- '**/*.html'
- '**/*.md'
#---------------------------------#
# build matrix configuration #
#---------------------------------#
image: Visual Studio 2015
# Build Configurations: dll/static, regular/debug
configuration:
- dynamic
- static
- dynamic-debug
- static-debug
# Environment variables: compiler toolchain, base version, setup file, ...
environment:
# common / default variables for all jobs
SETUP_PATH: .ci-local:.ci
BASE: SELF
EPICS_TEST_IMPRECISE_TIMING: YES
matrix:
- CMP: vs2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- CMP: vs2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- CMP: vs2015
- CMP: vs2013
- CMP: vs2012
- CMP: vs2010
- CMP: gcc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# Platform: processor architecture
platform:
- x86
- x64
# Matrix configuration: exclude sets of jobs
matrix:
exclude:
# VS2012 and older installs don't have the 64 bit compiler
- platform: x64
CMP: vs2012
- platform: x64
CMP: vs2010
# Exclude more jobs to reduce build time
# Skip 32-bit for "middle-aged" compilers
- platform: x86
CMP: vs2017
- platform: x86
CMP: vs2015
# MinGW debug builds use the same libraries, unlike VS
- configuration: dynamic-debug
CMP: gcc
- configuration: static-debug
CMP: gcc
#---------------------------------#
# building & testing #
#---------------------------------#
install:
- cmd: git submodule update --init --recursive
- cmd: pip install git+https://github.com/mdavidsaver/ci-core-dumper#egg=ci-core-dumper
- cmd: python .ci/cue.py prepare
build_script:
- cmd: python .ci/cue.py build
test_script:
- cmd: python -m ci_core_dumper install
- cmd: python .ci/cue.py -T 20M test
on_finish:
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- cmd: python .ci/cue.py -T 5M test-results
on_failure:
- cmd: python -m ci_core_dumper report
#---------------------------------#
# debugging #
#---------------------------------#
## if you want to connect by remote desktop to a failed build, uncomment these lines
## note that you will need to connect within the usual build timeout limit (60 minutes)
## so you may want to adjust the build matrix above to just build the one of interest
# print the connection info
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# block a failed build (until the watchdog barks)
#on_failure:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
- provider: Email
to:
- core-talk@aps.anl.gov
on_build_success: false
- provider: GitHubPullRequest
# Appveyor configuration file for EPICS Base 7 builds
# (see also https://github.com/epics-base/ci-scripts)
# branches to build
branches:
# whitelist
only:
- 7.0
- /R7\.0\.\d+.*/
# Version format
version: base-{branch}-{build}
#---------------------------------#
# build cache #
#---------------------------------#
# The AppVeyor cache allowance is way too small (1GB per account across all projects, branches and jobs)
# to be used for the dependency builds.
cache:
- C:\Users\appveyor\.tools
#---------------------------------#
# repository cloning #
#---------------------------------#
# Called at very beginning, before repo cloning
init:
# Set autocrlf to make batch files work
- git config --global core.autocrlf true
# Set clone depth (do not fetch complete history)
clone_depth: 5
# Skipping commits affecting only specific files
skip_commits:
files:
- 'documentation/*'
- 'startup/*'
- '.github/*'
- '.tools/*'
- '.gitattributes'
- '**/*.html'
- '**/*.md'
#---------------------------------#
# build matrix configuration #
#---------------------------------#
image: Visual Studio 2015
# Build Configurations: dll/static, regular/debug
configuration:
- dynamic
- static
- dynamic-debug
- static-debug
# Environment variables: compiler toolchain, base version, setup file, ...
environment:
# common / default variables for all jobs
SETUP_PATH: .ci-local:.ci
BASE: SELF
EPICS_TEST_IMPRECISE_TIMING: YES
matrix:
- CMP: vs2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- CMP: vs2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- CMP: vs2015
- CMP: vs2013
- CMP: vs2012
- CMP: vs2010
- CMP: gcc
# Platform: processor architecture
platform:
- x86
- x64
# Matrix configuration: exclude sets of jobs
matrix:
exclude:
# VS2012 and older installs don't have the 64 bit compiler
- platform: x64
CMP: vs2012
- platform: x64
CMP: vs2010
# Exclude more jobs to reduce build time
# Skip 32-bit for "middle-aged" compilers
- platform: x86
CMP: vs2017
- platform: x86
CMP: vs2015
# MinGW debug builds use the same libraries, unlike VS
- configuration: dynamic-debug
CMP: gcc
- configuration: static-debug
CMP: gcc
#---------------------------------#
# building & testing #
#---------------------------------#
install:
- cmd: git submodule update --init --recursive
- cmd: pip install git+https://github.com/mdavidsaver/ci-core-dumper#egg=ci-core-dumper
- cmd: python .ci/cue.py prepare
build_script:
- cmd: python .ci/cue.py build
test_script:
- cmd: python -m ci_core_dumper install
- cmd: python .ci/cue.py -T 20M test
on_finish:
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- cmd: python .ci/cue.py -T 5M test-results
on_failure:
- cmd: python -m ci_core_dumper report
#---------------------------------#
# debugging #
#---------------------------------#
## if you want to connect by remote desktop to a failed build, uncomment these lines
## note that you will need to connect within the usual build timeout limit (60 minutes)
## so you may want to adjust the build matrix above to just build the one of interest
# print the connection info
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# block a failed build (until the watchdog barks)
#on_failure:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
- provider: Email
to:
- core-talk@aps.anl.gov
on_build_success: false
- provider: GitHubPullRequest
#!/usr/bin/env python3
import logging
import sys
import re
from io import StringIO
_log = logging.getLogger(__name__)
def main(args):
logging.basicConfig(level=args.level)
if args.dev is True:
actions=[
('DEVELOPMENT_FLAG', '1'),
('DEV_SNAPSHOT', '-DEV'),
]
elif args.dev is False:
actions=[
('DEVELOPMENT_FLAG', '0'),
('DEV_SNAPSHOT', ''),
]
elif args.version:
M=re.match(r'R?(\d+).(\d+).(\d+)(?:.(\d+))?(-.*)?', args.version)
actions=[
('SITE_VERSION', None),
('SHORT_VERSION', None),
('MINOR_VERSION', M[2]),
('REVISION', M[2]),
('MODIFICATION', M[3]),
('MAINTENANCE_VERSION', M[3]),
('PATCH_LEVEL', M[4] or '0'),
('DEVELOPMENT_FLAG', '1' if (M[5] or '').upper().endswith('-DEV') else '0'),
('DEV_SNAPSHOT', M[5] or ''),
('MAJOR_VERSION', M[1]),
('VERSION', M[1]), # plain _VERSION must be last to resolve ambiguity
]
elif args.dry_run:
_log.debug('Print existing')
for fname in args.conf:
print('# ', fname)
with open(fname, 'r') as F:
sys.stdout.write(F.read())
return
else:
print('One of --version, --release, --dev, or --dry-run is required')
sys.exit(1)
for name, val in actions:
_log.debug('Pattern "%s" -> "%s"', name, val)
for fname in args.conf:
OUT=StringIO()
with open(fname, 'r') as F:
for line in F:
_log.debug('Line: %s', repr(line))
for name, val in actions:
M = re.match(r'(\s*[A-Z_]+' + name + r'\s*=[\t ]*)(\S*)(\s*)', line)
if M and val is None:
_log.debug('Ignore')
OUT.write(line)
break
elif M:
_log.debug(' Match %s -> %s', M.re.pattern, M.groups())
OUT.write(M[1]+val+M[3])
break
else:
_log.debug('No match')
OUT.write(line)
if args.dry_run:
print('# ', fname)
print(OUT.getvalue())
else:
with open(fname, 'w') as F:
F.write(OUT.getvalue())
def getargs():
from argparse import ArgumentParser
P = ArgumentParser()
P.add_argument('-n','--dry-run', action='store_true', default=False)
P.add_argument('-d','--debug', dest='level', action='store_const',
const=logging.DEBUG, default=logging.INFO)
P.add_argument('-V', '--version', help='A version in R1.2.3-xyz or 1.2.3 form')
P.add_argument('-D', '--dev', action='store_true', default=None)
P.add_argument('-R', '--release', dest='dev', action='store_false')
P.add_argument('conf', nargs='+',
help='A configure/CONFIG_*_VERSION file name')
return P
if __name__=='__main__':
main(getargs().parse_args())
#!/bin/bash
#
# Make tar for git repo w/ one level of sub modules.
#
set -e
die() {
echo "$1" >&2
exit 1
}
maybedie() {
if [ "$DEVMODE" ]; then
echo "Warning: $1" >&2
else
echo "Error: $1" >&2
exit 1
fi
}
usage() {
cat <<EOF >&2
usage: $0 [-v] [-s] <rev> [<outfile> [<prefix>]]
<rev> may be any git revision spec. (tag, branch, or commit id).
If provided, <outfile> must end with ".tar", ".tar.gz" or ".tar.bz2".
If <outfile> is omitted, "base-<rev>.tar.gz" will be used.
If provided, <prefix> must end with "/". If <prefix> is omitted,
the default is "base-<rev>/".
Options:
-v Enable verbose prints
-d Enable permissive developer mode
EOF
exit 1
}
export DEVMODE=
while getopts "vd" OPT
do
case "$OPT" in
v) set -x;;
d) DEVMODE=1;;
?) echo "Unknown option"
usage;;
esac
done
shift $(($OPTIND - 1))
TOPREV="$1"
FINALTAR="$2"
PREFIX="${3:-}"
[ "$TOPREV" ] || usage
case "$FINALTAR" in
"")
TAROPT=-z
FINALTAR="base-$TOPREV.tar.gz"
;;
*.tar)
TAROPT=""
;;
*.tar.gz)
TAROPT=-z
;;
*.tar.bz2)
TAROPT=-j
;;
*)
die "outfile must end with '.tar.gz' or '.tar.bz2'"
;;
esac
case "$PREFIX" in
"")
PREFIX="base-$TOPREV/"
;;
*/)
;;
*)
die "Prefix must end with '/'"
;;
esac
# Check for both <tag> and R<tag>
if ! [ `git tag -l $TOPREV` ]
then
if [ `git tag -l R$TOPREV` ]
then
TOPREV="R$TOPREV"
else
maybedie "No tags exist '$TOPREV' or 'R$TOPREV'"
fi
fi
# temporary directory w/ automatic cleanup
TDIR=`mktemp -d`
trap 'rm -rf "$TDIR"' EXIT INT QUIT TERM
mkdir "$TDIR"/tar
echo "Exporting revision $TOPREV as $FINALTAR with prefix $PREFIX"
# Use git-archive to copy files at the given revision into our temp. dir.
# Respects 'export-exclude' in .gitattributes files.
git archive --prefix=$PREFIX $TOPREV | tar -C "$TDIR"/tar -x
# use ls-tree instead of submodule-foreach to capture submodule revision associated with supermodule rev.
#
# sub-modules appear in tree as eg.:
# 160000 commit c3a6cfcf0dad4a4eeecf59b474710d06ff3eb68a modules/ca
git ls-tree -r $TOPREV | \
awk '/^[0-9]+ commit / && $4 != ".ci" {print $3, $4}' | \
while read HASH MODDIR
do
echo "Visiting $HASH $MODDIR"
if [ -e $MODDIR/.git ]
then
git -C $MODDIR archive --prefix=${PREFIX}${MODDIR}/ $HASH | tar -C "$TDIR"/tar -x
else
maybedie " Submodule not checked out."
fi
done
# make a list of files copied and filter out undesirables
(cd "$TDIR"/tar && find . -mindepth 1 -not -type d) > "$TDIR"/list.1
# Remove leading ./ from filenames
sed -i -e 's|^\./||' "$TDIR"/list.1
# Exclude files
sed \
-e '/\/\.ci\//d' \
-e '/\/\.ci-local\//d' \
-e '/\/\.tools\//d' \
-e '/\/jenkins\//d' \
-e '/\/\.git/d' \
-e '/\/\.hgtags$/d' \
-e '/\/\.cproject$/d' \
-e '/\/\.project$/d' \
-e '/\/\.travis\.yml$/d' \
-e '/\/\.appveyor\.yml$/d' \
-e '/\/\.readthedocs\.yml$/d' \
"$TDIR"/list.1 > "$TDIR"/list.2
if ! diff -U 0 "$TDIR"/list.1 "$TDIR"/list.2
then
echo "Excluding the files shown above"
fi
# Use the filtered list to build the final tar
tar -c $TAROPT -C "$TDIR"/tar -T "$TDIR"/list.2 -f "$FINALTAR"
echo "Wrote $FINALTAR"
tar -t $TAROPT -f "$FINALTAR" > "$TDIR"/list.3
# make sure we haven't picked up anything extra
if ! diff -u "$TDIR"/list.2 "$TDIR"/list.3
then
die "Oops! Tarfile diff against plan shown above"
fi
Copyright (c) 1991-2011 UChicago Argonne LLC.
Copyright (c) 1991-2006 The Regents of the University of California.
Copyright (c) 2006-2011. Los Alamos National Security, LLC. Some of this
material was produced under U.S. Government contract DE-AC52-06NA25396
for Los Alamos National Laboratory (LANL), which is operated by Los Alamos
National Security, LLC for the U.S. Department of Energy.
EPICS BASE is distributed subject to the following license conditions:
SOFTWARE LICENSE AGREEMENT
Software: EPICS BASE
1. The "Software", below, refers to EPICS BASE (in either source code, or
binary form and accompanying documentation). Each licensee is
addressed as "you" or "Licensee."
2. The copyright holders shown above and their third-party licensors
hereby grant Licensee a royalty-free nonexclusive license, subject to
the limitations stated herein and U.S. Government license rights.
3. You may modify and make a copy or copies of the Software for use
within your organization, if you meet the following conditions:
a. Copies in source code must include the copyright notice and this
Software License Agreement.
b. Copies in binary form must include the copyright notice and this
Software License Agreement in the documentation and/or other
materials provided with the copy.
4. You may modify a copy or copies of the Software or any portion of it,
thus forming a work based on the Software, and distribute copies of
such work outside your organization, if you meet all of the following
conditions:
a. Copies in source code must include the copyright notice and this
Software License Agreement;
b. Copies in binary form must include the copyright notice and this
Software License Agreement in the documentation and/or other
materials provided with the copy;
c. Modified copies and works based on the Software must carry
prominent notices stating that you changed specified portions of
the Software.
5. Portions of the Software resulted from work developed under a U.S.
Government contract and are subject to the following license: the
Government is granted for itself and others acting on its behalf a
paid-up, nonexclusive, irrevocable worldwide license in this computer
software to reproduce, prepare derivative works, and perform publicly
and display publicly.