diff --git a/README.md b/README.md index 0144a77..430f7d4 100644 --- a/README.md +++ b/README.md @@ -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 (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 cd .ci -git pull origin v3.2.0 +git pull origin v3.2.1 cd - git add .ci # if needed: edit .travis.yml # and/or other CI service configurations 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 diff --git a/cue.py b/cue.py index 4b8721b..6bd1d59 100644 --- a/cue.py +++ b/cue.py @@ -809,6 +809,12 @@ def prepare(args): 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: 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']) - cxx = None if ci['compiler'].startswith('clang'): - cxx = re.sub(r'clang', r'clang++', ci['compiler']) with open(os.path.join(places['EPICS_BASE'], 'configure', 'os', 'CONFIG_SITE.Common.'+os.environ['EPICS_HOST_ARCH']), 'a') as f: f.write(''' @@ -920,7 +924,6 @@ CCC = {1}'''.format(ci['compiler'], cxx)) CMPLR_CLASS = clang''') elif ci['compiler'].startswith('gcc'): - cxx = re.sub(r'gcc', r'g++', ci['compiler']) with open(os.path.join(places['EPICS_BASE'], 'configure', 'os', 'CONFIG_SITE.Common.' + os.environ['EPICS_HOST_ARCH']), 'a') as f: f.write(''' diff --git a/github-actions/ci-scripts-build.yml.example-full b/github-actions/ci-scripts-build.yml.example-full index 3f4e9b3..da2eec6 100644 --- a/github-actions/ci-scripts-build.yml.example-full +++ b/github-actions/ci-scripts-build.yml.example-full @@ -5,158 +5,178 @@ # 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 -on: [push, pull_request] +on: + push: + paths-ignore: + - 'documentation/*' + - '**/*.html' + - '**/*.md' + pull_request: env: SETUP_PATH: .ci-local:.ci - CMP: gcc # For the sequencer on Linux/Windows/MacOS APT: re2c CHOCO: re2c BREW: re2c jobs: - build-linux: - name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} + build-base: + name: ${{ matrix.name }} runs-on: ${{ matrix.os }} # 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: CMP: ${{ matrix.cmp }} BCFG: ${{ matrix.configuration }} WINE: ${{ matrix.wine }} - APT: re2c g++-mingw-w64-i686 g++-mingw-w64-x86-64 + RTEMS: ${{ matrix.rtems }} + EXTRA: ${{ matrix.extra }} strategy: fail-fast: false matrix: - os: [ubuntu-18.04] - cmp: [gcc] - configuration: [default, static, debug, static-debug] - wine: [32, 64] + # Job names also name artifacts, character limitations apply + include: + - os: ubuntu-20.04 + 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: - uses: actions/checkout@v2 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: "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 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: Upload tapfiles Artifact + uses: actions/upload-artifact@v2 + with: + name: tapfiles ${{ matrix.name }} + path: '**/O.*/*.tap' - name: Collect and show test results run: python .ci/cue.py test-results diff --git a/github-actions/ci-scripts-build.yml.example-mini b/github-actions/ci-scripts-build.yml.example-mini index bc59a97..3291ef3 100644 --- a/github-actions/ci-scripts-build.yml.example-mini +++ b/github-actions/ci-scripts-build.yml.example-mini @@ -5,18 +5,23 @@ # 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 -on: [push, pull_request] +on: + push: + paths-ignore: + - 'documentation/*' + - '**/*.html' + - '**/*.md' + pull_request: env: SETUP_PATH: .ci-local:.ci - CMP: gcc jobs: build-linux: - name: ${{ matrix.base }} / ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} + name: ${{ matrix.name }} runs-on: ${{ matrix.os }} # Set environment variables from matrix parameters env: @@ -26,10 +31,42 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, ubuntu-18.04] - cmp: [gcc] - configuration: [default, static] - base: ["7.0", "3.15"] + - os: ubuntu-18.04 + cmp: gcc + configuration: default + 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: - uses: actions/checkout@v2 with: