Unverified Commit 551a21ba by Dominic Hamon Committed by GitHub

add g++-6 to ubuntu-14.04 (#1144)

* add g++-6 to ubuntu-14.04 * fix syntax * fix yamllint errors for build-and-test * fix 'add-apt-repository' command not found * make 'run tests' explicit * enable testing and run both release and debug * oops
parent 17948a78
...@@ -2,12 +2,13 @@ name: build-and-test ...@@ -2,12 +2,13 @@ name: build-and-test
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
branches: [ master ] branches: [master]
jobs: jobs:
# TODO: add 32-bit builds (g++ and clang++) for ubuntu (requires g++-multilib and libc6:i386) # TODO: add 32-bit builds (g++ and clang++) for ubuntu
# (requires g++-multilib and libc6:i386)
# TODO: add coverage build (requires lcov) # TODO: add coverage build (requires lcov)
# TODO: add clang + libc++ builds for ubuntu # TODO: add clang + libc++ builds for ubuntu
# TODO: add clang + ubsan/asan/msan + libc++ builds for ubuntu # TODO: add clang + ubsan/asan/msan + libc++ builds for ubuntu
...@@ -28,30 +29,30 @@ jobs: ...@@ -28,30 +29,30 @@ jobs:
os: windows-latest os: windows-latest
build_type: 'Debug' build_type: 'Debug'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: create build environment - name: create build environment
run: cmake -E make_directory ${{ runner.workspace }}/_build run: cmake -E make_directory ${{ runner.workspace }}/_build
- name: configure cmake - name: configure cmake
env: env:
CXX: ${{ matrix.compiler }} CXX: ${{ matrix.compiler }}
shell: bash shell: bash
working-directory: ${{ runner.workspace }}/_build working-directory: ${{ runner.workspace }}/_build
run: > run: >
cmake $GITHUB_WORKSPACE cmake $GITHUB_WORKSPACE
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: build - name: build
shell: bash shell: bash
working-directory: ${{ runner.workspace }}/_build working-directory: ${{ runner.workspace }}/_build
run: cmake --build . --config ${{ matrix.build_type }} run: cmake --build . --config ${{ matrix.build_type }}
- name: test - name: test
shell: bash shell: bash
working-directory: ${{ runner.workspace }}/_build working-directory: ${{ runner.workspace }}/_build
run: ctest -C ${{ matrix.build_type }} -VV run: ctest -C ${{ matrix.build_type }} -VV
# TODO: add compiler g++-6 to ubuntu-14.04 job # TODO: add compiler g++-6 to ubuntu-14.04 job
# TODO: enable testing for g++-6 compiler # TODO: enable testing for g++-6 compiler
...@@ -63,34 +64,51 @@ jobs: ...@@ -63,34 +64,51 @@ jobs:
matrix: matrix:
build_type: ['Release', 'Debug'] build_type: ['Release', 'Debug']
compiler: [g++-4.8, clang++-3.6] compiler: [g++-4.8, clang++-3.6]
include:
- compiler: g++-6
build_type: 'Debug'
run_tests: true
- compiler: g++-6
build_type: 'Release'
run_tests: true
container: ubuntu:14.04 container: ubuntu:14.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: install required bits - name: install required bits
run: sudo apt update && sudo apt -y install clang-3.6 cmake3 g++-4.8 git run: |
sudo apt update
sudo apt -y install clang-3.6 cmake3 g++-4.8 git
- name: create build environment - name: install other bits
run: cmake -E make_directory $GITHUB_WORKSPACE/_build if: ${{ matrix.compiler }} == g++-6
run: |
sudo apt -y install software-properties-common
sudo add-apt-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt update
sudo apt -y install g++-6
- name: configure cmake - name: create build environment
env: run: cmake -E make_directory $GITHUB_WORKSPACE/_build
CXX: ${{ matrix.compiler }}
shell: bash
working-directory: ${{ github.workspace }}/_build
run: >
cmake $GITHUB_WORKSPACE
-DBENCHMARK_ENABLE_TESTING=off
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
#-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
- name: build - name: configure cmake
shell: bash env:
working-directory: ${{ github.workspace }}/_build CXX: ${{ matrix.compiler }}
run: cmake --build . --config ${{ matrix.build_type }} shell: bash
working-directory: ${{ github.workspace }}/_build
run: >
cmake $GITHUB_WORKSPACE
-DBENCHMARK_ENABLE_TESTING=${{ matrix.run_tests }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=${{ matrix.run_tests }}
# - name: test - name: build
# shell: bash shell: bash
# working-directory: ${{ github.workspace }}/_build working-directory: ${{ github.workspace }}/_build
# run: ctest -C ${{ matrix.build_type }} -VV run: cmake --build . --config ${{ matrix.build_type }}
- name: test
if: ${{ matrix.run_tests }}
shell: bash
working-directory: ${{ github.workspace }}/_build
run: ctest -C ${{ matrix.build_type }} -VV
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment