Skip to content

Commit 0a7d5b1

Browse files
committed
Configure CI using ci-scripts for GHA and Appveyor
1 parent aea8d91 commit 0a7d5b1

File tree

5 files changed

+285
-0
lines changed

5 files changed

+285
-0
lines changed

.appveyor.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# .appveyor.yml for use with EPICS Base ci-scripts
2+
# (see: https://github.com/epics-base/ci-scripts)
3+
4+
# This is YAML - indentation levels are crucial
5+
6+
cache:
7+
- C:\Users\appveyor\.tools
8+
9+
#---------------------------------#
10+
# repository cloning #
11+
#---------------------------------#
12+
13+
init:
14+
# Set autocrlf to make batch files work
15+
- git config --global core.autocrlf true
16+
17+
clone_depth: 5
18+
19+
# Build Configurations: dll/static, regular/debug
20+
configuration:
21+
- dynamic
22+
- static
23+
- dynamic-debug
24+
- static-debug
25+
26+
# Default OS Image
27+
image: Visual Studio 2019
28+
29+
# Environment variables: compiler toolchain, base version, setup file, ...
30+
environment:
31+
# common / default variables for all jobs
32+
SETUP_PATH: .ci-local:.ci
33+
34+
matrix:
35+
- BASE: 3.15
36+
CMP: vs2019
37+
- BASE: 7.0
38+
CMP: vs2019
39+
- BASE: 7.0
40+
CMP: gcc
41+
- BASE: 7.0
42+
CMP: vs2017
43+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
44+
45+
# Platform: processor architecture
46+
platform:
47+
- x64
48+
49+
#---------------------------------#
50+
# building & testing #
51+
#---------------------------------#
52+
53+
install:
54+
- cmd: git submodule update --init --recursive
55+
- cmd: pip install git+https://github.com/mdavidsaver/ci-core-dumper#egg=ci-core-dumper
56+
- cmd: python .ci/cue.py prepare
57+
58+
build_script:
59+
- cmd: python .ci/cue.py build
60+
61+
test_script:
62+
- cmd: python -m ci_core_dumper install
63+
- cmd: python .ci/cue.py -T 20M test
64+
65+
on_finish:
66+
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
67+
- cmd: python .ci/cue.py -T 5M test-results
68+
69+
on_failure:
70+
- cmd: python -m ci_core_dumper report
71+
72+
#---------------------------------#
73+
# debugging #
74+
#---------------------------------#
75+
76+
## if you want to connect by remote desktop to a failed build, uncomment these lines
77+
## note that you will need to connect within the usual build timeout limit (60 minutes)
78+
## so you may want to adjust the build matrix above to just build the one of interest
79+
80+
#on_failure:
81+
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
82+
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
83+
84+
#---------------------------------#
85+
# notifications #
86+
#---------------------------------#
87+
88+
notifications:
89+
- provider: Email
90+
to:
91+
92+
on_build_success: false
93+
- provider: GitHubPullRequest

.ci

Submodule .ci added at 130e88b

