32 Commits

Author SHA1 Message Date
Ralph Lange
5764601630 Update README
Some checks failed
ci-scripts build/test / Unit tests on macos-10.15 (push) Has been cancelled
ci-scripts build/test / Unit tests on ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / Unit tests on ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / Unit tests on ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / Unit tests on windows-2016 (push) Has been cancelled
ci-scripts build/test / Unit tests on windows-2019 (push) Has been cancelled
ci-scripts build/test / clang / debug / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / clang / debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / clang / debug / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / clang / default / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / clang / default / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / clang / default / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / clang / static / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / clang / static / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / clang / static / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / clang / static-debug / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / clang / static-debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / clang / static-debug / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / gcc / debug / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / gcc / debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / gcc / debug / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / gcc / default / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / gcc / default / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / gcc / default / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / gcc / static / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / gcc / static / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / gcc / static / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / gcc / static-debug / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / gcc / static-debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / gcc / static-debug / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / gcc-4.8 / default / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / gcc-4.8 / static / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / gcc-4.9 / default / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / gcc-4.9 / static / ubuntu-16.04 (push) Has been cancelled
ci-scripts build/test / clang / debug / macos-10.15 (push) Has been cancelled
ci-scripts build/test / gcc / debug / windows-2016 (push) Has been cancelled
ci-scripts build/test / vs2019 / default / windows-2019 (push) Has been cancelled
ci-scripts build/test / vs2019 / static-debug / windows-2019 (push) Has been cancelled
ci-scripts build/test / RTEMS4.10 / debug / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / RTEMS4.9 / debug / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / RTEMS5 / debug / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / RTEMS4.10 / default / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / RTEMS4.9 / default / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / RTEMS5 / default / ubuntu-20.04 (push) Has been cancelled
ci-scripts build/test / WINE32 / debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / WINE64 / debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / WINE32 / default / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / WINE64 / default / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / WINE32 / static / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / WINE64 / static / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / WINE32 / static-debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / WINE64 / static-debug / ubuntu-18.04 (push) Has been cancelled
ci-scripts build/test / clang / default / macos-10.15 (push) Has been cancelled
ci-scripts build/test / gcc / debug / windows-2019 (push) Has been cancelled
ci-scripts build/test / gcc / default / windows-2016 (push) Has been cancelled
ci-scripts build/test / gcc / default / windows-2019 (push) Has been cancelled
ci-scripts build/test / gcc / static / windows-2016 (push) Has been cancelled
ci-scripts build/test / gcc / static / windows-2019 (push) Has been cancelled
ci-scripts build/test / gcc / static-debug / windows-2016 (push) Has been cancelled
ci-scripts build/test / gcc / static-debug / windows-2019 (push) Has been cancelled
ci-scripts build/test / vs2017 / debug / windows-2016 (push) Has been cancelled
ci-scripts build/test / vs2017 / default / windows-2016 (push) Has been cancelled
ci-scripts build/test / vs2017 / static / windows-2016 (push) Has been cancelled
ci-scripts build/test / vs2017 / static-debug / windows-2016 (push) Has been cancelled
ci-scripts build/test / vs2019 / debug / windows-2019 (push) Has been cancelled
ci-scripts build/test / vs2019 / static / windows-2019 (push) Has been cancelled
2021-04-09 18:44:42 +02:00
Ralph Lange
0c2f903516 gitlab: set DEBIAN_FRONTEND="noninteractive"
- fixes hanging apt install tzdata
2021-04-09 18:44:42 +02:00
Ralph Lange
822293de04 Add RTEMS 5 (pc686-qemu) jobs 2021-04-09 18:44:42 +02:00
Ralph Lange
6702a8a19c travis: osx default to 10.14 / xcode 11.3
(also no brew update to speed up builds)
2021-04-09 18:39:44 +02:00
Ralph Lange
7c29683ad5 travis: update README for service changes 2021-04-09 18:39:44 +02:00
Ralph Lange
2bcd84a01c travis: default to bionic, test on focal and trusty 2021-04-09 18:39:44 +02:00
Ralph Lange
c6df7df2bd Install usrmerge on ubuntu (needed for RTEMS builds)
- travis: only do that for RTEMS
  (as precise & trusty don't have usrmerge)
- gitlab: use focal instead
  (apt install usrmerge doesn't work in Docker)
2021-04-09 18:39:44 +02:00
Ralph Lange
8bf77eba0c Update README for RTEMS builds 2021-04-09 18:39:44 +02:00
Ralph Lange
5b123f4e88 Merge pull request #56 from mdavidsaver/rtems5 2021-04-07 16:53:29 +02:00
Ralph Lange
349eb9434d cue: set rtems_target and rtems_bsp if base is not rebuilt
(rtems_bsp is needed when cached Base is used)
2021-04-07 16:47:03 +02:00
Ralph Lange
2464284271 Merge pull request #61 from FreddieAkeroyd/mingw_vs_2019
Use MSYS2 for gcc builds on AppVeyor.
2021-03-22 18:53:03 +01:00
Ralph Lange
13b7f097c1 Merge pull request #60 from mdavidsaver/master
Add timeout for make (intended to catch hanging tests). Default: no timeout.
2021-03-22 09:50:56 +01:00
Freddie Akeroyd
2464f82ce6 Use MSYS2 for gcc builds 2021-03-20 22:02:30 +00:00
Michael Davidsaver
9a94f4712b add timeout for make 2021-03-18 12:22:22 -07:00
Michael Davidsaver
028b752cb2 update RTEMS toolchains
Allow selection of RTEMS target and toolchain build.
Default build requires ubuntu-20.04 (aka. focal).
2021-03-06 13:51:03 -08:00
Ralph Lange
3db08b5977 cue: make cxx work when base is cached 2021-02-15 19:28:49 +01:00
Ralph Lange
99057a5ff6 Merge pull request #59 from mdavidsaver/master
Really Fix qualified GCC version builds
2021-02-15 18:24:03 +01:00
Michael Davidsaver
c734d558c2 print c++ compiler version
also ensures that the separate g++... binary is present.
2021-02-10 09:51:02 -08:00
Michael Davidsaver
b047a6c641 Revert "Add compiler-class and compiler-suffix as config"
This reverts commit 2016cb2ae7.
2021-02-10 09:51:02 -08:00
Michael Davidsaver
9183238f9d Revert "test: fix test_HostArchConfiguration on Windows"
This reverts commit e7b1214d09.
2021-02-10 09:51:02 -08:00
Michael Davidsaver
3ff483a1bb install old g++ 2021-02-10 09:51:02 -08:00
Ralph Lange
495f8622cd Readme: move version badge to shields.io 2021-02-08 18:47:08 +01:00
Ralph Lange
e7b1214d09 test: fix test_HostArchConfiguration on Windows 2021-02-08 18:10:37 +01:00
Ralph Lange
2016cb2ae7 Add compiler-class and compiler-suffix as config 2021-02-08 14:11:52 +01:00
Michael Davidsaver
cef930dd06 test gcc 4.8/4.9 2021-02-07 12:28:34 -08:00
Michael Davidsaver
fa2a1e1d39 log modified config files 2021-02-07 11:35:41 -08:00
Michael Davidsaver
aa25701c58 fix qualified compiler name selection 2021-02-07 11:00:07 -08:00
Michael Davidsaver
5d7e82256c PARALLEL_MAKE is numeric 2020-12-31 20:55:59 -08:00
Ralph Lange
ad8dd4a136 Merge pull request #57 from mdavidsaver/clearenv
Clear empty environment variables
2020-11-16 09:56:52 +01:00
Michael Davidsaver
fe8a9f5953 clear empty environment variables 2020-11-08 09:37:48 -08:00
Michael Davidsaver
7d9d426629 avoid empty EXTRA*
Helpful when the value of EXTRA can be conditionally
computed, but unset is not an easy option.
eg. with github actions
2020-11-07 08:13:47 -08:00
Ralph Lange
2929ee2a03 Readme: add GitLab badge 2020-10-19 09:34:19 +02:00
14 changed files with 488 additions and 202 deletions

View File

@@ -148,7 +148,7 @@ build_script:
- cmd: python cue.py build - cmd: python cue.py build
test_script: test_script:
- cmd: python cue.py test - cmd: python cue.py -T 15M test
- cmd: python cue.py test-results - cmd: python cue.py test-results
#---------------------------------# #---------------------------------#

View File

@@ -46,7 +46,38 @@ jobs:
- name: Build main module (example app) - name: Build main module (example app)
run: python cue.py build run: python cue.py build
- name: Run main module tests - 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 - name: Collect and show test results
run: python cue.py test-results run: python cue.py test-results
@@ -69,7 +100,7 @@ jobs:
- name: Build main module (example app) - name: Build main module (example app)
run: python cue.py build run: python cue.py build
- name: Run main module tests - name: Run main module tests
run: python cue.py test run: python cue.py -T 15M test
- name: Collect and show test results - name: Collect and show test results
run: python cue.py test-results run: python cue.py test-results
@@ -97,7 +128,7 @@ jobs:
- name: Build main module (example app) - name: Build main module (example app)
run: python cue.py build run: python cue.py build
- name: Run main module tests - name: Run main module tests
run: python cue.py test run: python cue.py -T 15M test
- name: Collect and show test results - name: Collect and show test results
run: python cue.py test-results run: python cue.py test-results
@@ -108,14 +139,15 @@ jobs:
CMP: ${{ matrix.cmp }} CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }} BCFG: ${{ matrix.configuration }}
RTEMS: ${{ matrix.rtems }} RTEMS: ${{ matrix.rtems }}
RTEMS_TARGET: RTEMS-pc686-qemu
APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86 APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-18.04] os: [ubuntu-20.04]
cmp: [gcc] cmp: [gcc]
configuration: [default, debug] configuration: [default, debug]
rtems: ["4.9", "4.10"] rtems: ["4.9", "4.10", "5"]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Prepare and compile dependencies - name: Prepare and compile dependencies
@@ -123,7 +155,7 @@ jobs:
- name: Build main module (example app) - name: Build main module (example app)
run: python cue.py build run: python cue.py build
- name: Run main module tests - name: Run main module tests
run: python cue.py test run: python cue.py -T 15M test
- name: Collect and show test results - name: Collect and show test results
run: python cue.py test-results run: python cue.py test-results
@@ -149,6 +181,6 @@ jobs:
- name: Build main module (example app) - name: Build main module (example app)
run: python cue.py build run: python cue.py build
- name: Run main module tests - name: Run main module tests
run: python cue.py test run: python cue.py -T 15M test
- name: Collect and show test results - name: Collect and show test results
run: python cue.py test-results run: python cue.py test-results

