Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5764601630 | ||
|
|
0c2f903516 | ||
|
|
822293de04 | ||
|
|
6702a8a19c | ||
|
|
7c29683ad5 | ||
|
|
2bcd84a01c | ||
|
|
c6df7df2bd | ||
|
|
8bf77eba0c | ||
|
|
5b123f4e88 | ||
|
|
349eb9434d | ||
|
|
2464284271 | ||
|
|
13b7f097c1 | ||
|
|
2464f82ce6 | ||
|
|
9a94f4712b | ||
|
|
028b752cb2 | ||
|
|
3db08b5977 | ||
|
|
99057a5ff6 | ||
|
|
c734d558c2 | ||
|
|
b047a6c641 | ||
|
|
9183238f9d | ||
|
|
3ff483a1bb | ||
|
|
495f8622cd | ||
|
|
e7b1214d09 | ||
|
|
2016cb2ae7 | ||
|
|
cef930dd06 | ||
|
|
fa2a1e1d39 | ||
|
|
aa25701c58 | ||
|
|
5d7e82256c | ||
|
|
ad8dd4a136 | ||
|
|
fe8a9f5953 | ||
|
|
7d9d426629 | ||
|
|
2929ee2a03 |
@@ -148,7 +148,7 @@ build_script:
|
||||
- cmd: python cue.py build
|
||||
|
||||
test_script:
|
||||
- cmd: python cue.py test
|
||||
- cmd: python cue.py -T 15M test
|
||||
- cmd: python cue.py test-results
|
||||
|
||||
#---------------------------------#
|
||||
|
||||
46
.github/workflows/build-and-test.yml
vendored
46
.github/workflows/build-and-test.yml
vendored
@@ -46,7 +46,38 @@ jobs:
|
||||
- name: Build main module (example app)
|
||||
run: python cue.py build
|
||||
- name: Run main module tests
|
||||
run: python cue.py test
|
||||
run: python cue.py -T 15M test
|
||||
- name: Collect and show test results
|
||||
run: python cue.py test-results
|
||||
|
||||
build-linux-old:
|
||||
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-16.04]
|
||||
cmp: ["gcc-4.8", "gcc-4.9"]
|
||||
configuration: [default, static]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: "apt-get install ${{ matrix.cmp }}"
|
||||
run: |
|
||||
export GCC_NAME="${{ matrix.cmp }}"
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install software-properties-common
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install g++-${GCC_NAME#gcc-}
|
||||
- name: Prepare and compile dependencies
|
||||
run: python cue.py prepare
|
||||
- name: Build main module (example app)
|
||||
run: python cue.py build
|
||||
- name: Run main module tests
|
||||
run: python cue.py -T 15M test
|
||||
- name: Collect and show test results
|
||||
run: python cue.py test-results
|
||||
|
||||
@@ -69,7 +100,7 @@ jobs:
|
||||
- name: Build main module (example app)
|
||||
run: python cue.py build
|
||||
- name: Run main module tests
|
||||
run: python cue.py test
|
||||
run: python cue.py -T 15M test
|
||||
- name: Collect and show test results
|
||||
run: python cue.py test-results
|
||||
|
||||
@@ -97,7 +128,7 @@ jobs:
|
||||
- name: Build main module (example app)
|
||||
run: python cue.py build
|
||||
- name: Run main module tests
|
||||
run: python cue.py test
|
||||
run: python cue.py -T 15M test
|
||||
- name: Collect and show test results
|
||||
run: python cue.py test-results
|
||||
|
||||
@@ -108,14 +139,15 @@ jobs:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
RTEMS: ${{ matrix.rtems }}
|
||||
RTEMS_TARGET: RTEMS-pc686-qemu
|
||||
APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-18.04]
|
||||
os: [ubuntu-20.04]
|
||||
cmp: [gcc]
|
||||
configuration: [default, debug]
|
||||
rtems: ["4.9", "4.10"]
|
||||
rtems: ["4.9", "4.10", "5"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Prepare and compile dependencies
|
||||
@@ -123,7 +155,7 @@ jobs:
|
||||
- name: Build main module (example app)
|
||||
run: python cue.py build
|
||||
- name: Run main module tests
|
||||
run: python cue.py test
|
||||
run: python cue.py -T 15M test
|
||||
- name: Collect and show test results
|
||||
run: python cue.py test-results
|
||||
|
||||
@@ -149,6 +181,6 @@ jobs:
|
||||
- name: Build main module (example app)
|
||||
run: python cue.py build
|
||||
- name: Run main module tests
|
||||
run: python cue.py test
|
||||
run: python cue.py -T 15M test
|
||||
- name: Collect and show test results
|
||||
run: python cue.py test-results
|
||||
|
||||
@@ -17,6 +17,7 @@ variables:
|
||||
SETUP_PATH: ".:.ci"
|
||||
BASE_RECURSIVE: "NO"
|
||||
APT: "libreadline6-dev libncurses5-dev perl clang g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86 re2c"
|
||||
DEBIAN_FRONTEND: "noninteractive"
|
||||
CMP: "gcc"
|
||||
BGFC: "default"
|
||||
VV: "1"
|
||||
@@ -137,12 +138,14 @@ wine64_static_debug:
|
||||
# Cross-builds to RTEMS 4.9 and 4.10
|
||||
rtems4.9_default:
|
||||
extends: .build
|
||||
image: ubuntu:focal
|
||||
variables:
|
||||
RTEMS: "4.9"
|
||||
BASE: "3.15"
|
||||
|
||||
rtems4.9_debug:
|
||||
extends: .build
|
||||
image: ubuntu:focal
|
||||
variables:
|
||||
RTEMS: "4.9"
|
||||
BASE: "3.15"
|
||||
@@ -150,11 +153,28 @@ rtems4.9_debug:
|
||||
|
||||
rtems4.10_default:
|
||||
extends: .build
|
||||
image: ubuntu:focal
|
||||
variables:
|
||||
RTEMS: "4.10"
|
||||
|
||||
rtems4.10_debug:
|
||||
extends: .build
|
||||
image: ubuntu:focal
|
||||
variables:
|
||||
RTEMS: "4.10"
|
||||
BCFG: "debug"
|
||||
|
||||
rtems5_default:
|
||||
extends: .build
|
||||
image: ubuntu:focal
|
||||
variables:
|
||||
RTEMS: "5"
|
||||
RTEMS_TARGET: "RTEMS-pc686-qemu"
|
||||
|
||||
rtems5_debug:
|
||||
extends: .build
|
||||
image: ubuntu:focal
|
||||
variables:
|
||||
RTEMS: "5"
|
||||
RTEMS_TARGET: "RTEMS-pc686-qemu"
|
||||
BCFG: "debug"
|
||||
|
||||
23
.travis.yml
23
.travis.yml
@@ -7,7 +7,7 @@
|
||||
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
|
||||
cache:
|
||||
directories:
|
||||
@@ -35,7 +35,6 @@ addons:
|
||||
packages:
|
||||
- re2c
|
||||
- p7zip
|
||||
update: true
|
||||
|
||||
install:
|
||||
- python cue.py prepare
|
||||
@@ -84,6 +83,7 @@ jobs:
|
||||
|
||||
- env: SET=test00
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
install: python cue-test.py env
|
||||
script: python cue-test.py
|
||||
|
||||
@@ -95,10 +95,10 @@ jobs:
|
||||
# Compile example
|
||||
|
||||
- env: SET=test01
|
||||
dist: bionic
|
||||
dist: focal
|
||||
|
||||
- env: SET=test01 BCFG=static-debug
|
||||
dist: bionic
|
||||
dist: focal
|
||||
|
||||
- env: SET=test01 CLEAN_DEPS=NO
|
||||
dist: trusty
|
||||
@@ -122,6 +122,7 @@ jobs:
|
||||
compiler: clang
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode11.3
|
||||
env:
|
||||
- SET=test01
|
||||
- EXTRA=CMD_CFLAGS="-mmacosx-version-min=10.7"
|
||||
@@ -131,6 +132,7 @@ jobs:
|
||||
|
||||
- env: SET=test01 BCFG=debug
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
compiler: clang
|
||||
|
||||
- env: SET=test01 WINE=32 TEST=NO
|
||||
@@ -143,11 +145,16 @@ jobs:
|
||||
- env: SET=test01 WINE=64 TEST=NO BCFG=debug
|
||||
- env: SET=test01 WINE=64 TEST=NO BCFG=static-debug
|
||||
|
||||
- env: SET=test01 RTEMS=4.9 BASE=3.15 TEST=NO
|
||||
- env: SET=test01 RTEMS=4.9 BASE=3.15 TEST=NO BCFG=debug
|
||||
- env: SET=test01 RTEMS=4.9 BASE=3.15 TEST=NO APT=usrmerge
|
||||
- env: SET=test01 RTEMS=4.9 BASE=3.15 TEST=NO BCFG=debug APT=usrmerge
|
||||
|
||||
- env: SET=test01 RTEMS=4.10
|
||||
- env: SET=test01 RTEMS=4.10 BCFG=debug
|
||||
- env: SET=test01 RTEMS=4.10 APT=usrmerge
|
||||
- env: SET=test01 RTEMS=4.10 BCFG=debug APT=usrmerge
|
||||
|
||||
- env: SET=test01 RTEMS=5 RTEMS_TARGET=RTEMS-pc686-qemu
|
||||
dist: focal
|
||||
- env: SET=test01 RTEMS=5 RTEMS_TARGET=RTEMS-pc686-qemu BCFG=debug
|
||||
dist: focal
|
||||
|
||||
- env: SET=test01
|
||||
os: windows
|
||||
|
||||
55
README.md
55
README.md
@@ -2,6 +2,7 @@
|
||||
<a target="_blank" href="https://travis-ci.org/epics-base/ci-scripts">![Travis status][badge.travis]</a>
|
||||
<a target="_blank" href="https://ci.appveyor.com/project/epics-base/ci-scripts">![AppVeyor status][badge.appveyor]</a>
|
||||
<a target="_blank" href="https://github.com/epics-base/ci-scripts/actions">![GitHub Actions status][badge.gh-actions]</a>
|
||||
<a target="_blank" href="https://gitlab.com/epics-base/ci-scripts/-/pipelines">![GitLab CI/CD status][badge.gitlab]</a>
|
||||
|
||||
# Continuous Integration for EPICS Modules
|
||||
|
||||
@@ -66,13 +67,14 @@ on customer infrastructure, which will have different performance
|
||||
and limitations.
|
||||
|
||||
### [Travis-CI](https://travis-ci.org/)
|
||||
- Five parallel runners on Linux/Windows (one runner on MacOS)
|
||||
- Ubuntu 12/14/16/18, MacOS 10.13, Windows Server v1809
|
||||
- Two parallel runners on Linux/Windows (two runners on MacOS)
|
||||
- Ubuntu 14/16/18/20, MacOS 10.13/14/15, Windows Server v1809
|
||||
- Compile natively on Linux (different versions of gcc, clang)
|
||||
- Compile natively on MacOS (clang)
|
||||
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017)
|
||||
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (Base >= 3.15)
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (pc386, Base >= 3.15)
|
||||
- Cross-compile for RTEMS 5 (10 BSPs, Base >= 7.0.5.1)
|
||||
- Built dependencies are cached (for faster builds).
|
||||
|
||||
See specific
|
||||
@@ -98,7 +100,8 @@ for more details.
|
||||
- Compile natively on MacOS (clang)
|
||||
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017 & 2019)
|
||||
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (Base >= 3.15)
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (pc386, Base >= 3.15)
|
||||
- Cross-compile for RTEMS 5 (10 BSPs, Base >= 7.0.5.1)
|
||||
- Caching not supported by ci-scripts yet.
|
||||
|
||||
See specific
|
||||
@@ -112,7 +115,8 @@ for more details.
|
||||
`ubuntu:bionic`)
|
||||
- Compile natively using different compilers (gcc, clang)
|
||||
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (Base >= 3.15)
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (pc386, Base >= 3.15)
|
||||
- Cross-compile for RTEMS 5 (10 BSPs, Base >= 7.0.5.1)
|
||||
- Built dependencies are cached (for faster builds).
|
||||
|
||||
See specific
|
||||
@@ -277,6 +281,35 @@ that usually it is sufficient to set `FOO=<version>`.
|
||||
You can find the list of supported (and tested) modules in `defaults.set`.
|
||||
Feel free to suggest more default settings using a Pull Request.
|
||||
|
||||
## RTEMS
|
||||
|
||||
Setting `RTEMS` to the RTEMS version number (`4.9`, `4.10` or `5`)
|
||||
enables cross-compiling to RTEMS on supported CI services.
|
||||
Tests can also be run cross-platform, using `qemu`.
|
||||
|
||||
The RTEMS 5 builds now include most of the BSPs with configuration in Base:
|
||||
|
||||
- beatnik
|
||||
- gen68360
|
||||
- mcp750
|
||||
- mvme167
|
||||
- mvme2100
|
||||
- mvme3100
|
||||
- pc686 w/ libbsd
|
||||
- qoriq_e500 w/ libbsd
|
||||
- uC5282
|
||||
- xilinx_zynq_a9_qemu w/ libbsd
|
||||
|
||||
Build configuration [can be found here][ref.rtems5build].
|
||||
Set `RTEMS_TARGET` to configure the EPICS target architecture and
|
||||
`RSB_BUILD` to select the RTEMS toolchain release name/data from
|
||||
https://github.com/mdavidsaver/rsb/releases.
|
||||
|
||||
RTEMS 5 builds need to be switched to a newer ubuntu version
|
||||
(aka. **os: ubuntu-20.04** with GitHub Actions,
|
||||
**dist: focal** with Travis-CI or
|
||||
**image: ubuntu:focal** with GitLab CI/CD).
|
||||
|
||||
## Debugging
|
||||
|
||||
Setting `VV=1` in your service configuration (e.g., `.travis.yml`) for a
|
||||
@@ -299,6 +332,8 @@ in the service specific subdirectories:
|
||||
|
||||
- [Travis-CI README](travis/README.md)
|
||||
- [AppVeyor README](appveyor/README.md)
|
||||
- [GitHub Actions README](github-actions/README.md)
|
||||
- [GitLab README](gitlab/README.md)
|
||||
|
||||
## References: EPICS Modules Using ci-scripts
|
||||
|
||||
@@ -387,16 +422,16 @@ This will make all builds (not just for your module) verbose.
|
||||
|
||||
Update the submodule in `.ci` first, then change your CI configuration
|
||||
(if needed) and commit both to your module. E.g., to update your Travis
|
||||
setup to release 3.2.0 of ci-scripts:
|
||||
setup to release 3.3.0 of ci-scripts:
|
||||
```bash
|
||||
cd .ci
|
||||
git pull origin v3.2.0
|
||||
git pull origin v3.3.0
|
||||
cd -
|
||||
git add .ci
|
||||
# if needed:
|
||||
edit .travis.yml # and/or other CI service configurations
|
||||
git add .travis.yml
|
||||
git commit -m "Update ci-scripts submodule to v3.2.0"
|
||||
git commit -m "Update ci-scripts submodule to v3.3.0"
|
||||
```
|
||||
|
||||
Check the example configuration files inside ci-scripts (and their
|
||||
@@ -447,11 +482,13 @@ This module is distributed subject to a Software License Agreement found
|
||||
in file LICENSE that is included with this distribution.
|
||||
|
||||
<!-- Links -->
|
||||
[badge.version]: https://badge.fury.io/gh/epics-base%2Fci-scripts.svg
|
||||
[badge.version]: https://img.shields.io/github/v/release/epics-base/ci-scripts?sort=semver
|
||||
[badge.travis]: https://travis-ci.org/epics-base/ci-scripts.svg?branch=master
|
||||
[badge.appveyor]: https://ci.appveyor.com/api/projects/status/8b578alg974axvux?svg=true
|
||||
[badge.gh-actions]: https://github.com/epics-base/ci-scripts/workflows/ci-scripts%20build/test/badge.svg
|
||||
[badge.gitlab]: https://gitlab.com/epics-base/ci-scripts/badges/master/pipeline.svg
|
||||
|
||||
[reddit.bash]: https://www.reddit.com/r/bash/comments/393oqv/why_is_the_version_of_bash_included_in_os_x_so_old/
|
||||
|
||||
[ref.ethercatmc]: https://github.com/EuropeanSpallationSource/m-epics-ethercatmc
|
||||
[ref.rtems5build]: https://github.com/mdavidsaver/rsb/blob/3911854462e74838e3e5f33a9e8f936fd0f1d95d/.github/workflows/build-5.yml#L98-L137
|
||||
|
||||
174
cue.py
174
cue.py
@@ -8,11 +8,41 @@ import sys, os, stat, shutil
|
||||
import fileinput
|
||||
import logging
|
||||
import re
|
||||
import threading
|
||||
from glob import glob
|
||||
import subprocess as sp
|
||||
import distutils.util
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Keep track of all files we write/append for later logging
|
||||
_realopen = open
|
||||
_modified_files = set()
|
||||
def open(fname, mode='r'):
|
||||
F = _realopen(fname, mode)
|
||||
if 'w' in mode or 'a' in mode:
|
||||
_modified_files.add(os.path.normpath(os.path.abspath(fname)))
|
||||
return F
|
||||
|
||||
def log_modified():
|
||||
for fname in _modified_files:
|
||||
with Folded(os.path.basename(fname), 'Contents of '+fname):
|
||||
with open(fname, 'r') as F:
|
||||
sys.stdout.write(F.read())
|
||||
sys.stdout.write(os.linesep)
|
||||
|
||||
def prepare_env():
|
||||
'''HACK
|
||||
github actions yaml configuration doesn't allow
|
||||
conditional (un)setting of environments, only values.
|
||||
Currently this script treats unset and empty environment
|
||||
variables differently.
|
||||
While this is the case, we unset any empty environment variables.
|
||||
'''
|
||||
toclear = tuple(k for k,v in os.environ.items() if len(v.strip())==0)
|
||||
for var in toclear:
|
||||
print('{0}Clearing empty environment variable {1}{2}'.format(ANSI_CYAN, var, ANSI_RESET))
|
||||
del os.environ[var]
|
||||
|
||||
# Detect the service and set up context hash accordingly
|
||||
def detect_context():
|
||||
@@ -113,7 +143,7 @@ def detect_context():
|
||||
|
||||
ci['parallel_make'] = 2
|
||||
if 'PARALLEL_MAKE' in os.environ:
|
||||
ci['parallel_make'] = os.environ['PARALLEL_MAKE']
|
||||
ci['parallel_make'] = int(os.environ['PARALLEL_MAKE'])
|
||||
|
||||
ci['clean_deps'] = True
|
||||
if 'CLEAN_DEPS' in os.environ and os.environ['CLEAN_DEPS'].lower() == 'no':
|
||||
@@ -218,6 +248,13 @@ def fold_end(tag, title):
|
||||
.format(ANSI_YELLOW, title, ANSI_RESET))
|
||||
sys.stdout.flush()
|
||||
|
||||
class Folded(object):
|
||||
def __init__(self, tag, title):
|
||||
self.tag, self.title = tag, title
|
||||
def __enter__(self):
|
||||
fold_start(self.tag, self.title)
|
||||
def __exit__(self,A,B,C):
|
||||
fold_end(self.tag, self.title)
|
||||
|
||||
homedir = curdir
|
||||
if 'HomeDrive' in os.environ:
|
||||
@@ -225,7 +262,6 @@ if 'HomeDrive' in os.environ:
|
||||
elif 'HOME' in os.environ:
|
||||
homedir = os.getenv('HOME')
|
||||
toolsdir = os.path.join(homedir, '.tools')
|
||||
rtemsdir = r'/home/travis/.rtems' # Preliminary, until the next generation of toolchain
|
||||
|
||||
|
||||
vcvars_table = {
|
||||
@@ -397,6 +433,7 @@ def call_git(args, **kws):
|
||||
|
||||
|
||||
def call_make(args=None, **kws):
|
||||
global make_timeout
|
||||
if args is None:
|
||||
args = []
|
||||
place = kws.get('cwd', os.getcwd())
|
||||
@@ -416,7 +453,19 @@ def call_make(args=None, **kws):
|
||||
makeargs += extra_makeargs
|
||||
logger.debug("EXEC '%s' in %s", ' '.join(['make'] + makeargs + args), place)
|
||||
sys.stdout.flush()
|
||||
exitcode = sp.call(['make'] + makeargs + args, **kws)
|
||||
sys.stderr.flush()
|
||||
|
||||
child = sp.Popen(['make'] + makeargs + args, **kws)
|
||||
if make_timeout:
|
||||
def expire(child):
|
||||
logger.error('Timeout')
|
||||
child.terminate()
|
||||
timer = threading.Timer(make_timeout, expire, args=(child,))
|
||||
timer.start()
|
||||
|
||||
exitcode = child.wait()
|
||||
if make_timeout:
|
||||
timer.cancel()
|
||||
logger.debug('EXEC DONE')
|
||||
if exitcode != 0:
|
||||
sys.exit(exitcode)
|
||||
@@ -637,15 +686,15 @@ def setup_for_build(args):
|
||||
os.environ['INCLUDE'] = ''
|
||||
if ci['platform'] == 'x86':
|
||||
os.environ['INCLUDE'] = os.pathsep.join(
|
||||
[r'C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\include',
|
||||
[r'C:\msys64\mingw32\include',
|
||||
os.environ['INCLUDE']])
|
||||
os.environ['PATH'] = os.pathsep.join([r'C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin',
|
||||
os.environ['PATH'] = os.pathsep.join([r'C:\msys64\mingw32\bin',
|
||||
os.environ['PATH']])
|
||||
elif ci['platform'] == 'x64':
|
||||
os.environ['INCLUDE'] = os.pathsep.join(
|
||||
[r'C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\include',
|
||||
[r'C:\msys64\mingw64\include',
|
||||
os.environ['INCLUDE']])
|
||||
os.environ['PATH'] = os.pathsep.join([r'C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin',
|
||||
os.environ['PATH'] = os.pathsep.join([r'C:\msys64\mingw64\bin',
|
||||
os.environ['PATH']])
|
||||
|
||||
# Find BASE location
|
||||
@@ -715,8 +764,9 @@ def setup_for_build(args):
|
||||
|
||||
# Add EXTRA make arguments
|
||||
for tag in ['EXTRA', 'EXTRA1', 'EXTRA2', 'EXTRA3', 'EXTRA4', 'EXTRA5']:
|
||||
if tag in os.environ:
|
||||
extra_makeargs.append(os.environ[tag])
|
||||
val = os.environ.get(tag, "")
|
||||
if len(val)>0:
|
||||
extra_makeargs.append(val)
|
||||
|
||||
|
||||
def fix_etc_hosts():
|
||||
@@ -773,6 +823,27 @@ def prepare(args):
|
||||
|
||||
fold_end('check.out.dependencies', 'Checking/cloning dependencies')
|
||||
|
||||
cxx = None
|
||||
if ci['compiler'].startswith('clang'):
|
||||
cxx = re.sub(r'clang', r'clang++', ci['compiler'])
|
||||
elif ci['compiler'].startswith('gcc'):
|
||||
cxx = re.sub(r'gcc', r'g++', ci['compiler'])
|
||||
|
||||
# Cross compilation on Linux to RTEMS (set RTEMS to version "4.9", "4.10")
|
||||
# requires qemu, bison, flex, texinfo, install-info
|
||||
# rtems_bsp is needed also if Base is from cache
|
||||
if 'RTEMS' in os.environ:
|
||||
if 'RTEMS_TARGET' in os.environ:
|
||||
rtems_target = os.environ['RTEMS_TARGET']
|
||||
elif os.path.exists(os.path.join(places['EPICS_BASE'], 'configure', 'os',
|
||||
'CONFIG.Common.RTEMS-pc386-qemu')):
|
||||
# Base 3.15 doesn't have -qemu target architecture
|
||||
rtems_target = 'RTEMS-pc386-qemu'
|
||||
else:
|
||||
rtems_target = 'RTEMS-pc386'
|
||||
# eg. "RTEMS-pc386" or "RTEMS-pc386-qemu" -> "pc386"
|
||||
rtems_bsp = re.match('^RTEMS-([^-]*)(?:-qemu)?$', rtems_target).group(1)
|
||||
|
||||
if 'BASE' in modules_to_compile or building_base:
|
||||
fold_start('set.up.epics_build', 'Configuring EPICS build system')
|
||||
|
||||
@@ -849,50 +920,46 @@ CROSS_COMPILER_TARGET_ARCHS += windows-x64-mingw''')
|
||||
# Cross compilation on Linux to RTEMS (set RTEMS to version "4.9", "4.10")
|
||||
# requires qemu, bison, flex, texinfo, install-info
|
||||
if 'RTEMS' in os.environ:
|
||||
print('Cross compiler RTEMS{0} @ pc386',format(os.environ['RTEMS']))
|
||||
print('Cross compiler RTEMS{0} @ {1}'.format(os.environ['RTEMS'], rtems_target))
|
||||
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
|
||||
'CONFIG_SITE.Common.RTEMS'), 'a') as f:
|
||||
f.write('''
|
||||
RTEMS_VERSION={0}
|
||||
RTEMS_BASE={1}'''.format(os.environ['RTEMS'], rtemsdir))
|
||||
RTEMS_BASE=/opt/rtems/{0}'''.format(os.environ['RTEMS']))
|
||||
|
||||
# Base 3.15 doesn't have -qemu target architecture
|
||||
qemu_suffix = ''
|
||||
if os.path.exists(os.path.join(places['EPICS_BASE'], 'configure', 'os',
|
||||
'CONFIG.Common.RTEMS-pc386-qemu')):
|
||||
qemu_suffix = '-qemu'
|
||||
with open(os.path.join(places['EPICS_BASE'], 'configure', 'CONFIG_SITE'), 'a') as f:
|
||||
f.write('''
|
||||
CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386{0}'''.format(qemu_suffix))
|
||||
CROSS_COMPILER_TARGET_ARCHS += {0}
|
||||
'''.format(rtems_target))
|
||||
|
||||
host_ccmplr_name = re.sub(r'^([a-zA-Z][^-]*(-[a-zA-Z][^-]*)*)+(-[0-9.]|)$', r'\1', ci['compiler'])
|
||||
host_cmplr_ver_suffix = re.sub(r'^([a-zA-Z][^-]*(-[a-zA-Z][^-]*)*)+(-[0-9.]|)$', r'\3', ci['compiler'])
|
||||
host_cmpl_ver = host_cmplr_ver_suffix[1:]
|
||||
print('Host compiler', ci['compiler'])
|
||||
|
||||
if host_ccmplr_name == 'clang':
|
||||
print('Host compiler clang')
|
||||
host_cppcmplr_name = re.sub(r'clang', r'clang++', host_ccmplr_name)
|
||||
if ci['compiler'].startswith('clang'):
|
||||
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
|
||||
'CONFIG_SITE.Common.'+os.environ['EPICS_HOST_ARCH']), 'a') as f:
|
||||
f.write('''
|
||||
GNU = NO
|
||||
CMPLR_CLASS = clang
|
||||
CC = {0}{2}
|
||||
CCC = {1}{2}'''.format(host_ccmplr_name, host_cppcmplr_name, host_cmplr_ver_suffix))
|
||||
CC = {0}
|
||||
CCC = {1}'''.format(ci['compiler'], cxx))
|
||||
|
||||
# hack
|
||||
with open(os.path.join(places['EPICS_BASE'], 'configure', 'CONFIG.gnuCommon'), 'a') as f:
|
||||
f.write('''
|
||||
CMPLR_CLASS = clang''')
|
||||
|
||||
if host_ccmplr_name == 'gcc':
|
||||
print('Host compiler gcc')
|
||||
host_cppcmplr_name = re.sub(r'gcc', r'g++', host_ccmplr_name)
|
||||
elif ci['compiler'].startswith('gcc'):
|
||||
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
|
||||
'CONFIG_SITE.Common.' + os.environ['EPICS_HOST_ARCH']), 'a') as f:
|
||||
f.write('''
|
||||
CC = {0}{2}
|
||||
CCC = {1}{2}'''.format(host_ccmplr_name, host_cppcmplr_name, host_cmplr_ver_suffix))
|
||||
CC = {0}
|
||||
CCC = {1}'''.format(ci['compiler'], cxx))
|
||||
|
||||
elif ci['compiler'].startswith('vs'):
|
||||
pass # nothing special
|
||||
|
||||
else:
|
||||
raise ValueError('Unknown compiler name {0}. valid forms include: gcc, gcc-4.8, clang, vs2019'.format(ci['compiler']))
|
||||
|
||||
# Add additional settings to CONFIG_SITE
|
||||
extra_config = ''
|
||||
@@ -935,19 +1002,24 @@ PERL = C:/Strawberry/perl/bin/perl -CSD'''
|
||||
fold_end('install.homebrew', 'Installing Homebrew packages')
|
||||
|
||||
if ci['os'] == 'linux' and 'RTEMS' in os.environ:
|
||||
tar_name = 'i386-rtems{0}-trusty-20171203-{0}.tar.bz2'.format(os.environ['RTEMS'])
|
||||
rsb_release = os.environ.get('RSB_BUILD', '20210306')
|
||||
tar_name = '{0}-rtems{1}.tar.xz'.format(rtems_bsp, os.environ['RTEMS'])
|
||||
print('Downloading RTEMS {0} cross compiler: {1}'
|
||||
.format(os.environ['RTEMS'], tar_name))
|
||||
sys.stdout.flush()
|
||||
sp.check_call(['curl', '-fsSL', '--retry', '3', '-o', tar_name,
|
||||
'https://github.com/mdavidsaver/rsb/releases/download/20171203-{0}/{1}'
|
||||
.format(os.environ['RTEMS'], tar_name)],
|
||||
'https://github.com/mdavidsaver/rsb/releases/download/{0}%2F{1}/{2}'
|
||||
.format(os.environ['RTEMS'], rsb_release, tar_name)],
|
||||
cwd=toolsdir)
|
||||
sudo_prefix = []
|
||||
if ci['service'] == 'github-actions':
|
||||
sudo_prefix = ['sudo']
|
||||
sp.check_call(sudo_prefix + ['tar', '-C', '/', '-xmj', '-f', os.path.join(toolsdir, tar_name)])
|
||||
sp.check_call(sudo_prefix + ['tar', '-C', '/', '-xmJ', '-f', os.path.join(toolsdir, tar_name)])
|
||||
os.remove(os.path.join(toolsdir, tar_name))
|
||||
for rtems_cc in glob('/opt/rtems/*/bin/*-gcc'):
|
||||
print('{0}{1} --version{2}'.format(ANSI_CYAN, rtems_cc, ANSI_RESET))
|
||||
sys.stdout.flush()
|
||||
sp.check_call([rtems_cc, '--version'])
|
||||
|
||||
setup_for_build(args)
|
||||
|
||||
@@ -968,6 +1040,13 @@ PERL = C:/Strawberry/perl/bin/perl -CSD'''
|
||||
print('{0}$ {1} --version{2}'.format(ANSI_CYAN, cc, ANSI_RESET))
|
||||
sys.stdout.flush()
|
||||
sp.check_call([cc, '--version'])
|
||||
if cxx:
|
||||
print('{0}$ {1} --version{2}'.format(ANSI_CYAN, cxx, ANSI_RESET))
|
||||
sys.stdout.flush()
|
||||
sp.check_call([cxx, '--version'])
|
||||
|
||||
if logging.getLogger().isEnabledFor(logging.DEBUG):
|
||||
log_modified()
|
||||
|
||||
if not building_base:
|
||||
fold_start('build.dependencies', 'Build missing/outdated dependencies')
|
||||
@@ -995,7 +1074,6 @@ PERL = C:/Strawberry/perl/bin/perl -CSD'''
|
||||
with open(os.path.join(ci['cachedir'], 'RELEASE.local'), 'r') as f:
|
||||
print(f.read().strip())
|
||||
|
||||
|
||||
def build(args):
|
||||
setup_for_build(args)
|
||||
fold_start('build.module', 'Build the main module')
|
||||
@@ -1085,12 +1163,30 @@ call "{vcvars}" {arch}
|
||||
|
||||
|
||||
def getargs():
|
||||
from argparse import ArgumentParser, REMAINDER
|
||||
from argparse import ArgumentParser, ArgumentError, REMAINDER
|
||||
def timespec(s):
|
||||
M = re.match(r'^\s*(\d+)\s*([A-Za-z]*)', s)
|
||||
if not M:
|
||||
raise ArgumentError('Expected timespec not {!r}'.format(s))
|
||||
val = float(M.group(1))
|
||||
try:
|
||||
mult = {
|
||||
'':1.0,
|
||||
'S':1.0,
|
||||
'M':60.0,
|
||||
'H':60.0*60.0,
|
||||
}[M.group(2).upper()]
|
||||
except KeyError:
|
||||
raise ArgumentError('Expect suffix S, M, or H. not {!r}'.format(s))
|
||||
return val*mult
|
||||
|
||||
p = ArgumentParser()
|
||||
p.add_argument('--no-vcvars', dest='vcvars', default=True, action='store_false',
|
||||
help='Assume vcvarsall.bat has already been run')
|
||||
p.add_argument('--add-path', dest='paths', default=[], action='append',
|
||||
help='Append directory to $PATH or %%PATH%%. Expands {ENVVAR}')
|
||||
p.add_argument('-T', '--timeout', type=timespec, metavar='DLY',
|
||||
help='Terminate make after delay. DLY interpreted as second, or may be qualified with "S", "M", or "H". (default no timeout)')
|
||||
subp = p.add_subparsers()
|
||||
|
||||
cmd = subp.add_parser('prepare')
|
||||
@@ -1115,11 +1211,17 @@ def getargs():
|
||||
|
||||
def main(raw):
|
||||
global silent_dep_builds
|
||||
global make_timeout
|
||||
args = getargs().parse_args(raw)
|
||||
if 'VV' in os.environ and os.environ['VV'] == '1':
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
silent_dep_builds = False
|
||||
|
||||
make_timeout = args.timeout
|
||||
if make_timeout:
|
||||
logger.info('Will timeout after %.1f seconds', make_timeout)
|
||||
|
||||
prepare_env()
|
||||
detect_context()
|
||||
|
||||
if args.vcvars and ci['compiler'].startswith('vs'):
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
- Compile natively on MacOS (clang)
|
||||
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017 & 2019)
|
||||
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (Base >= 3.15)
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (pc386, Base >= 3.15)
|
||||
- Cross-compile for RTEMS 5 (10 BSPs, Base >= 7.0.5.1)
|
||||
- Caching not supported yet.
|
||||
|
||||
## How to Use these Scripts
|
||||
|
||||
@@ -5,158 +5,195 @@
|
||||
|
||||
# Set the 'name:' properties to values that work for you (MYMODULE)
|
||||
|
||||
name: MYMODULE ci-scripts build
|
||||
name: MYMODULE
|
||||
|
||||
# Trigger on pushes and PRs to any branch
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'documentation/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SETUP_PATH: .ci-local:.ci
|
||||
CMP: gcc
|
||||
# For the sequencer on Linux/Windows/MacOS
|
||||
APT: re2c
|
||||
CHOCO: re2c
|
||||
BREW: re2c
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||
build-base:
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# Set environment variables from matrix parameters
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
|
||||
cmp: [gcc, clang]
|
||||
configuration: [default, static, debug, static-debug]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
run: python .ci/cue.py build
|
||||
- name: Run main module tests
|
||||
run: python .ci/cue.py test
|
||||
- name: Collect and show test results
|
||||
run: python .ci/cue.py test-results
|
||||
|
||||
build-macos:
|
||||
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# Set environment variables from matrix parameters
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-10.15]
|
||||
cmp: [clang]
|
||||
# No static builds on MacOS
|
||||
configuration: [default, debug]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
run: python .ci/cue.py build
|
||||
- name: Run main module tests
|
||||
run: python .ci/cue.py test
|
||||
- name: Collect and show test results
|
||||
run: python .ci/cue.py test-results
|
||||
|
||||
build-windows:
|
||||
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-2019, windows-2016]
|
||||
cmp: [gcc, vs2019, vs2017]
|
||||
configuration: [default, static, debug, static-debug]
|
||||
# Available: vs2017/windows-2016 and vs2019/windows-2019
|
||||
exclude:
|
||||
- os: windows-2019
|
||||
cmp: vs2017
|
||||
- os: windows-2016
|
||||
cmp: vs2019
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
run: python .ci/cue.py build
|
||||
- name: Run main module tests
|
||||
run: python .ci/cue.py test
|
||||
- name: Collect and show test results
|
||||
run: python .ci/cue.py test-results
|
||||
|
||||
# Same setup and toolchain as on Travis.
|
||||
# Needs Base >= 3.15 to compile, EPICS 7 to also run the tests on qemu
|
||||
build-rtems:
|
||||
name: RTEMS${{ matrix.rtems }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
RTEMS: ${{ matrix.rtems }}
|
||||
APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-18.04]
|
||||
cmp: [gcc]
|
||||
configuration: [default, debug]
|
||||
rtems: ["4.9", "4.10"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
run: python .ci/cue.py build
|
||||
- name: Run main module tests
|
||||
run: python .ci/cue.py test
|
||||
- name: Collect and show test results
|
||||
run: python .ci/cue.py test-results
|
||||
|
||||
# The WINE cross builds are of somewhat limited use,
|
||||
# as there are native gcc/MinGW builds available on GitHub Actions
|
||||
build-wine:
|
||||
name: WINE${{ matrix.wine }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
WINE: ${{ matrix.wine }}
|
||||
APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64
|
||||
RTEMS: ${{ matrix.rtems }}
|
||||
RTEMS_TARGET: ${{ matrix.rtems_target }}
|
||||
EXTRA: ${{ matrix.extra }}
|
||||
TEST: ${{ matrix.test }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-18.04]
|
||||
cmp: [gcc]
|
||||
configuration: [default, static, debug, static-debug]
|
||||
wine: [32, 64]
|
||||
# Job names also name artifacts, character limitations apply
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
wine: "64"
|
||||
name: "Ub-20 gcc-9 + MinGW"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
wine: "64"
|
||||
name: "Ub-20 gcc-9 + MinGW, static"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
extra: "CMD_CXXFLAGS=-std=c++11"
|
||||
name: "Ub-20 gcc-9 C++11, static"
|
||||
|
||||
- os: ubuntu-16.04
|
||||
cmp: clang
|
||||
configuration: default
|
||||
name: "Ub-16 clang-9"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: clang
|
||||
configuration: default
|
||||
extra: "CMD_CXXFLAGS=-std=c++11"
|
||||
name: "Ub-20 clang-10 C++11"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
rtems: "4.10"
|
||||
name: "Ub-20 gcc-9 + RT-4.10"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
rtems: "4.9"
|
||||
name: "Ub-20 gcc-9 + RT-4.9"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
rtems: "5"
|
||||
rtems_target: RTEMS-pc686-qemu
|
||||
name: "Ub-20 gcc-9 + RT-5.1 pc686"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
rtems: "5"
|
||||
rtems_target: RTEMS-beatnik
|
||||
test: NO
|
||||
name: "Ub-20 gcc-9 + RT-5.1 beatnik"
|
||||
|
||||
- os: ubuntu-16.04
|
||||
cmp: gcc-4.8
|
||||
utoolchain: true
|
||||
configuration: default
|
||||
name: "Ub-16 gcc-4.8"
|
||||
|
||||
- os: ubuntu-16.04
|
||||
cmp: gcc-4.9
|
||||
utoolchain: true
|
||||
configuration: default
|
||||
name: "Ub-16 gcc-4.9"
|
||||
|
||||
- os: ubuntu-18.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Ub-18 gcc-7"
|
||||
|
||||
- os: ubuntu-18.04
|
||||
cmp: gcc-8
|
||||
utoolchain: true
|
||||
configuration: default
|
||||
name: "Ub-18 gcc-8"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc-8
|
||||
utoolchain: true
|
||||
configuration: default
|
||||
name: "Ub-20 gcc-8"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: clang
|
||||
configuration: default
|
||||
name: "Ub-20 clang-10"
|
||||
|
||||
- os: macos-latest
|
||||
cmp: clang
|
||||
configuration: default
|
||||
name: "MacOS clang-12"
|
||||
|
||||
- os: windows-2016
|
||||
cmp: vs2017
|
||||
configuration: default
|
||||
name: "Win2016 MSC-17"
|
||||
|
||||
- os: windows-2016
|
||||
cmp: vs2017
|
||||
configuration: static
|
||||
name: "Win2016 MSC-17, static"
|
||||
|
||||
- os: windows-2019
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Win2019 MinGW"
|
||||
|
||||
- os: windows-2019
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
name: "Win2019 MinGW, static"
|
||||
|
||||
- os: windows-2019
|
||||
cmp: vs2019
|
||||
configuration: default
|
||||
name: "Win2019 MSC-19"
|
||||
|
||||
- os: windows-2019
|
||||
cmp: vs2019
|
||||
configuration: static
|
||||
name: "Win2019 MSC-19, static"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Automatic core dumper analysis
|
||||
uses: mdavidsaver/ci-core-dumper@master
|
||||
- name: "apt-get install"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install qemu-system-x86 g++-mingw-w64-x86-64 gdb
|
||||
if: runner.os == 'Linux'
|
||||
- name: "apt-get install ${{ matrix.cmp }}"
|
||||
run: |
|
||||
sudo apt-get -y install software-properties-common
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install ${{ matrix.cmp }}
|
||||
if: matrix.utoolchain
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
run: python .ci/cue.py build
|
||||
- name: Run main module tests
|
||||
run: python .ci/cue.py test
|
||||
- name: Upload tapfiles Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: tapfiles ${{ matrix.name }}
|
||||
path: '**/O.*/*.tap'
|
||||
- name: Collect and show test results
|
||||
run: python .ci/cue.py test-results
|
||||
|
||||
@@ -5,18 +5,23 @@
|
||||
|
||||
# Set the 'name:' properties to values that work for you
|
||||
|
||||
name: MYMODULE ci-scripts build
|
||||
name: MYMODULE
|
||||
|
||||
# Trigger on pushes and PRs to any branch
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'documentation/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SETUP_PATH: .ci-local:.ci
|
||||
CMP: gcc
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: ${{ matrix.base }} / ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# Set environment variables from matrix parameters
|
||||
env:
|
||||
@@ -26,10 +31,42 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-18.04]
|
||||
cmp: [gcc]
|
||||
configuration: [default, static]
|
||||
base: ["7.0", "3.15"]
|
||||
- os: ubuntu-18.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
base: "7.0"
|
||||
name: "7.0 Ub-18 gcc-7"
|
||||
|
||||
- os: ubuntu-18.04
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
base: "7.0"
|
||||
name: "7.0 Ub-18 gcc-7 static"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
base: "3.15"
|
||||
name: "3.15 Ub-20 gcc-9"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
base: "3.15"
|
||||
name: "3.15 Ub-20 gcc-9 static"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: debug
|
||||
base: "3.15"
|
||||
name: "3.15 Ub-20 gcc-9 debug"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: clang
|
||||
configuration: default
|
||||
base: "3.15"
|
||||
name: "3.15 Ub-20 clang-10"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
||||
@@ -99,7 +99,7 @@ wine64_debug:
|
||||
BCFG: "debug"
|
||||
WINE: "64"
|
||||
|
||||
# Cross-builds to RTEMS 4.9 and 4.10
|
||||
# Cross-builds to RTEMS 4.9, 4.10 and 5
|
||||
rtems4.9_default:
|
||||
extends: .build
|
||||
variables:
|
||||
@@ -112,3 +112,10 @@ rtems4.10_debug:
|
||||
RTEMS: "4.10"
|
||||
BASE: "7.0"
|
||||
BCFG: "debug"
|
||||
|
||||
rtems5_default:
|
||||
extends: .build
|
||||
image: ubuntu:focal
|
||||
variables:
|
||||
RTEMS: "5"
|
||||
RTEMS_TARGET: "RTEMS-pc686-qemu"
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
`ubuntu:bionic`)
|
||||
- Compile natively using different compilers (gcc, clang)
|
||||
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (Base >= 3.15)
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (pc386, Base >= 3.15)
|
||||
- Cross-compile for RTEMS 5 (10 BSPs, Base >= 7.0.5.1)
|
||||
- Built dependencies are cached (for faster builds).
|
||||
|
||||
## How to Use these Scripts
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
|
||||
cache:
|
||||
directories:
|
||||
@@ -39,7 +39,6 @@ addons:
|
||||
- re2c
|
||||
# for .zip/.7z archive hooks
|
||||
- p7zip
|
||||
update: true
|
||||
|
||||
install:
|
||||
- python .ci/cue.py prepare
|
||||
@@ -104,9 +103,12 @@ jobs:
|
||||
|
||||
# Cross-compilation to RTEMS
|
||||
|
||||
- env: BASE=7.0 RTEMS=4.10
|
||||
- env: BASE=7.0 RTEMS=4.10 APT=usrmerge
|
||||
|
||||
- env: BASE=7.0 RTEMS=4.9
|
||||
- env: BASE=7.0 RTEMS=4.9 APT=usrmerge
|
||||
|
||||
- env: BASE=7.0 RTEMS=5 RTEMS_TARGET=RTEMS-pc686-qemu
|
||||
dist: focal
|
||||
|
||||
# Other gcc versions (added as an extra package)
|
||||
|
||||
@@ -122,6 +124,7 @@ jobs:
|
||||
|
||||
- env: BASE=7.0
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
compiler: clang
|
||||
|
||||
# Windows builds
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
|
||||
# Minimal set of packages needed to compile EPICS Base
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
|
||||
## Features
|
||||
|
||||
- Five parallel runners on Linux/Windows (one runner on MacOS)
|
||||
- Two parallel runners on Linux/Windows (two runners on MacOS)
|
||||
- Ubuntu 14/16/18/20, MacOS 10.13/14/15, Windows Server v1809
|
||||
- Use different compilers (gcc, clang)
|
||||
- Use different gcc versions
|
||||
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (Base >= 3.15)
|
||||
- Cross-compile for RTEMS 4.9 and 4.10 (pc386, Base >= 3.15)
|
||||
- Cross-compile for RTEMS 5 (10 BSPs, Base >= 7.0.5.1)
|
||||
- Compile natively on MacOS (clang)
|
||||
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017)
|
||||
- Built dependencies are cached (for faster builds).
|
||||
|
||||
Reference in New Issue
Block a user