[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #809: DISPATCH-1739 Add GitHub Action w/ sharding and bubblewrap

2020-08-05 Thread GitBox


jiridanek commented on a change in pull request #809:
URL: https://github.com/apache/qpid-dispatch/pull/809#discussion_r466047045



##
File path: .github/workflows/build.yaml
##
@@ -0,0 +1,165 @@
+#
+# 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]
+
+jobs:
+  build:
+runs-on: ${{ matrix.os }}
+strategy:
+  fail-fast: false
+  matrix:
+os: [ubuntu-20.04]
+buildType: [RelWithDebInfo]
+env:
+  BuildType: ${{matrix.buildType}}
+  ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
+  DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
+  InstallPrefix: ${{github.workspace}}/install
+  ProtonCMakeExtraArgs: '-DBUILD_BINDINGS=python'
+  DispatchCMakeExtraArgs: ''
+steps:
+  - uses: actions/checkout@v2
+with:
+  repository: 'apache/qpid-proton'
+  ref: 'master'
+  path: 'qpid-proton'
+  - uses: actions/checkout@v2
+with:
+  path: 'qpid-dispatch'
+  - name: actions/cache@v2 node-modules
+uses: actions/cache@v2
+env:
+  cache-name: cache-node-modules
+with:
+  path: ~/.npm
+  key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ 
hashFiles('**/package-lock.json') }}
+  restore-keys: |
+${{ runner.os }}-build-${{ env.cache-name }}-
+${{ runner.os }}-build-
+${{ runner.os }}-
+  - name: Create Build and Install directories
+run: mkdir -p "${ProtonBuildDir}" "${DispatchBuildDir}" 
"{InstallPrefix}"
+shell: bash
+  - name: Setup python
+uses: actions/setup-python@v2
+with:
+  python-version: 3.6
+  architecture: x64
+  - name: Install python dependencies
+run: |
+  python -m pip install --upgrade pip
+  python -m pip install setuptools wheel tox
+  - name: Install Linux dependencies
+if: ${{ runner.os == 'Linux' }}
+run: |
+  sudo apt install -y swig ninja-build libpython3-dev libsasl2-dev 
libjsoncpp-dev libwebsockets-dev xz-utils
+  - name: qpid-proton cmake configure
+working-directory: ${{env.ProtonBuildDir}}
+run: cmake "${{github.workspace}}/qpid-proton" 
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" "-DCMAKE_BUILD_TYPE=${BuildType}" 
"-DBUILD_TESTING=OFF" "-DENABLE_FUZZ_TESTING=OFF" "-GNinja" 
${ProtonCMakeExtraArgs}
+shell: bash
+  - name: qpid-proton cmake build/install
+run: cmake --build "${ProtonBuildDir}" --config ${BuildType} -t install
+shell: bash
+  - name: qpid-dispatch cmake configure
+working-directory: ${{env.DispatchBuildDir}}
+run: cmake "${{github.workspace}}/qpid-dispatch" 
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" "-DCMAKE_BUILD_TYPE=${BuildType}" 
"-GNinja" "-DUSE_BWRAP=ON" ${DispatchCMakeExtraArgs}
+shell: bash
+  - name: qpid-dispatch cmake build/install
+run: cmake --build "${DispatchBuildDir}" --config ${BuildType} -t 
install
+shell: bash
+  # github actions/upload-artifact@v2 does not preserve file permissions 
(executable)
+  - name: Compress build
+working-directory: ${{github.workspace}}
+run: tar --xz -cf /tmp/archive.tar.xz --exclude '*.o' --exclude 
'*.pyc' --exclude '.git' --exclude='qpid-dispatch/build/console' qpid-dispatch 
install qpid-proton/build/python/pkgs
+  - name: Upload archive
+uses: actions/upload-artifact@v2
+with:
+  name: qpid_dispatch_wrk_${{matrix.os}}_${{matrix.buildType}}
+  path: /tmp/archive.tar.xz
+  test:
+name: "Test (${{matrix.os}}, shard ${{matrix.shard}} of ${{matrix.shards}}"
+runs-on: ${{ matrix.os }}
+needs: [build]
+strategy:
+  fail-fast: false
+  matrix:
+os: [ubuntu-20.04]
+buildType: [RelWithDebInfo]
+shard: [1, 2, 3, 4]
+shards: [4]
+env:
+  BuildType: ${{matrix.buildType}}
+  ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
+  DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
+  InstallPrefix: ${{github.workspace}}/install
+  PKG_CONFIG_PATH: 