View File

@@ -17,6 +17,7 @@ variables:
SETUP_PATH: ".:.ci" SETUP_PATH: ".:.ci"
BASE_RECURSIVE: "NO" BASE_RECURSIVE: "NO"
APT: "libreadline6-dev libncurses5-dev perl clang g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86 re2c" 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" CMP: "gcc"
BGFC: "default" BGFC: "default"
VV: "1" VV: "1"
@@ -137,12 +138,14 @@ wine64_static_debug:
# Cross-builds to RTEMS 4.9 and 4.10 # Cross-builds to RTEMS 4.9 and 4.10
rtems4.9_default: rtems4.9_default:
extends: .build extends: .build
image: ubuntu:focal
variables: variables:
RTEMS: "4.9" RTEMS: "4.9"
BASE: "3.15" BASE: "3.15"
rtems4.9_debug: rtems4.9_debug:
extends: .build extends: .build
image: ubuntu:focal
variables: variables:
RTEMS: "4.9" RTEMS: "4.9"
BASE: "3.15" BASE: "3.15"
@@ -150,11 +153,28 @@ rtems4.9_debug:
rtems4.10_default: rtems4.10_default:
extends: .build extends: .build
image: ubuntu:focal
variables: variables:
RTEMS: "4.10" RTEMS: "4.10"
rtems4.10_debug: rtems4.10_debug:
extends: .build extends: .build
image: ubuntu:focal
variables: variables:
RTEMS: "4.10" RTEMS: "4.10"
BCFG: "debug" 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"

View File

@@ -7,7 +7,7 @@
language: cpp language: cpp
compiler: gcc compiler: gcc
dist: xenial dist: bionic
cache: cache:
directories: directories:
@@ -35,7 +35,6 @@ addons:
packages: packages:
- re2c - re2c
- p7zip - p7zip
update: true
install: install:
- python cue.py prepare - python cue.py prepare
@@ -84,6 +83,7 @@ jobs:
- env: SET=test00 - env: SET=test00
os: osx os: osx
osx_image: xcode11.3
install: python cue-test.py env install: python cue-test.py env
script: python cue-test.py script: python cue-test.py
@@ -95,10 +95,10 @@ jobs:
# Compile example # Compile example
- env: SET=test01 - env: SET=test01
dist: bionic dist: focal
- env: SET=test01 BCFG=static-debug - env: SET=test01 BCFG=static-debug
dist: bionic dist: focal
- env: SET=test01 CLEAN_DEPS=NO - env: SET=test01 CLEAN_DEPS=NO
dist: trusty dist: trusty
@@ -122,6 +122,7 @@ jobs:
compiler: clang compiler: clang
- os: osx - os: osx
osx_image: xcode11.3
env: env:
- SET=test01 - SET=test01
- EXTRA=CMD_CFLAGS="-mmacosx-version-min=10.7" - EXTRA=CMD_CFLAGS="-mmacosx-version-min=10.7"
@@ -131,6 +132,7 @@ jobs:
- env: SET=test01 BCFG=debug - env: SET=test01 BCFG=debug
os: osx os: osx
osx_image: xcode11.3
compiler: clang compiler: clang
- env: SET=test01 WINE=32 TEST=NO - 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=debug
- env: SET=test01 WINE=64 TEST=NO BCFG=static-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 APT=usrmerge
- env: SET=test01 RTEMS=4.9 BASE=3.15 TEST=NO BCFG=debug - 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 APT=usrmerge
- env: SET=test01 RTEMS=4.10 BCFG=debug - 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 - env: SET=test01
os: windows os: windows

