mirror of https://github.com/google/benchmark.git
use docker container for ubuntu-16.04 builds (#1265)
* use docker container for ubuntu-16.04 builds * install some bits * no sudo in docker container * cmake, not cmake3 * include perfcounters * still no sudo in docker containers * yes please, apt
This commit is contained in:
parent
4f47ed2c9a
commit
da01c5e662
|
@ -14,26 +14,30 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, ubuntu-16.04, ubuntu-20.04]
|
os: [ubuntu-latest, ubuntu-20.04]
|
||||||
build_type: ['Release', 'Debug']
|
build_type: ['Release', 'Debug']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: install libpfm
|
- name: install libpfm
|
||||||
run: sudo apt install libpfm4-dev
|
run: sudo apt -y install libpfm4-dev
|
||||||
|
|
||||||
- name: setup cmake
|
- name: setup cmake
|
||||||
uses: jwlawson/actions-setup-cmake@v1.9
|
uses: jwlawson/actions-setup-cmake@v1.9
|
||||||
with:
|
with:
|
||||||
cmake-version: '3.5.1'
|
cmake-version: '3.5.1'
|
||||||
|
|
||||||
- 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
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ runner.workspace }}/_build
|
working-directory: ${{ runner.workspace }}/_build
|
||||||
run: cmake -DBENCHMARK_ENABLE_LIBPFM=1 -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
run: >
|
||||||
|
cmake $GITHUB_WORKSPACE
|
||||||
|
-DBENCHMARK_ENABLE_LIBPFM=1
|
||||||
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
|
||||||
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -46,4 +50,48 @@ jobs:
|
||||||
# - name: test
|
# - name: test
|
||||||
# shell: bash
|
# shell: bash
|
||||||
# working-directory: ${{ runner.workspace }}/_build
|
# working-directory: ${{ runner.workspace }}/_build
|
||||||
# run: sudo ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure
|
# run: ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure
|
||||||
|
|
||||||
|
ubuntu-16_04:
|
||||||
|
name: ubuntu-16.04.${{ matrix.build_type }}
|
||||||
|
runs-on: [ubuntu-latest]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build_type: ['Release', 'Debug']
|
||||||
|
container: ubuntu:16.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: install required bits
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt -y install clang cmake g++ git
|
||||||
|
|
||||||
|
- name: install libpfm
|
||||||
|
run: apt -y install libpfm4-dev
|
||||||
|
|
||||||
|
- name: create build environment
|
||||||
|
run: cmake -E make_directory $GITHUB_WORKSPACE/_build
|
||||||
|
|
||||||
|
- name: configure cmake
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}/_build
|
||||||
|
run: >
|
||||||
|
cmake $GITHUB_WORKSPACE
|
||||||
|
-DBENCHMARK_ENABLE_LIBPFM=1
|
||||||
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
|
||||||
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}/_build
|
||||||
|
run: cmake --build . --config ${{ matrix.build_type }}
|
||||||
|
|
||||||
|
# Skip testing, for now. It seems perf_event_open does not succeed on the
|
||||||
|
# hosting machine, very likely a permissions issue.
|
||||||
|
# TODO(mtrofin): Enable test.
|
||||||
|
# - name: test
|
||||||
|
# shell: bash
|
||||||
|
# working-directory: ${{ runner.workspace }}/_build
|
||||||
|
# run: ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure
|
||||||
|
|
|
@ -9,14 +9,13 @@ jobs:
|
||||||
# (requires g++-multilib and libc6:i386)
|
# (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
|
|
||||||
job:
|
job:
|
||||||
name: ${{ matrix.os }}.${{ matrix.build_type }}.${{ matrix.compiler }}
|
name: ${{ matrix.os }}.${{ matrix.build_type }}.${{ matrix.compiler }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, ubuntu-16.04, ubuntu-20.04, macos-latest]
|
os: [ubuntu-latest, ubuntu-20.04, macos-latest]
|
||||||
build_type: ['Release', 'Debug']
|
build_type: ['Release', 'Debug']
|
||||||
compiler: [g++, clang++]
|
compiler: [g++, clang++]
|
||||||
include:
|
include:
|
||||||
|
@ -52,6 +51,46 @@ jobs:
|
||||||
working-directory: ${{ runner.workspace }}/_build
|
working-directory: ${{ runner.workspace }}/_build
|
||||||
run: ctest -C ${{ matrix.build_type }} -VV
|
run: ctest -C ${{ matrix.build_type }} -VV
|
||||||
|
|
||||||
|
ubuntu-16_04:
|
||||||
|
name: ubuntu-16.04.${{ matrix.build_type }}.${{ matrix.compiler }}
|
||||||
|
runs-on: [ubuntu-latest]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build_type: ['Release', 'Debug']
|
||||||
|
compiler: [g++, clang++]
|
||||||
|
container: ubuntu:16.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: install required bits
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt -y install clang cmake g++ git
|
||||||
|
|
||||||
|
- name: create build environment
|
||||||
|
run: cmake -E make_directory $GITHUB_WORKSPACE/_build
|
||||||
|
|
||||||
|
- name: configure cmake
|
||||||
|
env:
|
||||||
|
CXX: ${{ matrix.compiler }}
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}/_build
|
||||||
|
run: >
|
||||||
|
cmake $GITHUB_WORKSPACE
|
||||||
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
|
||||||
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}/_build
|
||||||
|
run: cmake --build . --config ${{ matrix.build_type }}
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}/_build
|
||||||
|
run: ctest -C ${{ matrix.build_type }} -VV
|
||||||
|
|
||||||
ubuntu-14_04:
|
ubuntu-14_04:
|
||||||
name: ubuntu-14.04.${{ matrix.build_type }}.${{ matrix.compiler }}
|
name: ubuntu-14.04.${{ matrix.build_type }}.${{ matrix.compiler }}
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
|
|
Loading…
Reference in New Issue