[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #809: DISPATCH-1739 Add GitHub Action w/ sharding and bubblewrap

2020-08-04 Thread GitBox


jiridanek commented on a change in pull request #809:
URL: https://github.com/apache/qpid-dispatch/pull/809#discussion_r465170348



##
File path: .github/workflows/build.yaml
##
@@ -0,0 +1,165 @@
+#
+# 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]
+
+jobs:
+  build:
+runs-on: ${{ matrix.os }}
+strategy:
+  fail-fast: false
+  matrix:
+os: [ubuntu-20.04]
+buildType: [RelWithDebInfo]
+env:
+  BuildType: ${{matrix.buildType}}
+  ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
+  DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
+  InstallPrefix: ${{github.workspace}}/install
+  ProtonCMakeExtraArgs: '-DBUILD_BINDINGS=python'
+  DispatchCMakeExtraArgs: ''
+steps:
+  - uses: actions/checkout@v2
+with:
+  repository: 'apache/qpid-proton'
+  ref: 'master'
+  path: 'qpid-proton'
+  - uses: actions/checkout@v2
+with:
+  path: 'qpid-dispatch'
+  - name: actions/cache@v2 node-modules
+uses: actions/cache@v2
+env:
+  cache-name: cache-node-modules
+with:
+  path: ~/.npm
+  key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ 
hashFiles('**/package-lock.json') }}
+  restore-keys: |
+${{ runner.os }}-build-${{ env.cache-name }}-
+${{ runner.os }}-build-
+${{ runner.os }}-
+  - name: Create Build and Install directories
+run: mkdir -p "${ProtonBuildDir}" "${DispatchBuildDir}" 
"{InstallPrefix}"
+shell: bash
+  - name: Setup python
+uses: actions/setup-python@v2
+with:
+  python-version: 3.6
+  architecture: x64
+  - name: Install python dependencies
+run: |
+  python -m pip install --upgrade pip
+  python -m pip install setuptools wheel tox
+  - name: Install Linux dependencies
+if: ${{ runner.os == 'Linux' }}
+run: |
+  sudo apt install -y swig ninja-build libpython3-dev libsasl2-dev 
libjsoncpp-dev libwebsockets-dev xz-utils
+  - name: qpid-proton cmake configure
+working-directory: ${{env.ProtonBuildDir}}
+run: cmake "${{github.workspace}}/qpid-proton" 
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" "-DCMAKE_BUILD_TYPE=${BuildType}" 
"-DBUILD_TESTING=OFF" "-DENABLE_FUZZ_TESTING=OFF" "-GNinja" 
${ProtonCMakeExtraArgs}
+shell: bash
+  - name: qpid-proton cmake build/install
+run: cmake --build "${ProtonBuildDir}" --config ${BuildType} -t install
+shell: bash
+  - name: qpid-dispatch cmake configure
+working-directory: ${{env.DispatchBuildDir}}
+run: cmake "${{github.workspace}}/qpid-dispatch" 
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" "-DCMAKE_BUILD_TYPE=${BuildType}" 
"-GNinja" "-DUSE_BWRAP=ON" ${DispatchCMakeExtraArgs}
+shell: bash
+  - name: qpid-dispatch cmake build/install
+run: cmake --build "${DispatchBuildDir}" --config ${BuildType} -t 
install
+shell: bash
+  # github actions/upload-artifact@v2 does not preserve file permissions 
(executable)
+  - name: Compress build
+working-directory: ${{github.workspace}}
+run: tar --xz -cf /tmp/archive.tar.xz --exclude '*.o' --exclude 
'*.pyc' --exclude '.git' --exclude='qpid-dispatch/build/console' qpid-dispatch 
install qpid-proton/build/python/pkgs
+  - name: Upload archive
+uses: actions/upload-artifact@v2
+with:
+  name: qpid_dispatch_wrk_${{matrix.os}}_${{matrix.buildType}}
+  path: /tmp/archive.tar.xz
+  test:
+name: "Test (${{matrix.os}}, shard ${{matrix.shard}} of ${{matrix.shards}}"
+runs-on: ${{ matrix.os }}
+needs: [build]
+strategy:
+  fail-fast: false
+  matrix:
+os: [ubuntu-20.04]
+buildType: [RelWithDebInfo]
+shard: [1, 2, 3, 4]
+shards: [4]
+env:
+  BuildType: ${{matrix.buildType}}
+  ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
+  DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
+  InstallPrefix: ${{github.workspace}}/install
+  PKG_CONFIG_PATH: 