View File

@@ -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://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://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://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 # Continuous Integration for EPICS Modules
@@ -66,13 +67,14 @@ on customer infrastructure, which will have different performance
and limitations. and limitations.
### [Travis-CI](https://travis-ci.org/) ### [Travis-CI](https://travis-ci.org/)
- Five parallel runners on Linux/Windows (one runner on MacOS) - Two parallel runners on Linux/Windows (two runners on MacOS)
- Ubuntu 12/14/16/18, MacOS 10.13, Windows Server v1809 - 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 Linux (different versions of gcc, clang)
- Compile natively on MacOS (clang) - Compile natively on MacOS (clang)
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017) - Compile natively on Windows (gcc/MinGW, Visual Studio 2017)
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE - 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). - Built dependencies are cached (for faster builds).
See specific See specific
@@ -98,7 +100,8 @@ for more details.
- Compile natively on MacOS (clang) - Compile natively on MacOS (clang)
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017 & 2019) - Compile natively on Windows (gcc/MinGW, Visual Studio 2017 & 2019)
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE - 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. - Caching not supported by ci-scripts yet.
See specific See specific
@@ -112,7 +115,8 @@ for more details.
`ubuntu:bionic`) `ubuntu:bionic`)
- Compile natively using different compilers (gcc, clang) - Compile natively using different compilers (gcc, clang)
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE - 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). - Built dependencies are cached (for faster builds).
See specific 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`. You can find the list of supported (and tested) modules in `defaults.set`.
Feel free to suggest more default settings using a Pull Request. 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 ## Debugging
Setting `VV=1` in your service configuration (e.g., `.travis.yml`) for a 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) - [Travis-CI README](travis/README.md)
- [AppVeyor README](appveyor/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 ## 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 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 (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 ```bash
cd .ci cd .ci
git pull origin v3.2.0 git pull origin v3.3.0
cd - cd -
git add .ci git add .ci
# if needed: # if needed:
edit .travis.yml # and/or other CI service configurations edit .travis.yml # and/or other CI service configurations
git add .travis.yml 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 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. in file LICENSE that is included with this distribution.
<!-- Links --> <!-- 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.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.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.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/ [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.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
View File

@@ -8,11 +8,41 @@ import sys, os, stat, shutil
import fileinput import fileinput
import logging import logging
import re import re
import threading
from glob import glob
import subprocess as sp import subprocess as sp
import distutils.util import distutils.util
logger = logging.getLogger(__name__) 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 # Detect the service and set up context hash accordingly
def detect_context(): def detect_context():
@@ -113,7 +143,7 @@ def detect_context():
ci['parallel_make'] = 2 ci['parallel_make'] = 2
if 'PARALLEL_MAKE' in os.environ: 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 ci['clean_deps'] = True
if 'CLEAN_DEPS' in os.environ and os.environ['CLEAN_DEPS'].lower() == 'no': 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)) .format(ANSI_YELLOW, title, ANSI_RESET))
sys.stdout.flush() 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 homedir = curdir
if 'HomeDrive' in os.environ: if 'HomeDrive' in os.environ:
@@ -225,7 +262,6 @@ if 'HomeDrive' in os.environ:
elif 'HOME' in os.environ: elif 'HOME' in os.environ:
homedir = os.getenv('HOME') homedir = os.getenv('HOME')
toolsdir = os.path.join(homedir, '.tools') toolsdir = os.path.join(homedir, '.tools')
rtemsdir = r'/home/travis/.rtems' # Preliminary, until the next generation of toolchain
vcvars_table = { vcvars_table = {
@@ -397,6 +433,7 @@ def call_git(args, **kws):
def call_make(args=None, **kws): def call_make(args=None, **kws):
global make_timeout
if args is None: if args is None:
args = [] args = []
place = kws.get('cwd', os.getcwd()) place = kws.get('cwd', os.getcwd())
@@ -416,7 +453,19 @@ def call_make(args=None, **kws):
makeargs += extra_makeargs makeargs += extra_makeargs
logger.debug("EXEC '%s' in %s", ' '.join(['make'] + makeargs + args), place) logger.debug("EXEC '%s' in %s", ' '.join(['make'] + makeargs + args), place)
sys.stdout.flush() 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') logger.debug('EXEC DONE')
if exitcode != 0: if exitcode != 0:
sys.exit(exitcode) sys.exit(exitcode)
@@ -637,15 +686,15 @@ def setup_for_build(args):
os.environ['INCLUDE'] = '' os.environ['INCLUDE'] = ''
if ci['platform'] == 'x86': if ci['platform'] == 'x86':
os.environ['INCLUDE'] = os.pathsep.join( 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['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']]) os.environ['PATH']])
elif ci['platform'] == 'x64': elif ci['platform'] == 'x64':
os.environ['INCLUDE'] = os.pathsep.join( 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['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']]) os.environ['PATH']])
# Find BASE location # Find BASE location
@@ -715,8 +764,9 @@ def setup_for_build(args):
# Add EXTRA make arguments # Add EXTRA make arguments
for tag in ['EXTRA', 'EXTRA1', 'EXTRA2', 'EXTRA3', 'EXTRA4', 'EXTRA5']: for tag in ['EXTRA', 'EXTRA1', 'EXTRA2', 'EXTRA3', 'EXTRA4', 'EXTRA5']:
if tag in os.environ: val = os.environ.get(tag, "")
extra_makeargs.append(os.environ[tag]) if len(val)>0:
extra_makeargs.append(val)
def fix_etc_hosts(): def fix_etc_hosts():
@@ -773,6 +823,27 @@ def prepare(args):
fold_end('check.out.dependencies', 'Checking/cloning dependencies') 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: if 'BASE' in modules_to_compile or building_base:
fold_start('set.up.epics_build', 'Configuring EPICS build system') 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") # Cross compilation on Linux to RTEMS (set RTEMS to version "4.9", "4.10")
# requires qemu, bison, flex, texinfo, install-info # requires qemu, bison, flex, texinfo, install-info
if 'RTEMS' in os.environ: 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', with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
'CONFIG_SITE.Common.RTEMS'), 'a') as f: 'CONFIG_SITE.Common.RTEMS'), 'a') as f:
f.write(''' f.write('''
RTEMS_VERSION={0} 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: with open(os.path.join(places['EPICS_BASE'], 'configure', 'CONFIG_SITE'), 'a') as f:
f.write(''' 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']) print('Host compiler', 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:]
if host_ccmplr_name == 'clang': if ci['compiler'].startswith('clang'):
print('Host compiler clang')
host_cppcmplr_name = re.sub(r'clang', r'clang++', host_ccmplr_name)
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os', with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
'CONFIG_SITE.Common.'+os.environ['EPICS_HOST_ARCH']), 'a') as f: 'CONFIG_SITE.Common.'+os.environ['EPICS_HOST_ARCH']), 'a') as f:
f.write(''' f.write('''
GNU = NO GNU = NO
CMPLR_CLASS = clang CMPLR_CLASS = clang
CC = {0}{2} CC = {0}
CCC = {1}{2}'''.format(host_ccmplr_name, host_cppcmplr_name, host_cmplr_ver_suffix)) CCC = {1}'''.format(ci['compiler'], cxx))
# hack # hack
with open(os.path.join(places['EPICS_BASE'], 'configure', 'CONFIG.gnuCommon'), 'a') as f: with open(os.path.join(places['EPICS_BASE'], 'configure', 'CONFIG.gnuCommon'), 'a') as f:
f.write(''' f.write('''
CMPLR_CLASS = clang''') CMPLR_CLASS = clang''')
if host_ccmplr_name == 'gcc': elif ci['compiler'].startswith('gcc'):
print('Host compiler gcc')
host_cppcmplr_name = re.sub(r'gcc', r'g++', host_ccmplr_name)
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os', with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
'CONFIG_SITE.Common.' + os.environ['EPICS_HOST_ARCH']), 'a') as f: 'CONFIG_SITE.Common.' + os.environ['EPICS_HOST_ARCH']), 'a') as f:
f.write(''' f.write('''
CC = {0}{2} CC = {0}
CCC = {1}{2}'''.format(host_ccmplr_name, host_cppcmplr_name, host_cmplr_ver_suffix)) 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 # Add additional settings to CONFIG_SITE
extra_config = '' extra_config = ''
@@ -935,19 +1002,24 @@ PERL = C:/Strawberry/perl/bin/perl -CSD'''
fold_end('install.homebrew', 'Installing Homebrew packages') fold_end('install.homebrew', 'Installing Homebrew packages')
if ci['os'] == 'linux' and 'RTEMS' in os.environ: 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}' print('Downloading RTEMS {0} cross compiler: {1}'
.format(os.environ['RTEMS'], tar_name)) .format(os.environ['RTEMS'], tar_name))
sys.stdout.flush() sys.stdout.flush()
sp.check_call(['curl', '-fsSL', '--retry', '3', '-o', tar_name, sp.check_call(['curl', '-fsSL', '--retry', '3', '-o', tar_name,
'https://github.com/mdavidsaver/rsb/releases/download/20171203-{0}/{1}' 'https://github.com/mdavidsaver/rsb/releases/download/{0}%2F{1}/{2}'
.format(os.environ['RTEMS'], tar_name)], .format(os.environ['RTEMS'], rsb_release, tar_name)],
cwd=toolsdir) cwd=toolsdir)
sudo_prefix = [] sudo_prefix = []
if ci['service'] == 'github-actions': if ci['service'] == 'github-actions':
sudo_prefix = ['sudo'] 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)) 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) 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)) print('{0}$ {1} --version{2}'.format(ANSI_CYAN, cc, ANSI_RESET))
sys.stdout.flush() sys.stdout.flush()
sp.check_call([cc, '--version']) 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: if not building_base:
fold_start('build.dependencies', 'Build missing/outdated dependencies') 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: with open(os.path.join(ci['cachedir'], 'RELEASE.local'), 'r') as f:
print(f.read().strip()) print(f.read().strip())
def build(args): def build(args):
setup_for_build(args) setup_for_build(args)
fold_start('build.module', 'Build the main module') fold_start('build.module', 'Build the main module')
@@ -1085,12 +1163,30 @@ call "{vcvars}" {arch}
def getargs(): 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 = ArgumentParser()
p.add_argument('--no-vcvars', dest='vcvars', default=True, action='store_false', p.add_argument('--no-vcvars', dest='vcvars', default=True, action='store_false',
help='Assume vcvarsall.bat has already been run') help='Assume vcvarsall.bat has already been run')
p.add_argument('--add-path', dest='paths', default=[], action='append', p.add_argument('--add-path', dest='paths', default=[], action='append',
help='Append directory to $PATH or %%PATH%%. Expands {ENVVAR}') 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() subp = p.add_subparsers()
cmd = subp.add_parser('prepare') cmd = subp.add_parser('prepare')
@@ -1115,11 +1211,17 @@ def getargs():
def main(raw): def main(raw):
global silent_dep_builds global silent_dep_builds
global make_timeout
args = getargs().parse_args(raw) args = getargs().parse_args(raw)
if 'VV' in os.environ and os.environ['VV'] == '1': if 'VV' in os.environ and os.environ['VV'] == '1':
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
silent_dep_builds = False silent_dep_builds = False
make_timeout = args.timeout
if make_timeout:
logger.info('Will timeout after %.1f seconds', make_timeout)
prepare_env()
detect_context() detect_context()
if args.vcvars and ci['compiler'].startswith('vs'): if args.vcvars and ci['compiler'].startswith('vs'):

View File

@@ -8,7 +8,8 @@
- Compile natively on MacOS (clang) - Compile natively on MacOS (clang)
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017 & 2019) - Compile natively on Windows (gcc/MinGW, Visual Studio 2017 & 2019)
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE - 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. - Caching not supported yet.
## How to Use these Scripts ## How to Use these Scripts

View File

@@ -5,158 +5,195 @@
# Set the 'name:' properties to values that work for you (MYMODULE) # 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 # Trigger on pushes and PRs to any branch
on: [push, pull_request] on:
push:
paths-ignore:
- 'documentation/*'
- '**/*.html'
- '**/*.md'
pull_request:
env: env:
SETUP_PATH: .ci-local:.ci SETUP_PATH: .ci-local:.ci
CMP: gcc
# For the sequencer on Linux/Windows/MacOS # For the sequencer on Linux/Windows/MacOS
APT: re2c APT: re2c
CHOCO: re2c CHOCO: re2c
BREW: re2c BREW: re2c
jobs: jobs:
build-linux: build-base:
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} name: ${{ matrix.name }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
# Set environment variables from matrix parameters # 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: env:
CMP: ${{ matrix.cmp }} CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }} BCFG: ${{ matrix.configuration }}
WINE: ${{ matrix.wine }} 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: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-18.04] # Job names also name artifacts, character limitations apply
cmp: [gcc] include:
configuration: [default, static, debug, static-debug] - os: ubuntu-20.04
wine: [32, 64] 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: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true 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 - name: Prepare and compile dependencies
run: python .ci/cue.py prepare run: python .ci/cue.py prepare
- name: Build main module - name: Build main module
run: python .ci/cue.py build run: python .ci/cue.py build
- name: Run main module tests - name: Run main module tests
run: python .ci/cue.py test 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 - name: Collect and show test results
run: python .ci/cue.py test-results run: python .ci/cue.py test-results

View File

@@ -5,18 +5,23 @@
# Set the 'name:' properties to values that work for you # 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 # Trigger on pushes and PRs to any branch
on: [push, pull_request] on:
push:
paths-ignore:
- 'documentation/*'
- '**/*.html'
- '**/*.md'
pull_request:
env: env:
SETUP_PATH: .ci-local:.ci SETUP_PATH: .ci-local:.ci
CMP: gcc
jobs: jobs:
build-linux: build-linux:
name: ${{ matrix.base }} / ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} name: ${{ matrix.name }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
# Set environment variables from matrix parameters # Set environment variables from matrix parameters
env: env:
@@ -26,10 +31,42 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-20.04, ubuntu-18.04] - os: ubuntu-18.04
cmp: [gcc] cmp: gcc
configuration: [default, static] configuration: default
base: ["7.0", "3.15"] 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: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:

View File

@@ -99,7 +99,7 @@ wine64_debug:
BCFG: "debug" BCFG: "debug"
WINE: "64" WINE: "64"
# Cross-builds to RTEMS 4.9 and 4.10 # Cross-builds to RTEMS 4.9, 4.10 and 5
rtems4.9_default: rtems4.9_default:
extends: .build extends: .build
variables: variables:
@@ -112,3 +112,10 @@ rtems4.10_debug:
RTEMS: "4.10" RTEMS: "4.10"
BASE: "7.0" BASE: "7.0"
BCFG: "debug" BCFG: "debug"
rtems5_default:
extends: .build
image: ubuntu:focal
variables:
RTEMS: "5"
RTEMS_TARGET: "RTEMS-pc686-qemu"

View File

@@ -7,7 +7,8 @@
`ubuntu:bionic`) `ubuntu:bionic`)
- Compile natively using different compilers (gcc, clang) - Compile natively using different compilers (gcc, clang)
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE - 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). - Built dependencies are cached (for faster builds).
## How to Use these Scripts ## How to Use these Scripts

View File

@@ -5,7 +5,7 @@
language: cpp language: cpp
compiler: gcc compiler: gcc
dist: xenial dist: bionic
cache: cache:
directories: directories:
@@ -39,7 +39,6 @@ addons:
- re2c - re2c
# for .zip/.7z archive hooks # for .zip/.7z archive hooks
- p7zip - p7zip
update: true
install: install:
- python .ci/cue.py prepare - python .ci/cue.py prepare
@@ -104,9 +103,12 @@ jobs:
# Cross-compilation to RTEMS # 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) # Other gcc versions (added as an extra package)
@@ -122,6 +124,7 @@ jobs:
- env: BASE=7.0 - env: BASE=7.0
os: osx os: osx
osx_image: xcode11.3
compiler: clang compiler: clang
# Windows builds # Windows builds

View File

@@ -3,7 +3,7 @@
language: cpp language: cpp
compiler: gcc compiler: gcc
dist: xenial dist: bionic
# Minimal set of packages needed to compile EPICS Base # Minimal set of packages needed to compile EPICS Base

View File

@@ -2,11 +2,13 @@
## Features ## 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 compilers (gcc, clang)
- Use different gcc versions - Use different gcc versions
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE - 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 MacOS (clang)
- Compile natively on Windows (gcc/MinGW, Visual Studio 2017) - Compile natively on Windows (gcc/MinGW, Visual Studio 2017)
- Built dependencies are cached (for faster builds). - Built dependencies are cached (for faster builds).