.ci-local/defaults.set

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EPICS Base
2+
BASE_DIRNAME=base
3+
BASE_REPONAME=epics-base
4+
BASE_REPOOWNER=epics-base
5+
BASE_VARNAME=EPICS_BASE
6+
BASE_RECURSIVE=NO
7+
8+
MODULES=PVDATA PVACCESS
9+
10+
PVDATA_REPONAME=pvDataCPP
11+
PVDATA_REPOOWNER=epics-base
12+
13+
PVACCESS_REPONAME=pvAccessCPP
14+
PVACCESS_REPOOWNER=epics-base
+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# .github/workflows/ci-scripts-build.yml for use with EPICS Base ci-scripts
2+
# (see: https://github.com/epics-base/ci-scripts)
3+
4+
# This is YAML - indentation levels are crucial
5+
6+
# Set the 'name:' properties to values that work for you (pvxs)
7+
8+
name: Base
9+
10+
# Trigger on pushes and PRs to any branch
11+
on:
12+
push:
13+
paths-ignore:
14+
- '.*.yml'
15+
- 'documentation/*'
16+
- '**/*.md'
17+
pull_request:
18+
paths-ignore:
19+
- '.*.yml'
20+
- 'documentation/*'
21+
- '**/*.md'
22+
23+
env:
24+
SETUP_PATH: .ci-local:.ci
25+
EPICS_TEST_IMPRECISE_TIMING: YES
26+
27+
jobs:
28+
build-base:
29+
name: ${{ matrix.name }}
30+
runs-on: ${{ matrix.os }}
31+
# Set environment variables from matrix parameters
32+
env:
33+
BASE: ${{ matrix.base }}
34+
CMP: ${{ matrix.cmp }}
35+
BCFG: ${{ matrix.configuration }}
36+
WINE: ${{ matrix.wine }}
37+
RTEMS: ${{ matrix.rtems }}
38+
RTEMS_TARGET: ${{ matrix.rtems_target }}
39+
EXTRA: ${{ matrix.extra }}
40+
TEST: ${{ matrix.test }}
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
# Job names also name artifacts, character limitations apply
45+
include:
46+
- os: ubuntu-20.04
47+
cmp: gcc
48+
configuration: default
49+
base: "3.15"
50+
wine: "64"
51+
name: "3.15 Ub-20 gcc-9 + MinGW"
52+
53+
- os: ubuntu-20.04
54+
cmp: gcc
55+
configuration: default
56+
base: "7.0"
57+
wine: "64"
58+
name: "7.0 Ub-20 gcc-9 + MinGW"
59+
60+
- os: ubuntu-20.04
61+
cmp: gcc
62+
configuration: static
63+
base: "7.0"
64+
wine: "64"
65+
name: "7.0 Ub-20 gcc-9 + MinGW, static"
66+
67+
- os: ubuntu-20.04
68+
cmp: gcc
69+
configuration: static
70+
base: "7.0"
71+
extra: "CMD_CXXFLAGS=-std=c++11"
72+
name: "7.0 Ub-20 gcc-9 C++11, static"
73+
74+
- os: ubuntu-20.04
75+
cmp: clang
76+
configuration: default
77+
base: "7.0"
78+
name: "7.0 Ub-20 clang-10"
79+
80+
- os: ubuntu-20.04
81+
cmp: clang
82+
configuration: default
83+
base: "7.0"
84+
extra: "CMD_CXXFLAGS=-std=c++11"
85+
name: "7.0 Ub-20 clang-10 C++11"
86+
87+
- os: ubuntu-20.04
88+
cmp: gcc
89+
configuration: default
90+
base: "7.0"
91+
rtems: "5"
92+
rtems_target: RTEMS-pc686-qemu
93+
test: NO
94+
name: "7.0 Ub-20 gcc-9 + RT-5.1 pc686"
95+
96+
- os: ubuntu-20.04
97+
cmp: gcc
98+
configuration: default
99+
base: "7.0"
100+
rtems: "4.10"
101+
rtems_target: RTEMS-pc386-qemu
102+
test: NO
103+
name: "7.0 Ub-20 gcc-9 + RT-4.10"
104+
105+
- os: ubuntu-20.04
106+
cmp: gcc
107+
configuration: default
108+
base: "7.0"
109+
rtems: "4.9"
110+
rtems_target: RTEMS-pc386-qemu
111+
name: "7.0 Ub-20 gcc-9 + RT-4.9"
112+
113+
- os: macos-latest
114+
cmp: clang
115+
configuration: default
116+
base: "7.0"
117+
name: "7.0 MacOS clang-12"
118+
119+
- os: windows-2019
120+
cmp: vs2019
121+
configuration: default
122+
base: "7.0"
123+
name: "7.0 Win2019 MSC-19"
124+
125+
- os: windows-2019
126+
cmp: vs2019
127+
configuration: static
128+
base: "7.0"
129+
name: "7.0 Win2019 MSC-19, static"
130+
131+
- os: windows-2019
132+
cmp: vs2019
133+
configuration: debug
134+
base: "7.0"
135+
name: "7.0 Win2019 MSC-19, debug"
136+
137+
- os: windows-2019
138+
cmp: gcc
139+
configuration: default
140+
base: "7.0"
141+
name: "7.0 Win2019 mingw"
142+
143+
steps:
144+
- uses: actions/checkout@v2
145+
with:
146+
submodules: true
147+
- name: Cache Dependencies
148+
uses: actions/cache@v2
149+
with:
150+
path: ~/.cache
151+
key: ${{ matrix.base }}/${{ matrix.os }}/${{ matrix.cmp }}/${{ matrix.configuration }}/${{ matrix.wine }}${{ matrix.rtems }}/${{ matrix.rtems_target }}/${{ matrix.extra }}
152+
- name: Automatic core dump analysis
153+
uses: mdavidsaver/ci-core-dumper@master
154+
- name: "apt-get install"
155+
run: |
156+
sudo apt-get update
157+
sudo apt-get -y install qemu-system-x86 g++-mingw-w64-x86-64 gdb
158+
if: runner.os == 'Linux'
159+
- name: Prepare and compile dependencies
160+
run: python .ci/cue.py prepare
161+
- name: Build main module
162+
run: python .ci/cue.py build
163+
- name: Run main module tests
164+
run: python .ci/cue.py -T 20M test
165+
- name: Upload tapfiles Artifact
166+
if: ${{ always() }}
167+
uses: actions/upload-artifact@v2
168+
with:
169+
name: tapfiles ${{ matrix.name }}
170+
path: '**/O.*/*.tap'
171+
if-no-files-found: ignore
172+
- name: Collect and show test results
173+
if: ${{ always() }}
174+
run: python .ci/cue.py -T 5M test-results

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule ".ci"]
2+
path = .ci
3+
url = https://github.com/epics-base/ci-scripts

0 commit comments

Comments
 (0)