From 92a6cea771c9577e49e2a09ebbb3a3f58d858ee0 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 30 Jun 2022 12:20:51 -0700 Subject: [PATCH] add GHA build --- .ci | 1 + .ci-local/adsupport-config.py | 31 ++++++ .ci-local/adsupport.set | 24 +++++ .ci-local/defaults.set | 0 .ci-local/os.set | 21 ++++ .github/workflows/ci-scripts.yml | 163 +++++++++++++++++++++++++++++++ .gitmodules | 3 + 7 files changed, 243 insertions(+) create mode 160000 .ci create mode 100755 .ci-local/adsupport-config.py create mode 100644 .ci-local/adsupport.set create mode 100644 .ci-local/defaults.set create mode 100644 .ci-local/os.set create mode 100644 .github/workflows/ci-scripts.yml create mode 100644 .gitmodules diff --git a/.ci b/.ci new file mode 160000 index 000000000..aea790683 --- /dev/null +++ b/.ci @@ -0,0 +1 @@ +Subproject commit aea79068391fe407fcb817c036bc54f26342bdaa diff --git a/.ci-local/adsupport-config.py b/.ci-local/adsupport-config.py new file mode 100755 index 000000000..76caca4d1 --- /dev/null +++ b/.ci-local/adsupport-config.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import os + +with open(os.path.join('configure', 'CONFIG_SITE'), 'w') as F: + F.write(''' +# ADSupport doesn't include CONFIG_SITE.local... +WITH_BOOST=YES +BOOST_EXTERNAL=YES +WITH_HDF5=YES +HDF5_EXTERNAL=NO +XML2_EXTERNAL=NO +WITH_NETCDF=YES +NETCDF_EXTERNAL=NO +WITH_NEXUS=YES +NEXUS_EXTERNAL=NO +WITH_TIFF=YES +TIFF_EXTERNAL=NO +WITH_JPEG=YES +JPEG_EXTERNAL=NO +WITH_SZIP=YES +SZIP_EXTERNAL=NO +WITH_ZLIB=YES +ZLIB_EXTERNAL=NO +WITH_BLOSC=YES +BLOSC_EXTERNAL=NO +WITH_BITSHUFFLE=YES +BITSHUFFLE_EXTERNAL=NO +''') + +print('Wrote configure/CONFIG_SITE') diff --git a/.ci-local/adsupport.set b/.ci-local/adsupport.set new file mode 100644 index 000000000..9f363f616 --- /dev/null +++ b/.ci-local/adsupport.set @@ -0,0 +1,24 @@ +MODULES=PVDATA PVACCESS NT PVDATABASE asyn ADSupport + +BASE_DIRNAME=base +BASE_REPONAME=epics-base +BASE_REPOOWNER=epics-base +BASE_VARNAME=EPICS_BASE +BASE_RECURSIVE=no + +PVDATA_REPONAME=pvDataCPP +PVDATA_REPOOWNER=epics-base + +PVACCESS_REPONAME=pvAccessCPP +PVACCESS_REPOOWNER=epics-base + +NT_REPONAME=normativeTypesCPP +NT_REPOOWNER=epics-base + +PVDATABASE_REPONAME=pvDatabaseCPP +PVDATABASE_REPOOWNER=epics-base + +ASYN_REPOOWNER=epics-modules + +ADSUPPORT_REPOOWNER=areaDetector +ADSUPPORT_HOOK=.ci-local/adsupport-config.py diff --git a/.ci-local/defaults.set b/.ci-local/defaults.set new file mode 100644 index 000000000..e69de29bb diff --git a/.ci-local/os.set b/.ci-local/os.set new file mode 100644 index 000000000..c6e329346 --- /dev/null +++ b/.ci-local/os.set @@ -0,0 +1,21 @@ +MODULES=PVDATA PVACCESS NT PVDATABASE asyn + +BASE_DIRNAME=base +BASE_REPONAME=epics-base +BASE_REPOOWNER=epics-base +BASE_VARNAME=EPICS_BASE +BASE_RECURSIVE=no + +PVDATA_REPONAME=pvDataCPP +PVDATA_REPOOWNER=epics-base + +PVACCESS_REPONAME=pvAccessCPP +PVACCESS_REPOOWNER=epics-base + +NT_REPONAME=normativeTypesCPP +NT_REPOOWNER=epics-base + +PVDATABASE_REPONAME=pvDatabaseCPP +PVDATABASE_REPOOWNER=epics-base + +ASYN_REPOOWNER=epics-modules diff --git a/.github/workflows/ci-scripts.yml b/.github/workflows/ci-scripts.yml new file mode 100644 index 000000000..691d2a9e8 --- /dev/null +++ b/.github/workflows/ci-scripts.yml @@ -0,0 +1,163 @@ +name: ADCore + +# Trigger on pushes and PRs to any branch +on: + push: + paths-ignore: + - '**/*.md' + - '**/*.txt' + pull_request: + +env: + SETUP_PATH: .ci-local + +jobs: + test: + name: ${{ matrix.os }}/${{ matrix.deps }}/${{ matrix.base }}/${{ matrix.cmp }}/${{ matrix.configuration }} + runs-on: ${{ matrix.os }} + env: + CMP: ${{ matrix.cmp }} + BCFG: ${{ matrix.configuration }} + BASE: ${{ matrix.base }} + SET: ${{ matrix.deps }} + + strategy: + fail-fast: false + matrix: + # Job names also name artifacts, character limitations apply + include: + - os: ubuntu-latest + cmp: gcc + configuration: default + base: "7.0" + deps: os + test: true + + - os: ubuntu-latest + cmp: gcc + configuration: static + base: "7.0" + deps: os + test: true + + - os: ubuntu-latest + cmp: gcc + configuration: static + base: "7.0" + deps: adsupport + + - os: ubuntu-latest + cmp: gcc + configuration: default + base: "3.15" + deps: os + + - os: ubuntu-latest + cmp: gcc + configuration: static + base: "3.15" + deps: os + +# - os: windows-2019 +# cmp: vs2019 +# configuration: default +# base: "7.0" +# deps: adsupport + + - os: windows-2019 + cmp: vs2019 + configuration: static + base: "7.0" + deps: adsupport + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: "Linux OS Deps" + if: ${{ matrix.deps == 'os' && matrix.os == 'ubuntu-latest' }} + shell: bash + run: | + sudo apt-get update + sudo apt-get -y install \ + libgraphicsmagick++-dev libhdf5-dev libjpeg-dev libnetcdf-dev libtiff-dev libxml2-dev libz-dev \ + libblosc-dev libnexus-dev libnetcdf-dev libusb-1.0-0-dev libboost-test-dev libboost-system-dev + + cat < configure/CONFIG_SITE.linux-x86_64.Common + WITH_PVA=YES + + WITH_BOOST=YES + BOOST_EXTERNAL=YES + + WITH_HDF5=YES + HDF5_EXTERNAL=YES + USR_CPPFLAGS+=-I/usr/include/hdf5/serial + USR_LDFLAGS+=-L/usr/lib/x86_64-linux-gnu/hdf5/serial + + XML2_EXTERNAL=YES + XML2_INCLUDE=/usr/include/libxml2 + + WITH_NETCDF=YES + NETCDF_EXTERNAL=YES + + WITH_NEXUS=YES + NEXUS_EXTERNAL=YES + USR_CPPFLAGS+=-I/usr/include/nexus + + WITH_TIFF=YES + TIFF_EXTERNAL=YES + + WITH_JPEG=YES + JPEG_EXTERNAL=YES + + WITH_SZIP=NO + + WITH_ZLIB=YES + ZLIB_EXTERNAL=YES + + WITH_BLOSC=YES + BLOSC_EXTERNAL=YES + + WITH_BITSHUFFLE=NO + + EOF + cat configure/CONFIG_SITE.linux-x86_64.Common + + - name: Prepare and compile EPICS dependencies + run: python .ci/cue.py prepare + + - name: "ADSupport Deps" + if: ${{ matrix.deps == 'adsupport' }} + shell: bash + run: | + cat <> configure/CONFIG_SITE.local + WITH_PVA=YES + WITH_BOOST=NO + WITH_HDF5=YES + HDF5_EXTERNAL=NO + XML2_EXTERNAL=NO + WITH_NETCDF=YES + NETCDF_EXTERNAL=NO + WITH_NEXUS=YES + NEXUS_EXTERNAL=NO + WITH_TIFF=YES + TIFF_EXTERNAL=NO + WITH_JPEG=YES + JPEG_EXTERNAL=NO + WITH_SZIP=YES + SZIP_EXTERNAL=NO + WITH_ZLIB=YES + ZLIB_EXTERNAL=NO + WITH_BLOSC=YES + BLOSC_EXTERNAL=NO + WITH_BITSHUFFLE=YES + BITSHUFFLE_EXTERNAL=NO + EOF + + - name: Build main module + run: python .ci/cue.py build + + - name: Run test + if: ${{ matrix.test }} + shell: bash + run: ./bin/*/plugin-test diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..cfa3a7030 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".ci"] + path = .ci + url = https://github.com/epics-base/ci-scripts