Compare commits
150 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
261f218e09 | ||
|
|
a096fe1b76 | ||
|
|
63f979bf5c | ||
|
|
4e4f33e54f | ||
|
|
df2367fcd3 | ||
|
|
3f77ee12af | ||
|
|
e952bb9cf4 | ||
|
|
fe1e31e527 | ||
|
|
b2b4e777f7 | ||
|
|
0e93b70855 | ||
|
|
fe29811d26 | ||
|
|
dead44c3cb | ||
|
|
ca8fde2eaf | ||
|
|
130e88b709 | ||
|
|
20f8e05393 | ||
|
|
2246ee79e4 | ||
|
|
7def04dc0e | ||
|
|
c153c10a11 | ||
|
|
a133e160ee | ||
|
|
f57c9d5930 | ||
|
|
dffe32c23e | ||
|
|
afeb69564c | ||
|
|
6ec067da78 | ||
|
|
899b18336b | ||
|
|
8e0cb61c12 | ||
|
|
4028a10be9 | ||
|
|
b61f5079b7 | ||
| e79a7fbf1e | |||
|
|
e0a7c52160 | ||
|
|
6e190542d6 | ||
|
|
a8bffdcfb7 | ||
|
|
8ea51154c0 | ||
|
|
4248dffeca | ||
| 9721faa716 | |||
|
|
c8b2773316 | ||
|
|
1e0e326f74 | ||
|
|
bd0cd5434c | ||
|
|
819c2abba0 | ||
|
|
6491f0116f | ||
|
|
f47280547b | ||
|
|
e32822b9a3 | ||
|
|
918feccf51 | ||
|
|
fd925d83b6 | ||
|
|
cd21488ec7 | ||
|
|
aea7906839 | ||
|
|
c6bc90b06a | ||
|
|
af1ecbabae | ||
|
|
22b2e3f796 | ||
|
|
d36800b2e0 | ||
|
|
b6723d0be4 | ||
|
|
db7677a48e | ||
|
|
ee9d6b3497 | ||
|
|
89a16e4499 | ||
|
|
91fb22b79a | ||
|
|
514737a106 | ||
|
|
f7e21c7c9d | ||
|
|
e065445f76 | ||
|
|
93062ba941 | ||
|
|
75d2911498 | ||
|
|
3a1d04914f | ||
|
|
75bae77c1d | ||
|
|
d675de24e6 | ||
|
|
e703210fad | ||
|
|
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 | ||
|
|
1a227516c5 | ||
|
|
bfb9f77db8 | ||
|
|
12a0656fd2 | ||
|
|
984fa5e355 | ||
|
|
43e52b5f6f | ||
|
|
3c1cf15dac | ||
|
|
506af3932d | ||
|
|
85a34ceefb | ||
|
|
705f50449e | ||
|
|
d6136de065 | ||
|
|
33cac7c965 | ||
|
|
1c748ae291 | ||
|
|
7744772be6 | ||
|
|
682f92941d | ||
|
|
032ef83502 | ||
|
|
cfd8a88488 | ||
|
|
54a104e0a6 | ||
|
|
884d017650 | ||
|
|
fd71e94dd4 | ||
|
|
eb5edd3055 | ||
|
|
87942a7c29 | ||
|
|
0bf7d23a6f | ||
|
|
b592ab053c | ||
|
|
e10326b129 | ||
|
|
bd7612dcab | ||
|
|
1b066feacc | ||
|
|
ee362d84aa | ||
|
|
9942f81988 | ||
|
|
ce99ab4e52 | ||
|
|
08d2f23295 | ||
|
|
a439d7aa64 | ||
|
|
6eefee8d18 | ||
|
|
c7a134e1fb | ||
|
|
ba5173a494 | ||
|
|
b568ca982b | ||
|
|
04f99fe6c4 | ||
|
|
0b54ff61c4 | ||
|
|
074a7ab617 | ||
|
|
5a0acc2228 | ||
|
|
1c0f786eeb | ||
|
|
4b76e0623d | ||
|
|
e8508cb658 | ||
|
|
388cc57533 | ||
|
|
5beeada73f | ||
|
|
348a7dc851 | ||
|
|
ab52808c63 | ||
|
|
3a99f3c9d6 | ||
|
|
6c645363b3 | ||
|
|
2dbd777852 | ||
|
|
576b5a4caf | ||
|
|
031a756941 | ||
|
|
f324cd3bdd | ||
|
|
0ba02c5b03 | ||
|
|
b0c910c1cc | ||
|
|
59304f83c2 |
@@ -37,6 +37,7 @@ skip_commits:
|
|||||||
- '**/*.html'
|
- '**/*.html'
|
||||||
- '**/*.md'
|
- '**/*.md'
|
||||||
- '.travis.yml'
|
- '.travis.yml'
|
||||||
|
- '.github/workflows/*'
|
||||||
|
|
||||||
#---------------------------------#
|
#---------------------------------#
|
||||||
# additional packages #
|
# additional packages #
|
||||||
@@ -44,9 +45,9 @@ skip_commits:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
# fetch submodules (like ci-scripts)
|
# fetch submodules (like ci-scripts)
|
||||||
- cmd: git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
# for the sequencer
|
# for the sequencer
|
||||||
- cinst re2c
|
- choco install re2c
|
||||||
|
|
||||||
#---------------------------------#
|
#---------------------------------#
|
||||||
# build matrix configuration #
|
# build matrix configuration #
|
||||||
@@ -71,19 +72,21 @@ environment:
|
|||||||
VV: 1
|
VV: 1
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- CMP: vs2019
|
- CMP: vs2022
|
||||||
SET: test00
|
SET: test00
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||||
- CMP: gcc
|
- CMP: gcc
|
||||||
- CMP: vs2019
|
- CMP: vs2022
|
||||||
VV: 0
|
VV: 0
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||||
- CMP: vs2019
|
- CMP: vs2022
|
||||||
BASE: 3.15
|
BASE: 3.15
|
||||||
CLEAN_DEPS: NO
|
CLEAN_DEPS: NO
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||||
- CMP: vs2019
|
- CMP: vs2022
|
||||||
BASE: 3.14
|
BASE: 3.14
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||||
|
- CMP: vs2019
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
- CMP: vs2017
|
- CMP: vs2017
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
@@ -94,7 +97,6 @@ environment:
|
|||||||
- CMP: vs2013
|
- CMP: vs2013
|
||||||
- CMP: vs2012
|
- CMP: vs2012
|
||||||
- CMP: vs2010
|
- CMP: vs2010
|
||||||
- CMP: vs2008
|
|
||||||
|
|
||||||
# Platform: architecture
|
# Platform: architecture
|
||||||
platform:
|
platform:
|
||||||
@@ -124,8 +126,6 @@ matrix:
|
|||||||
CMP: vs2012
|
CMP: vs2012
|
||||||
- platform: x64
|
- platform: x64
|
||||||
CMP: vs2010
|
CMP: vs2010
|
||||||
- platform: x64
|
|
||||||
CMP: vs2008
|
|
||||||
|
|
||||||
# Run test script for unit tests (SET = test00)
|
# Run test script for unit tests (SET = test00)
|
||||||
for:
|
for:
|
||||||
@@ -147,7 +147,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
|
||||||
|
|
||||||
#---------------------------------#
|
#---------------------------------#
|
||||||
|
|||||||
137
.github/workflows/build-and-test.yml
vendored
Normal file
137
.github/workflows/build-and-test.yml
vendored
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
name: ci-scripts build/test
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
SETUP_PATH: .:.ci
|
||||||
|
SET: test01
|
||||||
|
VV: 1
|
||||||
|
BASE_RECURSIVE: NO
|
||||||
|
CMP: gcc
|
||||||
|
APT: re2c
|
||||||
|
CHOCO: re2c
|
||||||
|
BREW: re2c
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
unit-test:
|
||||||
|
name: Unit tests on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-24.04, ubuntu-22.04, windows-2025, windows-2022, macos-15, macos-14]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Show initial environment
|
||||||
|
run: python3 cue-test.py env
|
||||||
|
- name: Run unit tests
|
||||||
|
run: python3 cue-test.py
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
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-24.04, ubuntu-22.04]
|
||||||
|
cmp: [gcc, clang]
|
||||||
|
configuration: [default, static, debug, static-debug]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- 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
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CMP: ${{ matrix.cmp }}
|
||||||
|
BCFG: ${{ matrix.configuration }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15, macos-14]
|
||||||
|
cmp: [clang]
|
||||||
|
configuration: [default, debug]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- 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
|
||||||
|
|
||||||
|
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-2025, windows-2022]
|
||||||
|
cmp: [gcc, vs2022]
|
||||||
|
configuration: [default, static, debug, static-debug]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- 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
|
||||||
|
|
||||||
|
build-cross:
|
||||||
|
name: cross ${{ matrix.cross }} / ${{ matrix.cmp }} / ${{ matrix.configuration }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CMP: gcc
|
||||||
|
BCFG: default
|
||||||
|
CI_CROSS_TARGETS: ${{ matrix.cross }}
|
||||||
|
TEST: ${{ matrix.test }}
|
||||||
|
APT: re2c
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# configuration: [default, static, debug, static-debug]
|
||||||
|
configuration: [default]
|
||||||
|
cross:
|
||||||
|
- linux-aarch64
|
||||||
|
- linux-arm@arm-linux-gnueabi
|
||||||
|
- linux-arm@arm-linux-gnueabihf
|
||||||
|
- linux-ppc
|
||||||
|
- linux-ppc64
|
||||||
|
- win32-x86-mingw
|
||||||
|
- windows-x64-mingw
|
||||||
|
- RTEMS-pc386-qemu@4.9
|
||||||
|
- RTEMS-pc386-qemu@4.10
|
||||||
|
- RTEMS-pc686-qemu@5
|
||||||
|
include:
|
||||||
|
- cross: RTEMS-pc386-qemu@4.10
|
||||||
|
test: NO
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- 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
|
||||||
180
.gitlab-ci.yml
Normal file
180
.gitlab-ci.yml
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
# .gitlab-ci.yml for testing EPICS Base ci-scripts
|
||||||
|
# (see: https://github.com/epics-base/ci-scripts)
|
||||||
|
|
||||||
|
# Note:
|
||||||
|
# Paths to scripts are different in this test configuration
|
||||||
|
# (your module has one more directory level: .ci)
|
||||||
|
|
||||||
|
image: ubuntu:bionic
|
||||||
|
|
||||||
|
cache:
|
||||||
|
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||||
|
paths:
|
||||||
|
- .cache/
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GIT_SUBMODULE_STRATEGY: "recursive"
|
||||||
|
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"
|
||||||
|
SET: test01
|
||||||
|
|
||||||
|
# Unit tests
|
||||||
|
unit_test:
|
||||||
|
stage: build
|
||||||
|
variables:
|
||||||
|
SET: test00
|
||||||
|
before_script:
|
||||||
|
- apt-get update -qq && apt-get install -y -qq make git python curl p7zip-full
|
||||||
|
- python cue-test.py env
|
||||||
|
script:
|
||||||
|
- python cue-test.py
|
||||||
|
|
||||||
|
# Template job for test builds (hidden)
|
||||||
|
.build:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- apt-get update -qq && apt-get install -y -qq build-essential git python curl p7zip-full
|
||||||
|
- python cue.py prepare
|
||||||
|
script:
|
||||||
|
- python cue.py build
|
||||||
|
- python cue.py test
|
||||||
|
- python cue.py test-results
|
||||||
|
|
||||||
|
# gcc builds using four configurations (shared/static, optimized/debug)
|
||||||
|
gcc_default:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
gcc_static:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BCFG: "static"
|
||||||
|
|
||||||
|
gcc_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BCFG: "debug"
|
||||||
|
|
||||||
|
gcc_static_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BCFG: "static-debug"
|
||||||
|
|
||||||
|
# clang builds using four configurations (shared/static, optimized/debug)
|
||||||
|
clang_default:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
CMP: "clang"
|
||||||
|
|
||||||
|
clang_static:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
CMP: "clang"
|
||||||
|
BCFG: "static"
|
||||||
|
|
||||||
|
clang_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
CMP: "clang"
|
||||||
|
BCFG: "debug"
|
||||||
|
|
||||||
|
clang_static_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
CMP: "clang"
|
||||||
|
BCFG: "static-debug"
|
||||||
|
|
||||||
|
# WINE based cross-builds to Windows 32bit and 64bit
|
||||||
|
wine32_default:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "32"
|
||||||
|
|
||||||
|
wine32_static:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "32"
|
||||||
|
BCFG: "static"
|
||||||
|
|
||||||
|
wine32_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "32"
|
||||||
|
BCFG: "debug"
|
||||||
|
|
||||||
|
wine32_static_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "32"
|
||||||
|
BCFG: "static-debug"
|
||||||
|
|
||||||
|
wine64_default:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "64"
|
||||||
|
|
||||||
|
wine64_static:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "64"
|
||||||
|
BCFG: "static"
|
||||||
|
|
||||||
|
wine64_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "64"
|
||||||
|
BCFG: "debug"
|
||||||
|
|
||||||
|
wine64_static_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
WINE: "64"
|
||||||
|
BCFG: "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"
|
||||||
|
BCFG: "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"
|
||||||
29
.travis.yml
29
.travis.yml
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
dist: xenial
|
dist: bionic
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
@@ -30,10 +30,11 @@ addons:
|
|||||||
- g++-mingw-w64-i686
|
- g++-mingw-w64-i686
|
||||||
- g++-mingw-w64-x86-64
|
- g++-mingw-w64-x86-64
|
||||||
- qemu-system-x86
|
- qemu-system-x86
|
||||||
|
- p7zip-full
|
||||||
homebrew:
|
homebrew:
|
||||||
packages:
|
packages:
|
||||||
- re2c
|
- re2c
|
||||||
update: true
|
- p7zip
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python cue.py prepare
|
- python cue.py prepare
|
||||||
@@ -82,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
|
||||||
|
|
||||||
@@ -93,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
|
||||||
@@ -120,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"
|
||||||
@@ -129,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
|
||||||
@@ -141,15 +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=static
|
- env: SET=test01 RTEMS=4.9 BASE=3.15 TEST=NO BCFG=debug 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=static-debug
|
|
||||||
|
|
||||||
- env: SET=test01 RTEMS=4.10
|
- env: SET=test01 RTEMS=4.10 APT=usrmerge
|
||||||
- env: SET=test01 RTEMS=4.10 BCFG=static
|
- env: SET=test01 RTEMS=4.10 BCFG=debug APT=usrmerge
|
||||||
- env: SET=test01 RTEMS=4.10 BCFG=debug
|
|
||||||
- env: SET=test01 RTEMS=4.10 BCFG=static-debug
|
- 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
|
||||||
|
|||||||
161
README.md
161
README.md
@@ -1,6 +1,8 @@
|
|||||||
<a target="_blank" href="http://semver.org">![Version][badge.version]</a>
|
<a target="_blank" href="http://semver.org">![Version][badge.version]</a>
|
||||||
<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://gitlab.com/epics-base/ci-scripts/-/pipelines">![GitLab CI/CD status][badge.gitlab]</a>
|
||||||
|
|
||||||
# Continuous Integration for EPICS Modules
|
# Continuous Integration for EPICS Modules
|
||||||
|
|
||||||
@@ -56,14 +58,23 @@ levels as the example files.
|
|||||||
|
|
||||||
## Supported CI Services
|
## Supported CI Services
|
||||||
|
|
||||||
|
The listed properties and instructions for the CI services apply to
|
||||||
|
their free tiers for open source projects, hosted in the cloud on
|
||||||
|
their infrastructure.
|
||||||
|
|
||||||
|
The companies behind these services also offer "enterprise" installations
|
||||||
|
on customer infrastructure, which will have different performance
|
||||||
|
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)
|
||||||
- Use different compilers (gcc, clang)
|
- Ubuntu 14/16/18/20, MacOS 10.13/14/15, Windows Server v1809
|
||||||
- Use different gcc versions
|
- Compile natively on Linux (different versions of 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)
|
|
||||||
- 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 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
|
||||||
@@ -72,9 +83,9 @@ for more details.
|
|||||||
|
|
||||||
### [AppVeyor](https://www.appveyor.com/)
|
### [AppVeyor](https://www.appveyor.com/)
|
||||||
- One parallel runner (all builds are sequential)
|
- One parallel runner (all builds are sequential)
|
||||||
- Use different compilers (Visual Studio, gcc/MinGW)
|
- Windows Server 2012/2016/2019
|
||||||
- Use different Visual Studio versions: \
|
- Compile using gcc/MinGW or different Visual Studio versions: \
|
||||||
2008, 2010, 2012, 2013, 2015, 2017, 2019
|
2010, 2012, 2013, 2015, 2017, 2019, 2022
|
||||||
- Compile for Windows 32bit and 64bit
|
- Compile for Windows 32bit and 64bit
|
||||||
- No useful caching available.
|
- No useful caching available.
|
||||||
|
|
||||||
@@ -82,15 +93,46 @@ See specific
|
|||||||
**[ci-scripts on AppVeyor README](appveyor/README.md)**
|
**[ci-scripts on AppVeyor README](appveyor/README.md)**
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
|
### [GitHub Actions](https://github.com/)
|
||||||
|
- 20 parallel runners on Linux/Windows (5 runners on MacOS)
|
||||||
|
- Ubuntu 18/20/22, MacOS 11/12, Windows Server 2019/2022
|
||||||
|
- Compile natively on Linux (gcc, clang)
|
||||||
|
- Compile natively on MacOS (clang)
|
||||||
|
- Compile natively on Windows (gcc/MinGW, Visual Studio 2019/2022)
|
||||||
|
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||||
|
- 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
|
||||||
|
**[ci-scripts on GitHub Actions README](github-actions/README.md)**
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
### [GitLab CI/CD](https://gitlab.com/)
|
||||||
|
|
||||||
|
- Docker-based runners on Linux (one VM instance per job)
|
||||||
|
- Can use any Docker image from Dockerhub (the examples use
|
||||||
|
`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 (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
|
||||||
|
**[ci-scripts on GitLab CI/CD README](gitlab/README.md)**
|
||||||
|
for more details.
|
||||||
|
|
||||||
## How to Use the CI-Scripts
|
## How to Use the CI-Scripts
|
||||||
|
|
||||||
1. Get an account on a supported CI service provider platform.
|
1. Get an account on a supported CI service provider platform
|
||||||
(e.g. [Travis-CI](https://travis-ci.org/),
|
(e.g. [Travis-CI](https://travis-ci.org/),
|
||||||
[AppVeyor](https://www.appveyor.com/), ...)
|
[AppVeyor](https://www.appveyor.com/), ...).
|
||||||
|
GitHub Actions does not require a separate account.
|
||||||
|
|
||||||
(More details in the specific README of the subdirectory.)
|
(More details in the specific README of the subdirectory.)
|
||||||
|
|
||||||
2. In your Support Module, add this ci-scripts repository
|
2. In your module, add this ci-scripts repository
|
||||||
as a Git Submodule (name suggestion: `.ci`).
|
as a Git Submodule (name suggestion: `.ci`).
|
||||||
```bash
|
```bash
|
||||||
git submodule add https://github.com/epics-base/ci-scripts .ci
|
git submodule add https://github.com/epics-base/ci-scripts .ci
|
||||||
@@ -147,6 +189,19 @@ Collect the results of your tests and print a summary.
|
|||||||
`exec`\
|
`exec`\
|
||||||
Execute the remainder of the line using the default command shell.
|
Execute the remainder of the line using the default command shell.
|
||||||
|
|
||||||
|
## Extra arguments to `make`
|
||||||
|
|
||||||
|
You can add additional arguments to the make runs that the `cue.py` script
|
||||||
|
starts. Put your additional arguments into environment variables named
|
||||||
|
`EXTRA`, `EXTRA1`, ... `EXTRA5`.
|
||||||
|
|
||||||
|
The variables may contain multiple arguments, separated by whitespace.
|
||||||
|
Use regular shell script quoting (single/double quotes, backslash escapes)
|
||||||
|
if you need spaces inside an extra argument.
|
||||||
|
|
||||||
|
The YAML syntax needed to set environment variables depends on the CI
|
||||||
|
service and platform. (See the full example configuration file.)
|
||||||
|
|
||||||
## Setup Files
|
## Setup Files
|
||||||
|
|
||||||
Your module might depend on EPICS Base and a few other support modules.
|
Your module might depend on EPICS Base and a few other support modules.
|
||||||
@@ -225,10 +280,11 @@ recursing into submodules. [default is including submodules: `YES`]
|
|||||||
be always be extended by the release or branch name as `<name>-<version>`.
|
be always be extended by the release or branch name as `<name>-<version>`.
|
||||||
[default is the slug in lower case: `foo`]
|
[default is the slug in lower case: `foo`]
|
||||||
|
|
||||||
`FOO_HOOK=<script>` Set the name of a script that will be run after cloning
|
`FOO_HOOK=<hook>` Set the name of a `.patch` file, a `.zip` or `.7z` archive
|
||||||
the module, before compiling it. Working directory when running the script
|
or a script that will be applied (using `-p1`), extracted or run after cloning
|
||||||
is the root of the targeted module (e.g. `.../.cache/foo-1.2`).
|
the module, before compiling it.
|
||||||
[default: no hooks are run]
|
Working directory is the root of the targeted module,
|
||||||
|
e.g., `.../.cache/foo-1.2`). [default: no hook]
|
||||||
|
|
||||||
`FOO_VARNAME=<name>` Set the name that is used for the module when creating
|
`FOO_VARNAME=<name>` Set the name that is used for the module when creating
|
||||||
the `RELEASE.local` files. [default is the slug in upper case: `FOO`]
|
the `RELEASE.local` files. [default is the slug in upper case: `FOO`]
|
||||||
@@ -238,6 +294,58 @@ 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
|
||||||
|
|
||||||
|
Cross-compiling to RTEMS versions 4.9, 4.10 or 5 is supported
|
||||||
|
on supported CI services. For configuration see below.
|
||||||
|
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 `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 ubuntu version >= 20
|
||||||
|
(aka. **os: ubuntu-20.04** with GitHub Actions,
|
||||||
|
**dist: focal** with Travis-CI or
|
||||||
|
**image: ubuntu:focal** with GitLab CI/CD).
|
||||||
|
|
||||||
|
## Cross Compilation
|
||||||
|
|
||||||
|
Setting the `CI_CROSS_TARGETS` environment variable enables cross-compiling
|
||||||
|
from Linux to the provided targets architectures.
|
||||||
|
The value of the environment variable must contain the EPICS architecture
|
||||||
|
and - depending on the target - may contain additional information like
|
||||||
|
the compiler prefix to be used or the version of the target OS.
|
||||||
|
|
||||||
|
Multiple cross-targets can be added to the `CI_CROSS_TARGETS` variable
|
||||||
|
by separating them with a colon (`:`) character.
|
||||||
|
|
||||||
|
For example, possible values are:
|
||||||
|
|
||||||
|
- linux-aarch64
|
||||||
|
- linux-arm@arm-linux-gnueabi
|
||||||
|
- linux-arm@arm-linux-gnueabihf
|
||||||
|
- linux-ppc
|
||||||
|
- linux-ppc64
|
||||||
|
- win32-x86-mingw
|
||||||
|
- windows-x64-mingw
|
||||||
|
- RTEMS-pc386-qemu@4.9
|
||||||
|
- RTEMS-pc386-qemu@4.10
|
||||||
|
- RTEMS-pc686-qemu@5
|
||||||
|
|
||||||
## 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
|
||||||
@@ -260,6 +368,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
|
||||||
|
|
||||||
@@ -271,6 +381,8 @@ in the service specific subdirectories:
|
|||||||
|
|
||||||
EPICS Modules:
|
EPICS Modules:
|
||||||
[ASYN](https://github.com/epics-modules/asyn),
|
[ASYN](https://github.com/epics-modules/asyn),
|
||||||
|
[autosave](https://github.com/epics-modules/autosave),
|
||||||
|
[busy](https://github.com/epics-modules/busy),
|
||||||
[devlib2](https://github.com/epics-modules/devlib2),
|
[devlib2](https://github.com/epics-modules/devlib2),
|
||||||
[ecmc](https://github.com/epics-modules/ecmc),
|
[ecmc](https://github.com/epics-modules/ecmc),
|
||||||
[gtest](https://github.com/epics-modules/gtest),
|
[gtest](https://github.com/epics-modules/gtest),
|
||||||
@@ -279,10 +391,14 @@ EPICS Modules:
|
|||||||
[MCoreUtils](https://github.com/epics-modules/MCoreUtils),
|
[MCoreUtils](https://github.com/epics-modules/MCoreUtils),
|
||||||
[modbus](https://github.com/epics-modules/modbus),
|
[modbus](https://github.com/epics-modules/modbus),
|
||||||
[motor](https://github.com/epics-modules/motor),
|
[motor](https://github.com/epics-modules/motor),
|
||||||
|
[mrfioc2](https://github.com/epics-modules/mrfioc2),
|
||||||
[OPCUA](https://github.com/ralphlange/opcua),
|
[OPCUA](https://github.com/ralphlange/opcua),
|
||||||
[PCAS](https://github.com/epics-modules/pcas),
|
[PCAS](https://github.com/epics-modules/pcas),
|
||||||
|
[softGlueZync](https://github.com/epics-modules/softGlueZynq),
|
||||||
[sscan](https://github.com/epics-modules/sscan),
|
[sscan](https://github.com/epics-modules/sscan),
|
||||||
[vac](https://github.com/epics-modules/vac)
|
[std](https://github.com/epics-modules/std),
|
||||||
|
[vac](https://github.com/epics-modules/vac),
|
||||||
|
[xxx](https://github.com/epics-modules/xxx)
|
||||||
|
|
||||||
ESS: [EtherCAT MC Motor Driver][ref.ethercatmc]
|
ESS: [EtherCAT MC Motor Driver][ref.ethercatmc]
|
||||||
|
|
||||||
@@ -342,16 +458,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.0.1 of ci-scripts:
|
setup to release 3.3.0 of ci-scripts:
|
||||||
```bash
|
```bash
|
||||||
cd .ci
|
cd .ci
|
||||||
git pull origin v3.0.1
|
git pull origin v3.3.0
|
||||||
cd -
|
cd -
|
||||||
git add .ci
|
git add .ci
|
||||||
# if needed:
|
# if needed:
|
||||||
edit .travis.yml # and/or .appveyor.yml
|
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.0.1"
|
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
|
||||||
@@ -402,10 +518,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.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
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ skip_commits:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
# fetch submodules (like ci-scripts)
|
# fetch submodules (like ci-scripts)
|
||||||
- cmd: git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
# for the sequencer
|
# for the sequencer
|
||||||
- cinst re2c
|
- choco install re2c
|
||||||
|
|
||||||
#---------------------------------#
|
#---------------------------------#
|
||||||
# build matrix configuration #
|
# build matrix configuration #
|
||||||
@@ -92,8 +92,8 @@ environment:
|
|||||||
BASE: 7.0
|
BASE: 7.0
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- CMP: vs2019
|
- CMP: vs2022
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||||
- CMP: gcc
|
- CMP: gcc
|
||||||
- CMP: vs2019
|
- CMP: vs2019
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
@@ -109,7 +109,6 @@ environment:
|
|||||||
- CMP: vs2013
|
- CMP: vs2013
|
||||||
- CMP: vs2012
|
- CMP: vs2012
|
||||||
- CMP: vs2010
|
- CMP: vs2010
|
||||||
- CMP: vs2008
|
|
||||||
|
|
||||||
# Platform: processor architecture
|
# Platform: processor architecture
|
||||||
platform:
|
platform:
|
||||||
@@ -124,8 +123,6 @@ matrix:
|
|||||||
CMP: vs2012
|
CMP: vs2012
|
||||||
- platform: x64
|
- platform: x64
|
||||||
CMP: vs2010
|
CMP: vs2010
|
||||||
- platform: x64
|
|
||||||
CMP: vs2008
|
|
||||||
# Exclude more jobs to reduce build time
|
# Exclude more jobs to reduce build time
|
||||||
# E.g., skip 32-bit for newer compilers
|
# E.g., skip 32-bit for newer compilers
|
||||||
#- platform: x86
|
#- platform: x86
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ skip_commits:
|
|||||||
- '.travis.yml'
|
- '.travis.yml'
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cmd: git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
image: Visual Studio 2019
|
image: Visual Studio 2022
|
||||||
|
|
||||||
# Build Configurations: shared/static, optimized/debug
|
# Build Configurations: shared/static, optimized/debug
|
||||||
configuration:
|
configuration:
|
||||||
@@ -34,9 +34,9 @@ environment:
|
|||||||
SETUP_PATH: .ci-local:.ci
|
SETUP_PATH: .ci-local:.ci
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- CMP: vs2019
|
- CMP: vs2022
|
||||||
BASE: 7.0
|
BASE: 7.0
|
||||||
- CMP: vs2019
|
- CMP: vs2022
|
||||||
BASE: 3.15
|
BASE: 3.15
|
||||||
|
|
||||||
# Platform: processor architecture
|
# Platform: processor architecture
|
||||||
@@ -52,8 +52,6 @@ matrix:
|
|||||||
CMP: vs2012
|
CMP: vs2012
|
||||||
- platform: x64
|
- platform: x64
|
||||||
CMP: vs2010
|
CMP: vs2010
|
||||||
- platform: x64
|
|
||||||
CMP: vs2008
|
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: python .ci/cue.py prepare
|
- cmd: python .ci/cue.py prepare
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- One parallel runner (all builds are sequential)
|
- One parallel runner (all builds are sequential)
|
||||||
- Use different compilers (Visual Studio, gcc/MinGW)
|
- Windows Server 2012/2016/2019
|
||||||
- Use different Visual Studio versions: \
|
- Compile using gcc/MinGW or different Visual Studio versions: \
|
||||||
2008, 2010, 2012, 2013, 2015, 2017, 2019
|
2010, 2012, 2013, 2015, 2017, 2019, 2022
|
||||||
- Compile for Windows 32bit and 64bit
|
- Compile for Windows 32bit and 64bit
|
||||||
- No useful caching available.
|
- No useful caching available.
|
||||||
|
|
||||||
@@ -16,6 +16,10 @@
|
|||||||
repository. For more details, please see below and refer to the
|
repository. For more details, please see below and refer to the
|
||||||
[AppVeyor documentation](https://www.appveyor.com/docs/).
|
[AppVeyor documentation](https://www.appveyor.com/docs/).
|
||||||
|
|
||||||
|
(This applies when using the free tier offered to open source
|
||||||
|
projects. Things will be different using an "Enterprise"
|
||||||
|
installation on customer hardware.)
|
||||||
|
|
||||||
2. Add the ci-scripts respository as a Git Submodule
|
2. Add the ci-scripts respository as a Git Submodule
|
||||||
(see [README](../README.md) one level above).
|
(see [README](../README.md) one level above).
|
||||||
|
|
||||||
@@ -42,7 +46,7 @@
|
|||||||
List of environment variable settings. Each list element (starting with
|
List of environment variable settings. Each list element (starting with
|
||||||
a dash) is one step on the axis of the build matrix. \
|
a dash) is one step on the axis of the build matrix. \
|
||||||
Set `CMP` to select the compiler: `gcc` for the native
|
Set `CMP` to select the compiler: `gcc` for the native
|
||||||
[MinGW](http://mingw-w64.org/) GNU compiler, `vs2008` ...`vs2019`
|
[MinGW](http://mingw-w64.org/) GNU compiler, `vs2010` ...`vs2022`
|
||||||
(options listed above) for the Microsoft Visual Studio compilers.
|
(options listed above) for the Microsoft Visual Studio compilers.
|
||||||
|
|
||||||
Your builds will take long. \
|
Your builds will take long. \
|
||||||
|
|||||||
47
centos6-eol.repo
Normal file
47
centos6-eol.repo
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
[C6.10-base]
|
||||||
|
name=CentOS-6.10 - Base
|
||||||
|
baseurl=http://vault.centos.org/6.10/os/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=1
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-updates]
|
||||||
|
name=CentOS-6.10 - Updates
|
||||||
|
baseurl=http://vault.centos.org/6.10/updates/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=1
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-extras]
|
||||||
|
name=CentOS-6.10 - Extras
|
||||||
|
baseurl=http://vault.centos.org/6.10/extras/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=1
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-contrib]
|
||||||
|
name=CentOS-6.10 - Contrib
|
||||||
|
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=0
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[C6.10-centosplus]
|
||||||
|
name=CentOS-6.10 - CentOSPlus
|
||||||
|
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||||
|
enabled=0
|
||||||
|
metadata_expire=never
|
||||||
|
|
||||||
|
[centos-sclo-rh]
|
||||||
|
name=CentOS-6 - SCLo rh
|
||||||
|
baseurl=http://vault.centos.org/6.10/sclo/$basearch/rh/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
|
||||||
|
enabled=1
|
||||||
|
metadata_expire=never
|
||||||
226
cue-test.py
226
cue-test.py
@@ -8,11 +8,11 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import sys, os, shutil, fileinput
|
import sys, os, shutil, fileinput
|
||||||
import distutils.util
|
|
||||||
import re
|
import re
|
||||||
import subprocess as sp
|
import subprocess as sp
|
||||||
import unittest
|
import unittest
|
||||||
import logging
|
import logging
|
||||||
|
import fnmatch
|
||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
|
|
||||||
builddir = os.getcwd()
|
builddir = os.getcwd()
|
||||||
@@ -22,6 +22,10 @@ if 'TRAVIS' in os.environ:
|
|||||||
ci_service = 'travis'
|
ci_service = 'travis'
|
||||||
ci_os = os.environ['TRAVIS_OS_NAME']
|
ci_os = os.environ['TRAVIS_OS_NAME']
|
||||||
|
|
||||||
|
if 'GITLAB_CI' in os.environ:
|
||||||
|
ci_service = 'gitlab'
|
||||||
|
ci_os = 'linux'
|
||||||
|
|
||||||
if 'APPVEYOR' in os.environ:
|
if 'APPVEYOR' in os.environ:
|
||||||
ci_service = 'appveyor'
|
ci_service = 'appveyor'
|
||||||
if re.match(r'^Visual', os.environ['APPVEYOR_BUILD_WORKER_IMAGE']):
|
if re.match(r'^Visual', os.environ['APPVEYOR_BUILD_WORKER_IMAGE']):
|
||||||
@@ -31,6 +35,13 @@ if 'APPVEYOR' in os.environ:
|
|||||||
elif re.match(r'^macOS', os.environ['APPVEYOR_BUILD_WORKER_IMAGE']):
|
elif re.match(r'^macOS', os.environ['APPVEYOR_BUILD_WORKER_IMAGE']):
|
||||||
ci_os = 'osx'
|
ci_os = 'osx'
|
||||||
|
|
||||||
|
if 'GITHUB_ACTIONS' in os.environ:
|
||||||
|
ci_service = 'github-actions'
|
||||||
|
if os.environ['RUNNER_OS'] == 'macOS':
|
||||||
|
ci_os = 'osx'
|
||||||
|
else:
|
||||||
|
ci_os = os.environ['RUNNER_OS'].lower()
|
||||||
|
|
||||||
|
|
||||||
def find_in_file(regex, filename):
|
def find_in_file(regex, filename):
|
||||||
file = open(filename, "r")
|
file = open(filename, "r")
|
||||||
@@ -55,6 +66,8 @@ import cue
|
|||||||
# we're working with tags (detached heads) a lot: suppress advice
|
# we're working with tags (detached heads) a lot: suppress advice
|
||||||
cue.call_git(['config', '--global', 'advice.detachedHead', 'false'])
|
cue.call_git(['config', '--global', 'advice.detachedHead', 'false'])
|
||||||
|
|
||||||
|
# Don't build dependencies when running unit tests
|
||||||
|
cue.skip_dep_builds = True
|
||||||
|
|
||||||
class TestSourceSet(unittest.TestCase):
|
class TestSourceSet(unittest.TestCase):
|
||||||
|
|
||||||
@@ -67,10 +80,10 @@ class TestSourceSet(unittest.TestCase):
|
|||||||
|
|
||||||
def test_EmptySetupDirsPath(self):
|
def test_EmptySetupDirsPath(self):
|
||||||
del os.environ['SETUP_PATH']
|
del os.environ['SETUP_PATH']
|
||||||
self.assertRaisesRegexp(NameError, '\(SETUP_PATH\) is empty', cue.source_set, 'test01')
|
self.assertRaisesRegex(NameError, '\(SETUP_PATH\) is empty', cue.source_set, 'test01')
|
||||||
|
|
||||||
def test_InvalidSetupName(self):
|
def test_InvalidSetupName(self):
|
||||||
self.assertRaisesRegexp(NameError, 'does not exist in SETUP_PATH', cue.source_set, 'xxdoesnotexistxx')
|
self.assertRaisesRegex(NameError, 'does not exist in SETUP_PATH', cue.source_set, 'xxdoesnotexistxx')
|
||||||
|
|
||||||
def test_ValidSetupName(self):
|
def test_ValidSetupName(self):
|
||||||
capturedOutput = getStringIO()
|
capturedOutput = getStringIO()
|
||||||
@@ -100,18 +113,18 @@ class TestSourceSet(unittest.TestCase):
|
|||||||
self.assertEqual(cue.setup['FOO'], 'bar', 'Setting of single word does not work')
|
self.assertEqual(cue.setup['FOO'], 'bar', 'Setting of single word does not work')
|
||||||
self.assertEqual(cue.setup['FOO2'], 'bar bar2', 'Setting of multiple words does not work')
|
self.assertEqual(cue.setup['FOO2'], 'bar bar2', 'Setting of multiple words does not work')
|
||||||
self.assertEqual(cue.setup['FOO3'], 'bar bar2', 'Indented setting of multiple words does not work')
|
self.assertEqual(cue.setup['FOO3'], 'bar bar2', 'Indented setting of multiple words does not work')
|
||||||
self.assertEqual(cue.setup['SNCSEQ'], 'R2-2-8', 'Setup test01 was not included')
|
self.assertEqual(cue.setup['SNCSEQ'], 'R2-2-9', 'Setup test01 was not included')
|
||||||
|
|
||||||
def test_DoubleIncludeGetsIgnored(self):
|
def test_DoubleIncludeGetsIgnored(self):
|
||||||
capturedOutput = getStringIO()
|
capturedOutput = getStringIO()
|
||||||
sys.stdout = capturedOutput
|
sys.stdout = capturedOutput
|
||||||
cue.source_set('test03')
|
cue.source_set('test03')
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
self.assertRegexpMatches(capturedOutput.getvalue(), 'Ignoring already included setup file')
|
self.assertRegex(capturedOutput.getvalue(), 'Ignoring already included setup file')
|
||||||
|
|
||||||
|
|
||||||
class TestUpdateReleaseLocal(unittest.TestCase):
|
class TestUpdateReleaseLocal(unittest.TestCase):
|
||||||
release_local = os.path.join(cue.cachedir, 'RELEASE.local')
|
release_local = os.path.join(cue.ci['cachedir'], 'RELEASE.local')
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
if os.path.exists(self.release_local):
|
if os.path.exists(self.release_local):
|
||||||
@@ -179,16 +192,21 @@ class TestUpdateReleaseLocal(unittest.TestCase):
|
|||||||
|
|
||||||
class TestAddDependencyUpToDateCheck(unittest.TestCase):
|
class TestAddDependencyUpToDateCheck(unittest.TestCase):
|
||||||
hash_3_15_6 = "ce7943fb44beb22b453ddcc0bda5398fadf72096"
|
hash_3_15_6 = "ce7943fb44beb22b453ddcc0bda5398fadf72096"
|
||||||
location = os.path.join(cue.cachedir, 'base-R3.15.6')
|
location = ''
|
||||||
licensefile = os.path.join(location, 'LICENSE')
|
licensefile = ''
|
||||||
checked_file = os.path.join(location, 'checked_out')
|
checked_file = ''
|
||||||
release_file = os.path.join(location, 'configure', 'RELEASE')
|
release_file = ''
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
os.environ['SETUP_PATH'] = '.:appveyor'
|
os.environ['SETUP_PATH'] = '.:appveyor'
|
||||||
|
cue.clear_lists()
|
||||||
|
cue.detect_context()
|
||||||
|
self.location = os.path.join(cue.ci['cachedir'], 'base-R3.15.6')
|
||||||
|
self.licensefile = os.path.join(self.location, 'LICENSE')
|
||||||
|
self.checked_file = os.path.join(self.location, 'checked_out')
|
||||||
|
self.release_file = os.path.join(self.location, 'configure', 'RELEASE')
|
||||||
if os.path.exists(self.location):
|
if os.path.exists(self.location):
|
||||||
shutil.rmtree(self.location, onerror=cue.remove_readonly)
|
shutil.rmtree(self.location, onerror=cue.remove_readonly)
|
||||||
cue.clear_lists()
|
|
||||||
os.chdir(builddir)
|
os.chdir(builddir)
|
||||||
cue.source_set('defaults')
|
cue.source_set('defaults')
|
||||||
cue.complete_setup('BASE')
|
cue.complete_setup('BASE')
|
||||||
@@ -242,18 +260,21 @@ def is_shallow_repo(place):
|
|||||||
|
|
||||||
|
|
||||||
class TestAddDependencyOptions(unittest.TestCase):
|
class TestAddDependencyOptions(unittest.TestCase):
|
||||||
location = os.path.join(cue.cachedir, 'mcoreutils-master')
|
location = ''
|
||||||
testfile = os.path.join(location, '.ci', 'LICENSE')
|
testfile = ''
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
os.environ['SETUP_PATH'] = '.'
|
os.environ['SETUP_PATH'] = '.'
|
||||||
if os.path.exists(cue.cachedir):
|
|
||||||
shutil.rmtree(cue.cachedir, onerror=cue.remove_readonly)
|
|
||||||
cue.clear_lists()
|
cue.clear_lists()
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
|
if os.path.exists(cue.ci['cachedir']):
|
||||||
|
shutil.rmtree(cue.ci['cachedir'], onerror=cue.remove_readonly)
|
||||||
|
self.location = os.path.join(cue.ci['cachedir'], 'mcoreutils-main')
|
||||||
|
self.testfile = os.path.join(self.location, '.ci', 'LICENSE')
|
||||||
|
os.path.join(cue.ci['cachedir'], 'mcoreutils-main')
|
||||||
cue.source_set('defaults')
|
cue.source_set('defaults')
|
||||||
cue.complete_setup('MCoreUtils')
|
cue.complete_setup('MCoreUtils')
|
||||||
cue.setup['MCoreUtils'] = 'master'
|
cue.setup['MCoreUtils'] = 'main'
|
||||||
|
|
||||||
def test_Default(self):
|
def test_Default(self):
|
||||||
cue.add_dependency('MCoreUtils')
|
cue.add_dependency('MCoreUtils')
|
||||||
@@ -281,7 +302,7 @@ class TestAddDependencyOptions(unittest.TestCase):
|
|||||||
def test_AddMsiTo314(self):
|
def test_AddMsiTo314(self):
|
||||||
cue.complete_setup('BASE')
|
cue.complete_setup('BASE')
|
||||||
cue.setup['BASE'] = 'R3.14.12.1'
|
cue.setup['BASE'] = 'R3.14.12.1'
|
||||||
msifile = os.path.join(cue.cachedir, 'base-R3.14.12.1', 'src', 'dbtools', 'msi.c')
|
msifile = os.path.join(cue.ci['cachedir'], 'base-R3.14.12.1', 'src', 'dbtools', 'msi.c')
|
||||||
cue.add_dependency('BASE')
|
cue.add_dependency('BASE')
|
||||||
self.assertTrue(os.path.exists(msifile), 'MSI was not added to Base 3.14')
|
self.assertTrue(os.path.exists(msifile), 'MSI was not added to Base 3.14')
|
||||||
|
|
||||||
@@ -324,8 +345,16 @@ class TestDefaultModuleURLs(unittest.TestCase):
|
|||||||
@unittest.skipIf(ci_os != 'windows', 'VCVars test only applies to windows')
|
@unittest.skipIf(ci_os != 'windows', 'VCVars test only applies to windows')
|
||||||
class TestVCVars(unittest.TestCase):
|
class TestVCVars(unittest.TestCase):
|
||||||
def test_vcvars(self):
|
def test_vcvars(self):
|
||||||
if ci_service == 'appveyor':
|
if ci_service == 'travis':
|
||||||
|
os.environ['TRAVIS_COMPILER'] = 'vs2017'
|
||||||
|
else:
|
||||||
os.environ['CONFIGURATION'] = 'default'
|
os.environ['CONFIGURATION'] = 'default'
|
||||||
|
if ci_service == 'github-actions' and os.environ['IMAGEOS'] == 'win16':
|
||||||
|
os.environ['CMP'] = 'vs2017'
|
||||||
|
elif ci_service == 'github-actions' and os.environ['IMAGEOS'] == 'win19':
|
||||||
|
os.environ['CMP'] = 'vs2019'
|
||||||
|
else:
|
||||||
|
os.environ['CMP'] = 'vs2022'
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
cue.with_vcvars('env')
|
cue.with_vcvars('env')
|
||||||
|
|
||||||
@@ -500,7 +529,7 @@ class TestTravisDetectContext(unittest.TestCase):
|
|||||||
sys.stdout = capturedOutput
|
sys.stdout = capturedOutput
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
self.assertRegexpMatches(capturedOutput.getvalue(), "Variable 'STATIC' not supported anymore")
|
self.assertRegex(capturedOutput.getvalue(), "Variable 'STATIC' not supported anymore")
|
||||||
|
|
||||||
def test_MisspelledBcfgGetsWarning(self):
|
def test_MisspelledBcfgGetsWarning(self):
|
||||||
os.environ['BCFG'] = 'static-dubug'
|
os.environ['BCFG'] = 'static-dubug'
|
||||||
@@ -508,7 +537,7 @@ class TestTravisDetectContext(unittest.TestCase):
|
|||||||
sys.stdout = capturedOutput
|
sys.stdout = capturedOutput
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
self.assertRegexpMatches(capturedOutput.getvalue(), "Unrecognized build configuration setting")
|
self.assertRegex(capturedOutput.getvalue(), "Unrecognized build configuration setting")
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipIf(ci_service != 'appveyor', 'Run appveyor tests only on appveyor')
|
@unittest.skipIf(ci_service != 'appveyor', 'Run appveyor tests only on appveyor')
|
||||||
@@ -661,7 +690,7 @@ class TestAppveyorDetectContext(unittest.TestCase):
|
|||||||
sys.stdout = capturedOutput
|
sys.stdout = capturedOutput
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
self.assertRegexpMatches(capturedOutput.getvalue(), "Variable 'STATIC' not supported anymore")
|
self.assertRegex(capturedOutput.getvalue(), "Variable 'STATIC' not supported anymore")
|
||||||
|
|
||||||
def test_MisspelledConfigurationGetsWarning(self):
|
def test_MisspelledConfigurationGetsWarning(self):
|
||||||
os.environ['CONFIGURATION'] = 'static-dubug'
|
os.environ['CONFIGURATION'] = 'static-dubug'
|
||||||
@@ -669,16 +698,19 @@ class TestAppveyorDetectContext(unittest.TestCase):
|
|||||||
sys.stdout = capturedOutput
|
sys.stdout = capturedOutput
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
self.assertRegexpMatches(capturedOutput.getvalue(), "Unrecognized build configuration setting")
|
self.assertRegex(capturedOutput.getvalue(), "Unrecognized build configuration setting")
|
||||||
|
|
||||||
|
|
||||||
class TestSetupForBuild(unittest.TestCase):
|
class TestSetupForBuild(unittest.TestCase):
|
||||||
args = Namespace(paths=[])
|
args = Namespace(extra_env_vars=[])
|
||||||
cue.building_base = True
|
|
||||||
if ci_os == 'windows':
|
if ci_os == 'windows':
|
||||||
sp.check_call(['choco', 'install', 'make'])
|
choco_installs = ['make']
|
||||||
|
if ci_service != 'appveyor':
|
||||||
|
choco_installs.append('strawberryperl')
|
||||||
|
sp.check_call(['choco', 'install', '-ry'] + choco_installs)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
cue.building_base = True
|
||||||
if ci_service == 'appveyor':
|
if ci_service == 'appveyor':
|
||||||
os.environ['CONFIGURATION'] = 'default'
|
os.environ['CONFIGURATION'] = 'default'
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
@@ -689,7 +721,7 @@ class TestSetupForBuild(unittest.TestCase):
|
|||||||
|
|
||||||
def test_AddPathsOption(self):
|
def test_AddPathsOption(self):
|
||||||
os.environ['FOOBAR'] = 'BAR'
|
os.environ['FOOBAR'] = 'BAR'
|
||||||
args = Namespace(paths=['/my/{FOOBAR}/dir', '/my/foobar'])
|
args = Namespace(extra_env_vars=['PATH=/my/{FOOBAR}/dir', 'PATH=/my/foobar'])
|
||||||
cue.setup_for_build(args)
|
cue.setup_for_build(args)
|
||||||
self.assertTrue(re.search('/my/BAR/dir', os.environ['PATH']), 'Expanded path not in PATH')
|
self.assertTrue(re.search('/my/BAR/dir', os.environ['PATH']), 'Expanded path not in PATH')
|
||||||
self.assertTrue(re.search('/foobar', os.environ['PATH']), 'Plain path not in PATH')
|
self.assertTrue(re.search('/foobar', os.environ['PATH']), 'Plain path not in PATH')
|
||||||
@@ -726,10 +758,10 @@ class TestSetupForBuild(unittest.TestCase):
|
|||||||
|
|
||||||
@unittest.skipIf(ci_os != 'windows', 'HostArchPlatform test only applies to windows')
|
@unittest.skipIf(ci_os != 'windows', 'HostArchPlatform test only applies to windows')
|
||||||
def test_HostArchPlatform(self):
|
def test_HostArchPlatform(self):
|
||||||
if ci_service == 'travis':
|
if ci_service == 'appveyor':
|
||||||
platforms = ['x64']
|
|
||||||
else:
|
|
||||||
platforms = ['x86', 'x64']
|
platforms = ['x86', 'x64']
|
||||||
|
else:
|
||||||
|
platforms = ['x64']
|
||||||
for platform in platforms:
|
for platform in platforms:
|
||||||
for cc in ['vs2019', 'gcc']:
|
for cc in ['vs2019', 'gcc']:
|
||||||
cue.ci['platform'] = platform
|
cue.ci['platform'] = platform
|
||||||
@@ -750,18 +782,17 @@ class TestSetupForBuild(unittest.TestCase):
|
|||||||
self.assertTrue(re.search('-mingw$', os.environ['EPICS_HOST_ARCH']),
|
self.assertTrue(re.search('-mingw$', os.environ['EPICS_HOST_ARCH']),
|
||||||
'EPICS_HOST_ARCH (found {0}) is not -mingw for {1} / {2}'
|
'EPICS_HOST_ARCH (found {0}) is not -mingw for {1} / {2}'
|
||||||
.format(os.environ['EPICS_HOST_ARCH'], cc, platform))
|
.format(os.environ['EPICS_HOST_ARCH'], cc, platform))
|
||||||
pattern = {'x86': 'mingw32', 'x64': 'mingw64'}
|
if ci_service == 'appveyor':
|
||||||
self.assertTrue(re.search(pattern[platform], os.environ['PATH']),
|
pattern = {'x86': 'mingw32', 'x64': 'mingw64'}
|
||||||
'Binary location for {0} not in PATH (found {1})'
|
self.assertTrue(re.search(pattern[platform], os.environ['PATH']),
|
||||||
.format(pattern[platform], os.environ['PATH']))
|
'Binary location for {0} not in PATH (found PATH = {1})'
|
||||||
|
.format(pattern[platform], os.environ['PATH']))
|
||||||
|
|
||||||
@unittest.skipIf(ci_os != 'windows', 'Strawberry perl test only applies to windows')
|
@unittest.skipIf(ci_os != 'windows', 'Strawberry perl test only applies to windows')
|
||||||
def test_StrawberryInPathVS2019(self):
|
def test_StrawberryInPath(self):
|
||||||
if 'APPVEYOR' in os.environ:
|
|
||||||
os.environ['CMP'] = 'vs2019'
|
|
||||||
cue.setup_for_build(self.args)
|
cue.setup_for_build(self.args)
|
||||||
self.assertTrue(re.search('strawberry', os.environ['PATH'], flags=re.IGNORECASE),
|
self.assertTrue(re.search('strawberry', os.environ['PATH'], flags=re.IGNORECASE),
|
||||||
'Strawberry Perl installed but location not in PATH (found {0})'
|
'Strawberry Perl location not in PATH (found PATH = {0})'
|
||||||
.format(os.environ['PATH']))
|
.format(os.environ['PATH']))
|
||||||
|
|
||||||
def setBase314(self, yesno):
|
def setBase314(self, yesno):
|
||||||
@@ -809,7 +840,7 @@ class TestSetupForBuild(unittest.TestCase):
|
|||||||
def test_ExtraMakeArgs(self):
|
def test_ExtraMakeArgs(self):
|
||||||
os.environ['EXTRA'] = 'bla'
|
os.environ['EXTRA'] = 'bla'
|
||||||
for ind in range(1,5):
|
for ind in range(1,5):
|
||||||
os.environ['EXTRA{0}'.format(ind)] = 'bla {0}'.format(ind)
|
os.environ['EXTRA{0}'.format(ind)] = '"bla {0}"'.format(ind)
|
||||||
cue.setup_for_build(self.args)
|
cue.setup_for_build(self.args)
|
||||||
self.assertTrue(cue.extra_makeargs[0] == 'bla', 'Extra make arg [0] not set')
|
self.assertTrue(cue.extra_makeargs[0] == 'bla', 'Extra make arg [0] not set')
|
||||||
for ind in range(1,5):
|
for ind in range(1,5):
|
||||||
@@ -817,6 +848,116 @@ class TestSetupForBuild(unittest.TestCase):
|
|||||||
'Extra make arg [{0}] not set (expected "bla {0}", found "{1}")'
|
'Extra make arg [{0}] not set (expected "bla {0}", found "{1}")'
|
||||||
.format(ind, cue.extra_makeargs[ind]))
|
.format(ind, cue.extra_makeargs[ind]))
|
||||||
|
|
||||||
|
|
||||||
|
class TestHooks(unittest.TestCase):
|
||||||
|
location = os.path.join(cue.ci['cachedir'], 'hook_test')
|
||||||
|
bla_file = os.path.join(location, 'bla.txt')
|
||||||
|
new_file = os.path.join(location, 'dd', 'new.txt')
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
if os.path.exists(self.location):
|
||||||
|
shutil.rmtree(self.location, onerror=cue.remove_readonly)
|
||||||
|
try:
|
||||||
|
os.makedirs(self.location)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
with open(self.bla_file, 'w') as f:
|
||||||
|
f.write('''LINE1=YES
|
||||||
|
LINE2=NO
|
||||||
|
''')
|
||||||
|
|
||||||
|
def test_patchfile(self):
|
||||||
|
hook = os.path.join(builddir, 'test.patch')
|
||||||
|
cue.apply_patch(hook, cwd=self.location)
|
||||||
|
line1_yes = False
|
||||||
|
with open(self.bla_file) as f:
|
||||||
|
if 'LINE1=YES' in f.read():
|
||||||
|
line1_yes = True
|
||||||
|
self.assertFalse(line1_yes, "Patch didn't change line in test file 'bla.txt'")
|
||||||
|
self.assertTrue(os.path.exists(self.new_file), "patch didn't add new file")
|
||||||
|
|
||||||
|
def test_archiveZip(self):
|
||||||
|
hook = os.path.join(builddir, 'test.zip')
|
||||||
|
cue.extract_archive(hook, cwd=self.location)
|
||||||
|
self.assertTrue(os.path.exists(self.new_file), "archive extract didn't add new file")
|
||||||
|
|
||||||
|
def test_archive7z(self):
|
||||||
|
hook = os.path.join(builddir, 'test.7z')
|
||||||
|
cue.extract_archive(hook, cwd=self.location)
|
||||||
|
self.assertTrue(os.path.exists(self.new_file), "archive extract didn't add new file")
|
||||||
|
|
||||||
|
@unittest.skipIf(ci_os != 'linux', 'CrossCompatibilityHandling tests only apply to linux')
|
||||||
|
class TestCrossCompatibilityHandling(unittest.TestCase):
|
||||||
|
args = Namespace(extra_env_vars=[])
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
cue.clear_lists()
|
||||||
|
os.environ.pop('CI_CROSS_TARGETS', None)
|
||||||
|
os.environ.pop('RTEMS_TARGET', None)
|
||||||
|
os.environ.pop('RTEMS', None)
|
||||||
|
os.environ.pop('WINE', None)
|
||||||
|
os.environ['MODULES'] = ''
|
||||||
|
cue.detect_context()
|
||||||
|
# Make cue.prepare() reconfigure base
|
||||||
|
for root, dirs, files in os.walk(cue.ci['cachedir']):
|
||||||
|
if 'checked_out' in files:
|
||||||
|
if fnmatch.fnmatch(root, '*/base-*'):
|
||||||
|
os.remove(os.path.join(root, 'checked_out'))
|
||||||
|
|
||||||
|
def runtest_rtems(self, arch, ver):
|
||||||
|
cue.prepare(self.args)
|
||||||
|
self.assertTrue('CI_CROSS_TARGETS' in os.environ, "CI_CROSS_TARGETS has not been set")
|
||||||
|
self.assertTrue(os.environ['CI_CROSS_TARGETS'].startswith(':' + arch),
|
||||||
|
"CI_CROSS_TARGETS is {0} (expected: :{1}...)"
|
||||||
|
.format(os.environ['CI_CROSS_TARGETS'], arch))
|
||||||
|
self.assertTrue(os.environ['CI_CROSS_TARGETS'].endswith('@' + ver),
|
||||||
|
"CI_CROSS_TARGETS is {0} (expected: ...@{1})"
|
||||||
|
.format(os.environ['CI_CROSS_TARGETS'], ver))
|
||||||
|
|
||||||
|
def test_RTEMS49_no_target(self):
|
||||||
|
os.environ['RTEMS'] = '4.9'
|
||||||
|
self.runtest_rtems('RTEMS-pc386', '4.9')
|
||||||
|
|
||||||
|
def test_RTEMS49_with_target(self):
|
||||||
|
os.environ['RTEMS'] = '4.9'
|
||||||
|
os.environ['RTEMS_TARGET'] = 'RTEMS-pc386'
|
||||||
|
self.runtest_rtems('RTEMS-pc386', '4.9')
|
||||||
|
|
||||||
|
def test_RTEMS410_no_target(self):
|
||||||
|
os.environ['RTEMS'] = '4.10'
|
||||||
|
self.runtest_rtems('RTEMS-pc386', '4.10')
|
||||||
|
|
||||||
|
def test_RTEMS410_with_target(self):
|
||||||
|
os.environ['RTEMS'] = '4.10'
|
||||||
|
os.environ['RTEMS_TARGET'] = 'RTEMS-pc386'
|
||||||
|
self.runtest_rtems('RTEMS-pc386', '4.10')
|
||||||
|
|
||||||
|
def test_RTEMS5_no_target(self):
|
||||||
|
os.environ['RTEMS'] = '5'
|
||||||
|
self.runtest_rtems('RTEMS-pc686', '5')
|
||||||
|
|
||||||
|
def test_RTEMS5_with_target(self):
|
||||||
|
os.environ['RTEMS'] = '5'
|
||||||
|
os.environ['RTEMS_TARGET'] = 'RTEMS-pc686'
|
||||||
|
self.runtest_rtems('RTEMS-pc686', '5')
|
||||||
|
|
||||||
|
def test_WINE32(self):
|
||||||
|
os.environ['WINE'] = '32'
|
||||||
|
cue.prepare(self.args)
|
||||||
|
self.assertTrue('CI_CROSS_TARGETS' in os.environ, "CI_CROSS_TARGETS has not been set")
|
||||||
|
self.assertEqual(os.environ['CI_CROSS_TARGETS'], ':win32-x86-mingw',
|
||||||
|
"CI_CROSS_TARGETS is {0} (expected: :win32-x86-mingw)"
|
||||||
|
.format(os.environ['CI_CROSS_TARGETS']))
|
||||||
|
|
||||||
|
def test_WINE64(self):
|
||||||
|
os.environ['WINE'] = '64'
|
||||||
|
cue.prepare(self.args)
|
||||||
|
self.assertTrue('CI_CROSS_TARGETS' in os.environ, "CI_CROSS_TARGETS has not been set")
|
||||||
|
self.assertEqual(os.environ['CI_CROSS_TARGETS'], ':windows-x64-mingw',
|
||||||
|
"CI_CROSS_TARGETS is {0} (expected: :windows-x64-mingw)"
|
||||||
|
.format(os.environ['CI_CROSS_TARGETS']))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
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)
|
||||||
@@ -827,5 +968,14 @@ if __name__ == "__main__":
|
|||||||
if sys.argv[1:] == ['env']:
|
if sys.argv[1:] == ['env']:
|
||||||
# testing with_vcvars
|
# testing with_vcvars
|
||||||
[print(K, '=', V) for K, V in os.environ.items()]
|
[print(K, '=', V) for K, V in os.environ.items()]
|
||||||
|
elif ci_os == 'windows' and sys.argv[1:] == ['findvs']:
|
||||||
|
from fnmatch import fnmatch
|
||||||
|
print('Available Visual Studio versions')
|
||||||
|
for base in (r'C:\Program Files (x86)', r'C:\Program Files'):
|
||||||
|
for root, dirs, files in os.walk(base):
|
||||||
|
for fname in files:
|
||||||
|
if fnmatch(fname, 'vcvarsall.bat'):
|
||||||
|
print('Found', os.path.join(root, fname))
|
||||||
|
sys.stdout.flush()
|
||||||
else:
|
else:
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ NTYPES_REPONAME=normativeTypesCPP
|
|||||||
NTYPES_REPOOWNER=epics-base
|
NTYPES_REPOOWNER=epics-base
|
||||||
|
|
||||||
# Sequencer
|
# Sequencer
|
||||||
SNCSEQ_REPOURL=https://www-csr.bessy.de/control/SoftDist/sequencer/repo/branch-2-2.git
|
SNCSEQ_REPOURL=https://github.com/mdavidsaver/sequencer-mirror.git
|
||||||
SNCSEQ_DEPTH=0
|
SNCSEQ_DEPTH=0
|
||||||
SNCSEQ_DIRNAME=seq
|
SNCSEQ_DIRNAME=seq
|
||||||
|
|
||||||
|
|||||||
70
github-actions/README.md
Normal file
70
github-actions/README.md
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
# GitHub Actions Scripts for EPICS Modules
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 20 parallel runners on Linux/Windows (5 runners on MacOS)
|
||||||
|
- Ubuntu 18/20/22, MacOS 11/12, Windows Server 2019/2022
|
||||||
|
- Compile natively on Linux (gcc, clang)
|
||||||
|
- Compile natively on MacOS (clang)
|
||||||
|
- Compile natively on Windows (gcc/MinGW, Visual Studio 2019/2022)
|
||||||
|
- Cross-compile for Windows 32bit and 64bit using MinGW and WINE
|
||||||
|
- 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
|
||||||
|
|
||||||
|
1. Add the ci-scripts respository as a Git Submodule
|
||||||
|
(see [README](../README.md) one level above).
|
||||||
|
|
||||||
|
2. Add settings files defining which dependencies in which versions
|
||||||
|
you want to build against
|
||||||
|
(see [README](../README.md) one level above).
|
||||||
|
|
||||||
|
3. Create a GitHub Actions configuration by copying one of the workflow
|
||||||
|
examples into the directory `.github/workflows` of your module.
|
||||||
|
```bash
|
||||||
|
$ mkdir -p .github/workflows
|
||||||
|
$ cp .ci/github-actions/ci-scripts-build.yml.example-full .github/workflows/ci-scripts-build.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Edit the workflow configuration to include the build jobs you want
|
||||||
|
GitHub Actions to run.
|
||||||
|
|
||||||
|
Build jobs are specified in the `jobs: <job-name>: strategy:`
|
||||||
|
declaration. The `matrix:` element specifies the axes as configuration
|
||||||
|
parameters with their lists of values,
|
||||||
|
`env:` (on the build level) controls the setting of environment variables
|
||||||
|
(which can be matrix parameters).
|
||||||
|
The `runs-on:` setting specifies the image (operating system) of the
|
||||||
|
runner.
|
||||||
|
The `name:` is what shows up in the web interface for the workflow,
|
||||||
|
builds and jobs, and the elements under `steps:` describe the actions
|
||||||
|
executed for each job of the matrix.
|
||||||
|
|
||||||
|
Please check the comments in the examples for more hints, and the
|
||||||
|
[GitHub Actions documentation](https://help.github.com/en/actions)
|
||||||
|
for a lot more options and details.
|
||||||
|
|
||||||
|
5. Push your changes and click on the `Actions` tab of your GitHub repository
|
||||||
|
page to see your build results.
|
||||||
|
|
||||||
|
## Specifics
|
||||||
|
|
||||||
|
#### Quote Environment Variable Values
|
||||||
|
|
||||||
|
Variable settings distinguish between numerical and string values.
|
||||||
|
Better quote all branch and tag names. E.g.,
|
||||||
|
```yaml
|
||||||
|
env:
|
||||||
|
BASE: "7.0"
|
||||||
|
```
|
||||||
|
to avoid ci-scripts trying to `git clone` with `--branch 7`.
|
||||||
|
|
||||||
|
## Caches
|
||||||
|
|
||||||
|
GitHub Actions provides caching of dependencies.
|
||||||
|
|
||||||
|
However, since their cache restore and create algorithm is fundamentally
|
||||||
|
different from those used by Travis and AppVeyor, this will require some
|
||||||
|
more changes in ci-scripts to work. Be patient.
|
||||||
136
github-actions/ci-scripts-build.yml.example-full
Normal file
136
github-actions/ci-scripts-build.yml.example-full
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
# .github/workflows/ci-scripts-build.yml for use with EPICS Base ci-scripts
|
||||||
|
# (see: https://github.com/epics-base/ci-scripts)
|
||||||
|
|
||||||
|
# This is YAML - indentation levels are crucial
|
||||||
|
|
||||||
|
# Set the 'name:' properties to values that work for you (MYMODULE)
|
||||||
|
|
||||||
|
name: MYMODULE
|
||||||
|
|
||||||
|
# Trigger on pushes and PRs to any branch
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- 'documentation/*'
|
||||||
|
- '**/*.html'
|
||||||
|
- '**/*.md'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
SETUP_PATH: .ci-local:.ci
|
||||||
|
# For the sequencer on Linux/Windows/MacOS
|
||||||
|
APT: re2c
|
||||||
|
CHOCO: re2c
|
||||||
|
BREW: re2c
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-base:
|
||||||
|
name: ${{ matrix.name }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
# Set environment variables from matrix parameters
|
||||||
|
env:
|
||||||
|
CMP: ${{ matrix.cmp }}
|
||||||
|
BCFG: ${{ matrix.configuration }}
|
||||||
|
WINE: ${{ matrix.wine }}
|
||||||
|
RTEMS: ${{ matrix.rtems }}
|
||||||
|
RTEMS_TARGET: ${{ matrix.rtems_target }}
|
||||||
|
EXTRA: ${{ matrix.extra }}
|
||||||
|
TEST: ${{ matrix.test }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# Job names also name artifacts, character limitations apply
|
||||||
|
include:
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: default
|
||||||
|
wine: "64"
|
||||||
|
name: "Ub-24 gcc + MinGW"
|
||||||
|
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: static
|
||||||
|
wine: "64"
|
||||||
|
name: "Ub-24 gcc + MinGW, static"
|
||||||
|
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: static
|
||||||
|
extra: "CMD_CXXFLAGS=-std=c++11"
|
||||||
|
name: "Ub-24 gcc C++11, static"
|
||||||
|
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: clang
|
||||||
|
configuration: default
|
||||||
|
extra: "CMD_CXXFLAGS=-std=c++11"
|
||||||
|
name: "Ub-24 clang C++11"
|
||||||
|
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: default
|
||||||
|
cross: "RTEMS-pc686-qemu@5"
|
||||||
|
name: "Ub-22 gcc + RT-5.1 pc686"
|
||||||
|
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: default
|
||||||
|
cross: "RTEMS-beatnik@5"
|
||||||
|
test: NO
|
||||||
|
name: "Ub-22 gcc + RT-5.1 beatnik"
|
||||||
|
|
||||||
|
- os: macos-latest
|
||||||
|
cmp: clang
|
||||||
|
configuration: default
|
||||||
|
name: "MacOS clang"
|
||||||
|
|
||||||
|
- os: windows-2022
|
||||||
|
cmp: gcc
|
||||||
|
configuration: default
|
||||||
|
name: "Win2022 MinGW"
|
||||||
|
|
||||||
|
- os: windows-2022
|
||||||
|
cmp: gcc
|
||||||
|
configuration: static
|
||||||
|
name: "Win2022 MinGW, static"
|
||||||
|
|
||||||
|
- os: windows-2022
|
||||||
|
cmp: vs2022
|
||||||
|
configuration: default
|
||||||
|
name: "Win2022 MSC-22"
|
||||||
|
|
||||||
|
- os: windows-2022
|
||||||
|
cmp: vs2022
|
||||||
|
configuration: static
|
||||||
|
name: "Win2022 MSC-22, static"
|
||||||
|
|
||||||
|
- os: ubuntu-latest
|
||||||
|
cmp: gcc
|
||||||
|
configuration: default
|
||||||
|
name: "Cross linux-aarch64"
|
||||||
|
cross: linux-aarch64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
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: 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 -T 15M test
|
||||||
|
- name: Upload tapfiles Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: tapfiles ${{ matrix.name }}
|
||||||
|
path: '**/O.*/*.tap'
|
||||||
|
- name: Collect and show test results
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: python .ci/cue.py -T 5M test-results
|
||||||
76
github-actions/ci-scripts-build.yml.example-mini
Normal file
76
github-actions/ci-scripts-build.yml.example-mini
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
# .github/workflows/ci-scripts-build.yml for use with EPICS Base ci-scripts
|
||||||
|
# (see: https://github.com/epics-base/ci-scripts)
|
||||||
|
|
||||||
|
# This is YAML - indentation levels are crucial
|
||||||
|
|
||||||
|
# Set the 'name:' properties to values that work for you
|
||||||
|
|
||||||
|
name: MYMODULE
|
||||||
|
|
||||||
|
# Trigger on pushes and PRs to any branch
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- 'documentation/*'
|
||||||
|
- '**/*.html'
|
||||||
|
- '**/*.md'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
SETUP_PATH: .ci-local:.ci
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-linux:
|
||||||
|
name: ${{ matrix.name }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
# Set environment variables from matrix parameters
|
||||||
|
env:
|
||||||
|
CMP: ${{ matrix.cmp }}
|
||||||
|
BCFG: ${{ matrix.configuration }}
|
||||||
|
BASE: ${{ matrix.base }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: default
|
||||||
|
base: "3.15"
|
||||||
|
name: "3.15 Ub-24 gcc"
|
||||||
|
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: default
|
||||||
|
base: "7.0"
|
||||||
|
name: "7.0 Ub-24 gcc"
|
||||||
|
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: static
|
||||||
|
base: "3.15"
|
||||||
|
name: "3.15 Ub-24 gcc static"
|
||||||
|
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: gcc
|
||||||
|
configuration: debug
|
||||||
|
base: "3.15"
|
||||||
|
name: "3.15 Ub-24 gcc debug"
|
||||||
|
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
cmp: clang
|
||||||
|
configuration: default
|
||||||
|
base: "3.15"
|
||||||
|
name: "3.15 Ub-24 clang"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
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
|
||||||
121
gitlab/.gitlab-ci.yml.example-full
Normal file
121
gitlab/.gitlab-ci.yml.example-full
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
# .gitlab-ci.yml for testing EPICS Base ci-scripts
|
||||||
|
# (see: https://github.com/epics-base/ci-scripts)
|
||||||
|
|
||||||
|
# This is YAML - indentation levels are crucial
|
||||||
|
|
||||||
|
# GitLab runner can use any Docker container, we're using this one
|
||||||
|
# to be comparable with the other CI services
|
||||||
|
image: ubuntu:bionic
|
||||||
|
|
||||||
|
cache:
|
||||||
|
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||||
|
paths:
|
||||||
|
- .cache/
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GIT_SUBMODULE_STRATEGY: "recursive"
|
||||||
|
SETUP_PATH: ".ci-local:.ci"
|
||||||
|
BASE_RECURSIVE: "NO"
|
||||||
|
# Additional packages needed for
|
||||||
|
# | EPICS |clang| Windows cross builds |RTEMS testing |sequencer
|
||||||
|
APT: "libreadline6-dev libncurses5-dev perl clang g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86 re2c"
|
||||||
|
CMP: "gcc"
|
||||||
|
BGFC: "default"
|
||||||
|
|
||||||
|
# Template for build jobs (hidden)
|
||||||
|
.build:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- apt-get update -qq && apt-get install -y -qq build-essential git python curl p7zip-full
|
||||||
|
- python .ci/cue.py prepare
|
||||||
|
script:
|
||||||
|
- python .ci/cue.py build
|
||||||
|
- python .ci/cue.py test
|
||||||
|
- python .ci/cue.py test-results
|
||||||
|
|
||||||
|
# If you need to do more during install and build,
|
||||||
|
# add a local directory to your module and do e.g.
|
||||||
|
# - ./.ci-local/travis/install-extras.sh
|
||||||
|
|
||||||
|
# Define build jobs
|
||||||
|
|
||||||
|
# Well-known variables to use
|
||||||
|
# SET source setup file
|
||||||
|
# ADD_MODULES extra modules (for a specific job)
|
||||||
|
# BCFG build configuration (static/debug/static-debug;
|
||||||
|
# default: shared-optimized)
|
||||||
|
# TEST set to NO to skip running the tests (default: YES)
|
||||||
|
# VV set to make build scripts verbose (default: unset)
|
||||||
|
# EXTRA content will be added to make command line
|
||||||
|
# EXTRA1..5 more additional arguments for the make command
|
||||||
|
# (one argument per variable)
|
||||||
|
|
||||||
|
# Usually from setup files, but may be specified or overridden
|
||||||
|
# on a job line
|
||||||
|
# MODULES list of dependency modules
|
||||||
|
# BASE branch or release tag name of the EPICS Base to use
|
||||||
|
# <MODULE> branch or release tag for a specific module
|
||||||
|
# ... see README for setup file syntax description
|
||||||
|
|
||||||
|
# Different configurations of gcc and clang
|
||||||
|
gcc_default:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "7.0"
|
||||||
|
|
||||||
|
gcc_static:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "7.0"
|
||||||
|
BCFG: "static"
|
||||||
|
|
||||||
|
clang_default:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "7.0"
|
||||||
|
CMP: "clang"
|
||||||
|
|
||||||
|
clang_static_c++11:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "7.0"
|
||||||
|
CMP: "clang"
|
||||||
|
BCFG: "static"
|
||||||
|
EXTRA: "CMD_CXXFLAGS=-std=c++11"
|
||||||
|
|
||||||
|
# Cross-compilations to Windows using gcc/MinGW and WINE
|
||||||
|
wine32_default:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "3.15"
|
||||||
|
BCFG: "static"
|
||||||
|
WINE: "32"
|
||||||
|
TEST: "NO"
|
||||||
|
|
||||||
|
wine64_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "7.0"
|
||||||
|
BCFG: "debug"
|
||||||
|
WINE: "64"
|
||||||
|
|
||||||
|
# Cross-builds to RTEMS 4.9, 4.10 and 5
|
||||||
|
rtems4.9_default:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
RTEMS: "4.9"
|
||||||
|
BASE: "3.15"
|
||||||
|
|
||||||
|
rtems4.10_debug:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
RTEMS: "4.10"
|
||||||
|
BASE: "7.0"
|
||||||
|
BCFG: "debug"
|
||||||
|
|
||||||
|
rtems5_default:
|
||||||
|
extends: .build
|
||||||
|
image: ubuntu:focal
|
||||||
|
variables:
|
||||||
|
RTEMS: "5"
|
||||||
|
RTEMS_TARGET: "RTEMS-pc686-qemu"
|
||||||
36
gitlab/.gitlab-ci.yml.example-mini
Normal file
36
gitlab/.gitlab-ci.yml.example-mini
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# .gitlab-ci.yml for testing EPICS Base ci-scripts
|
||||||
|
# (see: https://github.com/epics-base/ci-scripts)
|
||||||
|
|
||||||
|
image: ubuntu:bionic
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GIT_SUBMODULE_STRATEGY: "recursive"
|
||||||
|
SETUP_PATH: ".ci-local:.ci"
|
||||||
|
BASE_RECURSIVE: "NO"
|
||||||
|
# Minimal set of packages needed to compile EPICS Base
|
||||||
|
APT: "libreadline6-dev libncurses5-dev perl"
|
||||||
|
CMP: "gcc"
|
||||||
|
BGFC: "default"
|
||||||
|
|
||||||
|
# Template for build jobs (hidden)
|
||||||
|
.build:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- apt-get update -qq && apt-get install -y -qq build-essential git python curl p7zip-full
|
||||||
|
- python .ci/cue.py prepare
|
||||||
|
script:
|
||||||
|
- python .ci/cue.py build
|
||||||
|
- python .ci/cue.py test
|
||||||
|
- python .ci/cue.py test-results
|
||||||
|
|
||||||
|
# Build on Linux using default gcc for Base branches 7.0 and 3.15
|
||||||
|
|
||||||
|
gcc_base_7_0:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "7.0"
|
||||||
|
|
||||||
|
gcc_base_3_15:
|
||||||
|
extends: .build
|
||||||
|
variables:
|
||||||
|
BASE: "3.15"
|
||||||
69
gitlab/README.md
Normal file
69
gitlab/README.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# GitLab CI/CD Scripts for EPICS Modules
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Docker-based runners on Linux (one VM instance per job)
|
||||||
|
- Can use any Docker image from Dockerhub (the examples use
|
||||||
|
`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 (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
|
||||||
|
|
||||||
|
1. Get an account on [GitLab](https://gitlab.com/), create a project
|
||||||
|
for your support module and have it mirror your upstream GitHub
|
||||||
|
repository. For more details, please refer to the
|
||||||
|
[GitLab CI/CD documentation](https://docs.gitlab.com/ee/README.html).
|
||||||
|
|
||||||
|
(This applies when using the free tier offered to open source
|
||||||
|
projects. Things will be different using an "Enterprise"
|
||||||
|
installation on customer hardware.)
|
||||||
|
|
||||||
|
2. Add the ci-scripts respository as a Git Submodule
|
||||||
|
(see [README](../README.md) one level above).
|
||||||
|
|
||||||
|
3. Add settings files defining which dependencies in which versions
|
||||||
|
you want to build against
|
||||||
|
(see [README](../README.md) one level above).
|
||||||
|
|
||||||
|
4. Create a GitLab configuration by copying one of the examples into
|
||||||
|
the root directory of your module.
|
||||||
|
```
|
||||||
|
$ cp .ci/gitlab/.gitlab-ci.yml.example-full .gitlab-ci.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Edit the `.gitlab-ci.yml` configuration to include the jobs you want
|
||||||
|
GitLab CI/CD to run.
|
||||||
|
|
||||||
|
Build jobs are declared in the list at the end of the file.
|
||||||
|
Each element (starting with the un-indented line) defines the
|
||||||
|
settings for one build job. `extends:` specifies a template to use as
|
||||||
|
a default structure, `variables:` controls the setting of environment
|
||||||
|
variables (overwriting settings from the template).
|
||||||
|
Also see the comments in the examples for more hints, and the
|
||||||
|
[GitLab CI/CD documentation](https://docs.gitlab.com/ee/README.html)
|
||||||
|
for more options and details.
|
||||||
|
|
||||||
|
6. Push your changes to GitHub, wait for the synchronization (every 5min)
|
||||||
|
and check [GitLab](https://gitlab.com/) for your build results.
|
||||||
|
|
||||||
|
## Caches
|
||||||
|
|
||||||
|
GitLab is configured to keep the caches separate for different jobs.
|
||||||
|
|
||||||
|
However, changing the job description (in the `.gitlab-ci.yml`
|
||||||
|
configuration file) or its environment settings or changing a value
|
||||||
|
inside a setup file will _not_ invalidate the cache - you will
|
||||||
|
have to manually delete the caches through the GitLab web interface.
|
||||||
|
|
||||||
|
Caches are automatically removed after approx. four weeks.
|
||||||
|
Your jobs will have to rebuild them once in a while.
|
||||||
|
|
||||||
|
## Miscellanea
|
||||||
|
|
||||||
|
To use the feature to extract `.zip`/`.7z` archives by setting
|
||||||
|
`*_HOOK` variables, the Linux and MacOS runners need the APT package
|
||||||
|
`p7zip-full` resp. the Homebrew package `p7zip` installed.
|
||||||
14
test.patch
Normal file
14
test.patch
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
diff -ruN a/bla.txt b/bla.txt
|
||||||
|
--- a/bla.txt 2020-06-19 18:54:43.129076711 +0200
|
||||||
|
+++ b/bla.txt 2020-06-19 18:55:05.093948316 +0200
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
-LINE1=YES
|
||||||
|
+LINE1=NO
|
||||||
|
LINE2=NO
|
||||||
|
|
||||||
|
diff -ruN a/dd/new.txt b/dd/new.txt
|
||||||
|
--- a/dd/new.txt 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ b/dd/new.txt 2020-06-19 18:55:35.255032413 +0200
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+NEW LINE 1
|
||||||
|
+NEW LINE 2
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
MODULES="sncseq"
|
MODULES="sncseq"
|
||||||
|
|
||||||
BASE=7.0
|
BASE=7.0
|
||||||
SNCSEQ=R2-2-8
|
SNCSEQ=R2-2-9
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
dist: xenial
|
dist: bionic
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
@@ -31,11 +31,14 @@ addons:
|
|||||||
- g++-mingw-w64-x86-64
|
- g++-mingw-w64-x86-64
|
||||||
# for RTEMS cross builds
|
# for RTEMS cross builds
|
||||||
- qemu-system-x86
|
- qemu-system-x86
|
||||||
|
# for .zip/.7z archive hooks
|
||||||
|
- p7zip-full
|
||||||
homebrew:
|
homebrew:
|
||||||
packages:
|
packages:
|
||||||
# for the sequencer
|
# for the sequencer
|
||||||
- re2c
|
- re2c
|
||||||
update: true
|
# for .zip/.7z archive hooks
|
||||||
|
- p7zip
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python .ci/cue.py prepare
|
- python .ci/cue.py prepare
|
||||||
@@ -100,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)
|
||||||
|
|
||||||
@@ -118,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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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).
|
||||||
@@ -19,6 +21,10 @@
|
|||||||
[Travis-CI Tutorial](https://docs.travis-ci.com/user/tutorial/).
|
[Travis-CI Tutorial](https://docs.travis-ci.com/user/tutorial/).
|
||||||
Make sure to use `travis-ci.org` and not their `.com` site.
|
Make sure to use `travis-ci.org` and not their `.com` site.
|
||||||
|
|
||||||
|
(This applies when using the free tier offered to open source
|
||||||
|
projects. Things will be different using an "Enterprise"
|
||||||
|
installation on customer hardware.)
|
||||||
|
|
||||||
2. Add the ci-scripts respository as a Git Submodule
|
2. Add the ci-scripts respository as a Git Submodule
|
||||||
(see [README](../README.md) one level above).
|
(see [README](../README.md) one level above).
|
||||||
|
|
||||||
@@ -60,3 +66,9 @@ configuration.)
|
|||||||
|
|
||||||
Caches are automatically removed after approx. four weeks.
|
Caches are automatically removed after approx. four weeks.
|
||||||
Your jobs will have to rebuild them once in a while.
|
Your jobs will have to rebuild them once in a while.
|
||||||
|
|
||||||
|
## Miscellanea
|
||||||
|
|
||||||
|
To use the feature to extract `.zip`/`.7z` archives by setting
|
||||||
|
`*_HOOK` variables, the Linux and MacOS runners need the APT package
|
||||||
|
`p7zip-full` resp. the Homebrew package `p7zip` installed.
|
||||||
|
|||||||
Reference in New Issue
Block a user