cue: make cxx work when base is cached

This commit is contained in:
Ralph Lange
2021-02-15 19:28:49 +01:00
parent 99057a5ff6
commit 3db08b5977
4 changed files with 197 additions and 137 deletions
+3 -3
View File
@@ -388,16 +388,16 @@ This will make all builds (not just for your module) verbose.
Update the submodule in `.ci` first, then change your CI configuration Update the submodule in `.ci` first, then change your CI configuration
(if needed) and commit both to your module. E.g., to update your Travis (if needed) and commit both to your module. E.g., to update your Travis
setup to release 3.2.0 of ci-scripts: setup to release 3.2.1 of ci-scripts:
```bash ```bash
cd .ci cd .ci
git pull origin v3.2.0 git pull origin v3.2.1
cd - cd -
git add .ci git add .ci
# if needed: # if needed:
edit .travis.yml # and/or other CI service configurations edit .travis.yml # and/or other CI service configurations
git add .travis.yml git add .travis.yml
git commit -m "Update ci-scripts submodule to v3.2.0" git commit -m "Update ci-scripts submodule to v3.2.1"
``` ```
Check the example configuration files inside ci-scripts (and their Check the example configuration files inside ci-scripts (and their
+6 -3
View File
@@ -809,6 +809,12 @@ def prepare(args):
fold_end('check.out.dependencies', 'Checking/cloning dependencies') fold_end('check.out.dependencies', 'Checking/cloning dependencies')
cxx = None
if ci['compiler'].startswith('clang'):
cxx = re.sub(r'clang', r'clang++', ci['compiler'])
elif ci['compiler'].startswith('gcc'):
cxx = re.sub(r'gcc', r'g++', ci['compiler'])
if 'BASE' in modules_to_compile or building_base: if 'BASE' in modules_to_compile or building_base:
fold_start('set.up.epics_build', 'Configuring EPICS build system') fold_start('set.up.epics_build', 'Configuring EPICS build system')
@@ -903,9 +909,7 @@ CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386{0}'''.format(qemu_suffix))
print('Host compiler', ci['compiler']) print('Host compiler', ci['compiler'])
cxx = None
if ci['compiler'].startswith('clang'): if ci['compiler'].startswith('clang'):
cxx = re.sub(r'clang', r'clang++', ci['compiler'])
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os', with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
'CONFIG_SITE.Common.'+os.environ['EPICS_HOST_ARCH']), 'a') as f: 'CONFIG_SITE.Common.'+os.environ['EPICS_HOST_ARCH']), 'a') as f:
f.write(''' f.write('''
@@ -920,7 +924,6 @@ CCC = {1}'''.format(ci['compiler'], cxx))
CMPLR_CLASS = clang''') CMPLR_CLASS = clang''')
elif ci['compiler'].startswith('gcc'): elif ci['compiler'].startswith('gcc'):
cxx = re.sub(r'gcc', r'g++', ci['compiler'])
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os', with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
'CONFIG_SITE.Common.' + os.environ['EPICS_HOST_ARCH']), 'a') as f: 'CONFIG_SITE.Common.' + os.environ['EPICS_HOST_ARCH']), 'a') as f:
f.write(''' f.write('''
+143 -123
View File
@@ -5,158 +5,178 @@
# Set the 'name:' properties to values that work for you (MYMODULE) # Set the 'name:' properties to values that work for you (MYMODULE)
name: MYMODULE ci-scripts build name: MYMODULE
# Trigger on pushes and PRs to any branch # Trigger on pushes and PRs to any branch
on: [push, pull_request] on:
push:
paths-ignore:
- 'documentation/*'
- '**/*.html'
- '**/*.md'
pull_request:
env: env:
SETUP_PATH: .ci-local:.ci SETUP_PATH: .ci-local:.ci
CMP: gcc
# For the sequencer on Linux/Windows/MacOS # For the sequencer on Linux/Windows/MacOS
APT: re2c APT: re2c
CHOCO: re2c CHOCO: re2c
BREW: re2c BREW: re2c
jobs: jobs:
build-linux: build-base:
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} name: ${{ matrix.name }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
# Set environment variables from matrix parameters # Set environment variables from matrix parameters
env:
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
cmp: [gcc, clang]
configuration: [default, static, debug, static-debug]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
- name: Build main module
run: python .ci/cue.py build
- name: Run main module tests
run: python .ci/cue.py test
- name: Collect and show test results
run: python .ci/cue.py test-results
build-macos:
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# Set environment variables from matrix parameters
env:
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15]
cmp: [clang]
# No static builds on MacOS
configuration: [default, debug]
steps:
- uses: actions/checkout@v2
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
- name: Build main module
run: python .ci/cue.py build
- name: Run main module tests
run: python .ci/cue.py test
- name: Collect and show test results
run: python .ci/cue.py test-results
build-windows:
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2016]
cmp: [gcc, vs2019, vs2017]
configuration: [default, static, debug, static-debug]
# Available: vs2017/windows-2016 and vs2019/windows-2019
exclude:
- os: windows-2019
cmp: vs2017
- os: windows-2016
cmp: vs2019
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
- name: Build main module
run: python .ci/cue.py build
- name: Run main module tests
run: python .ci/cue.py test
- name: Collect and show test results
run: python .ci/cue.py test-results
# Same setup and toolchain as on Travis.
# Needs Base >= 3.15 to compile, EPICS 7 to also run the tests on qemu
build-rtems:
name: RTEMS${{ matrix.rtems }} / ${{ matrix.configuration }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
RTEMS: ${{ matrix.rtems }}
APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04]
cmp: [gcc]
configuration: [default, debug]
rtems: ["4.9", "4.10"]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
- name: Build main module
run: python .ci/cue.py build
- name: Run main module tests
run: python .ci/cue.py test
- name: Collect and show test results
run: python .ci/cue.py test-results
# The WINE cross builds are of somewhat limited use,
# as there are native gcc/MinGW builds available on GitHub Actions
build-wine:
name: WINE${{ matrix.wine }} / ${{ matrix.configuration }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env: env:
CMP: ${{ matrix.cmp }} CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }} BCFG: ${{ matrix.configuration }}
WINE: ${{ matrix.wine }} WINE: ${{ matrix.wine }}
APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64 RTEMS: ${{ matrix.rtems }}
EXTRA: ${{ matrix.extra }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-18.04] # Job names also name artifacts, character limitations apply
cmp: [gcc] include:
configuration: [default, static, debug, static-debug] - os: ubuntu-20.04
wine: [32, 64] cmp: gcc
configuration: default
wine: "64"
name: "Ub-20 gcc-9 + MinGW"
- os: ubuntu-20.04
cmp: gcc
configuration: static
wine: "64"
name: "Ub-20 gcc-9 + MinGW, static"
- os: ubuntu-20.04
cmp: gcc
configuration: static
extra: "CMD_CXXFLAGS=-std=c++11"
name: "Ub-20 gcc-9 C++11, static"
- os: ubuntu-16.04
cmp: clang
configuration: default
name: "Ub-16 clang-9"
- os: ubuntu-20.04
cmp: clang
configuration: default
extra: "CMD_CXXFLAGS=-std=c++11"
name: "Ub-20 clang-10 C++11"
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "4.10"
name: "Ub-20 gcc-9 + RT-4.10"
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "4.9"
name: "Ub-20 gcc-9 + RT-4.9"
- os: ubuntu-16.04
cmp: gcc-4.8
utoolchain: true
configuration: default
name: "Ub-16 gcc-4.8"
- os: ubuntu-16.04
cmp: gcc-4.9
utoolchain: true
configuration: default
name: "Ub-16 gcc-4.9"
- os: ubuntu-18.04
cmp: gcc
configuration: default
name: "Ub-18 gcc-7"
- os: ubuntu-18.04
cmp: gcc-8
utoolchain: true
configuration: default
name: "Ub-18 gcc-8"
- os: ubuntu-20.04
cmp: gcc-8
utoolchain: true
configuration: default
name: "Ub-20 gcc-8"
- os: ubuntu-20.04
cmp: clang
configuration: default
name: "Ub-20 clang-10"
- os: macos-latest
cmp: clang
configuration: default
name: "MacOS clang-12"
- os: windows-2016
cmp: vs2017
configuration: default
name: "Win2016 MSC-17"
- os: windows-2016
cmp: vs2017
configuration: static
name: "Win2016 MSC-17, static"
- os: windows-2019
cmp: gcc
configuration: default
name: "Win2019 MinGW"
- os: windows-2019
cmp: gcc
configuration: static
name: "Win2019 MinGW, static"
- os: windows-2019
cmp: vs2019
configuration: default
name: "Win2019 MSC-19"
- os: windows-2019
cmp: vs2019
configuration: static
name: "Win2019 MSC-19, static"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@master
- name: "apt-get install"
run: |
sudo apt-get update
sudo apt-get -y install qemu-system-x86 g++-mingw-w64-x86-64 gdb
if: runner.os == 'Linux'
- name: "apt-get install ${{ matrix.cmp }}"
run: |
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y install ${{ matrix.cmp }}
if: matrix.utoolchain
- name: Prepare and compile dependencies - name: Prepare and compile dependencies
run: python .ci/cue.py prepare run: python .ci/cue.py prepare
- name: Build main module - name: Build main module
run: python .ci/cue.py build run: python .ci/cue.py build
- name: Run main module tests - name: Run main module tests
run: python .ci/cue.py test run: python .ci/cue.py test
- name: Upload tapfiles Artifact
uses: actions/upload-artifact@v2
with:
name: tapfiles ${{ matrix.name }}
path: '**/O.*/*.tap'
- name: Collect and show test results - name: Collect and show test results
run: python .ci/cue.py test-results run: python .ci/cue.py test-results
@@ -5,18 +5,23 @@
# Set the 'name:' properties to values that work for you # Set the 'name:' properties to values that work for you
name: MYMODULE ci-scripts build name: MYMODULE
# Trigger on pushes and PRs to any branch # Trigger on pushes and PRs to any branch
on: [push, pull_request] on:
push:
paths-ignore:
- 'documentation/*'
- '**/*.html'
- '**/*.md'
pull_request:
env: env:
SETUP_PATH: .ci-local:.ci SETUP_PATH: .ci-local:.ci
CMP: gcc
jobs: jobs:
build-linux: build-linux:
name: ${{ matrix.base }} / ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} name: ${{ matrix.name }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
# Set environment variables from matrix parameters # Set environment variables from matrix parameters
env: env:
@@ -26,10 +31,42 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-20.04, ubuntu-18.04] - os: ubuntu-18.04
cmp: [gcc] cmp: gcc
configuration: [default, static] configuration: default
base: ["7.0", "3.15"] base: "7.0"
name: "7.0 Ub-18 gcc-7"
- os: ubuntu-18.04
cmp: gcc
configuration: static
base: "7.0"
name: "7.0 Ub-18 gcc-7 static"
- os: ubuntu-20.04
cmp: gcc
configuration: default
base: "3.15"
name: "3.15 Ub-20 gcc-9"
- os: ubuntu-20.04
cmp: gcc
configuration: static
base: "3.15"
name: "3.15 Ub-20 gcc-9 static"
- os: ubuntu-20.04
cmp: gcc
configuration: debug
base: "3.15"
name: "3.15 Ub-20 gcc-9 debug"
- os: ubuntu-20.04
cmp: clang
configuration: default
base: "3.15"
name: "3.15 Ub-20 clang-10"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with: