Unverified Commit a07ea0ab by Dominic Hamon Committed by GitHub

move some flags to env

parent 0579f620
...@@ -27,12 +27,21 @@ jobs: ...@@ -27,12 +27,21 @@ jobs:
- displayTargetName: windows-latest-debug - displayTargetName: windows-latest-debug
os: windows-latest os: windows-latest
build_type: 'Debug' build_type: 'Debug'
env:
EXTRA_FLAGS: ''
BUILD_32_BITS: 'off'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: install 32-bit - name: install 32-bit
if: matrix.bits == '32' if: matrix.bits == '32'
run: sudo apt -y install g++-multilib libc6-i386 run: sudo apt -y install g++-multilib libc6-i386
- name: set 32-bit env
if: matrix.bits == '32'
run: |
echo "EXTRA_FLAGS='-m32'" >> $GITHUB_ENV
echo "BUILD_32_BITS='on'" >> $GITHUB_ENV
- name: create build environment - name: create build environment
run: cmake -E make_directory ${{ runner.workspace }}/_build run: cmake -E make_directory ${{ runner.workspace }}/_build
...@@ -45,7 +54,8 @@ jobs: ...@@ -45,7 +54,8 @@ jobs:
run: > run: >
cmake $GITHUB_WORKSPACE cmake $GITHUB_WORKSPACE
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
-DBENCHMARK_BUILD_32_BITS=${{ matrix.bits == 32 }} -DBENCHMARK_BUILD_32_BITS=${{ env.BUILD_32_BITS }}
-DEXTRA_FLAGS=${{ env.EXTRA_FLAGS }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: build - name: build
...@@ -65,15 +75,10 @@ jobs: ...@@ -65,15 +75,10 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
build_type: ['Release', 'Debug'] build_type: ['Release', 'Debug']
compiler: [g++-4.8, clang++-3.6] compiler: [g++-4.8, clang++-3.6, g++-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
env:
ENABLE_TESTING: 'off'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
...@@ -85,6 +90,7 @@ jobs: ...@@ -85,6 +90,7 @@ jobs:
- if: matrix.compiler == 'g++-6' - if: matrix.compiler == 'g++-6'
name: install other bits name: install other bits
run: | run: |
echo "ENABLE_TESTING='on'" >> $GITHUB_ENV
sudo apt -y install software-properties-common sudo apt -y install software-properties-common
sudo add-apt-repository -y "ppa:ubuntu-toolchain-r/test" sudo add-apt-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt update sudo apt update
...@@ -100,9 +106,9 @@ jobs: ...@@ -100,9 +106,9 @@ jobs:
working-directory: ${{ github.workspace }}/_build working-directory: ${{ github.workspace }}/_build
run: > run: >
cmake $GITHUB_WORKSPACE cmake $GITHUB_WORKSPACE
-DBENCHMARK_ENABLE_TESTING=${{ matrix.run_tests }} -DBENCHMARK_ENABLE_TESTING=${{ env.ENABLE_TESTING }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=${{ matrix.run_tests }} -DBENCHMARK_DOWNLOAD_DEPENDENCIES=${{ env.ENABLE_TESTING }}
- name: build - name: build
shell: bash shell: bash
......
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