[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #809: DISPATCH-1739 Add GitHub Action w/ sharding and bubblewrap

2020-08-04 Thread GitBox


jiridanek commented on a change in pull request #809:
URL: https://github.com/apache/qpid-dispatch/pull/809#discussion_r465170038



##
File path: .github/workflows/build.yaml
##
@@ -0,0 +1,165 @@
+#
+# 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]
+
+jobs:
+  build:
+runs-on: ${{ matrix.os }}
+strategy:
+  fail-fast: false
+  matrix:
+os: [ubuntu-20.04]
+buildType: [RelWithDebInfo]
+env:
+  BuildType: ${{matrix.buildType}}
+  ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
+  DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
+  InstallPrefix: ${{github.workspace}}/install
+  ProtonCMakeExtraArgs: '-DBUILD_BINDINGS=python'
+  DispatchCMakeExtraArgs: ''
+steps:
+  - uses: actions/checkout@v2
+with:
+  repository: 'apache/qpid-proton'
+  ref: 'master'
+  path: 'qpid-proton'
+  - uses: actions/checkout@v2
+with:
+  path: 'qpid-dispatch'
+  - name: actions/cache@v2 node-modules
+uses: actions/cache@v2
+env:
+  cache-name: cache-node-modules
+with:
+  path: ~/.npm
+  key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ 
hashFiles('**/package-lock.json') }}
+  restore-keys: |
+${{ runner.os }}-build-${{ env.cache-name }}-
+${{ runner.os }}-build-
+${{ runner.os }}-
+  - name: Create Build and Install directories
+run: mkdir -p "${ProtonBuildDir}" "${DispatchBuildDir}" 
"{InstallPrefix}"
+shell: bash
+  - name: Setup python
+uses: actions/setup-python@v2
+with:
+  python-version: 3.6
+  architecture: x64
+  - name: Install python dependencies
+run: |
+  python -m pip install --upgrade pip
+  python -m pip install setuptools wheel tox
+  - name: Install Linux dependencies
+if: ${{ runner.os == 'Linux' }}
+run: |
+  sudo apt install -y swig ninja-build libpython3-dev libsasl2-dev 
libjsoncpp-dev libwebsockets-dev xz-utils
+  - name: qpid-proton cmake configure
+working-directory: ${{env.ProtonBuildDir}}
+run: cmake "${{github.workspace}}/qpid-proton" 
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" "-DCMAKE_BUILD_TYPE=${BuildType}" 
"-DBUILD_TESTING=OFF" "-DENABLE_FUZZ_TESTING=OFF" "-GNinja" 
${ProtonCMakeExtraArgs}
+shell: bash
+  - name: qpid-proton cmake build/install
+run: cmake --build "${ProtonBuildDir}" --config ${BuildType} -t install
+shell: bash
+  - name: qpid-dispatch cmake configure
+working-directory: ${{env.DispatchBuildDir}}
+run: cmake "${{github.workspace}}/qpid-dispatch" 
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" "-DCMAKE_BUILD_TYPE=${BuildType}" 
"-GNinja" "-DUSE_BWRAP=ON" ${DispatchCMakeExtraArgs}
+shell: bash
+  - name: qpid-dispatch cmake build/install
+run: cmake --build "${DispatchBuildDir}" --config ${BuildType} -t 
install
+shell: bash
+  # github actions/upload-artifact@v2 does not preserve file permissions 
(executable)
+  - name: Compress build
+working-directory: ${{github.workspace}}
+run: tar --xz -cf /tmp/archive.tar.xz --exclude '*.o' --exclude 
'*.pyc' --exclude '.git' --exclude='qpid-dispatch/build/console' qpid-dispatch 
install qpid-proton/build/python/pkgs
+  - name: Upload archive
+uses: actions/upload-artifact@v2
+with:
+  name: qpid_dispatch_wrk_${{matrix.os}}_${{matrix.buildType}}
+  path: /tmp/archive.tar.xz
+  test:
+name: "Test (${{matrix.os}}, shard ${{matrix.shard}} of ${{matrix.shards}}"
+runs-on: ${{ matrix.os }}
+needs: [build]
+strategy:
+  fail-fast: false
+  matrix:
+os: [ubuntu-20.04]
+buildType: [RelWithDebInfo]
+shard: [1, 2, 3, 4]
+shards: [4]
+env:
+  BuildType: ${{matrix.buildType}}
+  ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
+  DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build
+  InstallPrefix: ${{github.workspace}}/install
+  PKG_CONFIG_PATH: