<commit_before>#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Build

on: [push, pull_request, workflow_dispatch]

jobs:
  compile:
    name: "Compile (${{matrix.os}}, ${{matrix.runtimeCheck}})"
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-20.04]
        buildType: [RelWithDebInfo]
        runtimeCheck: [asan]
    env:
      BuildType: ${{matrix.buildType}}
      ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
      DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
      InstallPrefix: ${{github.workspace}}/install

      ProtonCMakeExtraArgs: >
        -DCMAKE_C_COMPILER_LAUNCHER=ccache
        -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
        -DBUILD_BINDINGS=python
        -DBUILD_EXAMPLES=OFF
        -DBUILD_TESTING=OFF
        -DENABLE_FUZZ_TESTING=OFF
        -DRUNTIME_CHECK=${{matrix.runtimeCheck}}
      DispatchCMakeExtraArgs: >
        -DCMAKE_C_COMPILER_LAUNCHER=ccache
        -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
        -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG
        -DQD_ENABLE_ASSERTIONS=ON
        -DCONSOLE_INSTALL=OFF
        -DUSE_BWRAP=ON
        -DRUNTIME_CHECK=${{matrix.runtimeCheck}}
        -DSANITIZE_3RD_PARTY=ON

      CCACHE_BASEDIR: ${{github.workspace}}
      CCACHE_DIR: ${{github.workspace}}/.ccache
      CCACHE_COMPRESS: 'true'
      CCACHE_MAXSIZE: '400MB'
    steps:

      - name: Show environment (Linux)
        if: ${{ always() && runner.os == 'Linux' }}
        run: env -0 | sort -z | tr '\0' '\n'

      - uses: actions/checkout@v2
        with:
          repository: 'apache/qpid-proton'
          ref: 'main'
          path: 'qpid-proton'

      - uses: actions/checkout@v2
        with:
          path: 'qpid-dispatch'

      # https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
      - name: Prepare ccache timestamp
        id: ccache_cache_timestamp
        shell: cmake -P {0}
        run: |
          string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
          message("::set-output name=timestamp::${current_date}")

      - uses: actions/cache@v2.1.5
        env:
          cache-name: cache-ccache
        with:
          path: .ccache
          key: ${{ matrix.os }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }}

      - name: Create Build and Install directories
        run: mkdir -p "${ProtonBuildDir}" "${DispatchBuildDir}" "{InstallPrefix}"

      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: 3.7
          architecture: x64

      - name: Install Python build dependencies
        run: python -m pip install setuptools wheel tox

      - name: Install Linux build dependencies
        if: ${{ runner.os == 'Linux' }}
        run: |
          sudo apt install -y swig libpython3-dev libsasl2-dev libjsoncpp-dev libwebsockets-dev libnghttp2-dev ccache ninja-build pixz

      - name: Zero ccache stats
        run: ccache -z
<commit_msg>Fix "${InstallPrefix}" variable in CI<commit_after>#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Build

on: [push, pull_request, workflow_dispatch]

jobs:
  compile:
    name: "Compile (${{matrix.os}}, ${{matrix.runtimeCheck}})"
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-20.04]
        buildType: [RelWithDebInfo]
        runtimeCheck: [asan]
    env:
      BuildType: ${{matrix.buildType}}
      ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
      DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
      InstallPrefix: ${{github.workspace}}/install

      ProtonCMakeExtraArgs: >
        -DCMAKE_C_COMPILER_LAUNCHER=ccache
        -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
        -DBUILD_BINDINGS=python
        -DBUILD_EXAMPLES=OFF
        -DBUILD_TESTING=OFF
        -DENABLE_FUZZ_TESTING=OFF
        -DRUNTIME_CHECK=${{matrix.runtimeCheck}}
      DispatchCMakeExtraArgs: >
        -DCMAKE_C_COMPILER_LAUNCHER=ccache
        -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
        -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG
        -DQD_ENABLE_ASSERTIONS=ON
        -DCONSOLE_INSTALL=OFF
        -DUSE_BWRAP=ON
        -DRUNTIME_CHECK=${{matrix.runtimeCheck}}
        -DSANITIZE_3RD_PARTY=ON

      CCACHE_BASEDIR: ${{github.workspace}}
      CCACHE_DIR: ${{github.workspace}}/.ccache
      CCACHE_COMPRESS: 'true'
      CCACHE_MAXSIZE: '400MB'
    steps:

      - name: Show environment (Linux)
        if: ${{ always() && runner.os == 'Linux' }}
        run: env -0 | sort -z | tr '\0' '\n'

      - uses: actions/checkout@v2
        with:
          repository: 'apache/qpid-proton'
          ref: 'main'
          path: 'qpid-proton'

      - uses: actions/checkout@v2
        with:
          path: 'qpid-dispatch'

      # https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
      - name: Prepare ccache timestamp
        id: ccache_cache_timestamp
        shell: cmake -P {0}
        run: |
          string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
          message("::set-output name=timestamp::${current_date}")

      - uses: actions/cache@v2.1.5
        env:
          cache-name: cache-ccache
        with:
          path: .ccache
          key: ${{ matrix.os }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }}

      - name: Create Build and Install directories
        run: mkdir -p "${ProtonBuildDir}" "${DispatchBuildDir}" "${InstallPrefix}"

      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: 3.7
          architecture: x64

      - name: Install Python build dependencies
        run: python -m pip install setuptools wheel tox

      - name: Install Linux build dependencies
        if: ${{ runner.os == 'Linux' }}
        run: |
          sudo apt install -y swig libpython3-dev libsasl2-dev libjsoncpp-dev libwebsockets-dev libnghttp2-dev ccache ninja-build pixz

      - name: Zero ccache stats
        run: ccache -z

{'fraction_non_alphanumeric': 0.11389638771050263, 'fraction_numerical': 0.009255688391824142, 'mean_word_length': 2.5902168897092754, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5872044', 'n_tokens_mistral': 2521, 'n_tokens_neox': 2395, 'n_words': 606}