From dev-return-103957-archive-asf-public=cust-asf.ponee.io@qpid.apache.org Tue Aug 4 16:18:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 6A86918057A for ; Tue, 4 Aug 2020 18:18:03 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 9A22F1250C2 for ; Tue, 4 Aug 2020 16:18:02 +0000 (UTC) Received: (qmail 8428 invoked by uid 500); 4 Aug 2020 16:18:02 -0000 Mailing-List: contact dev-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list dev@qpid.apache.org Received: (qmail 8335 invoked by uid 99); 4 Aug 2020 16:18:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2020 16:18:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0276C43583 for ; Tue, 4 Aug 2020 16:18:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 6C74E78043D for ; Tue, 4 Aug 2020 16:18:00 +0000 (UTC) Date: Tue, 4 Aug 2020 16:18:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: dev@qpid.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DISPATCH-1739) Use GitHub Actions w/ sharding and bubblewrap for some fast CI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DISPATCH-1739?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 7170924#comment-17170924 ]=20 ASF GitHub Bot commented on DISPATCH-1739: ------------------------------------------ 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=3Dpython' + 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}" "{InstallP= refix}" + 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 =3D=3D '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_PR= EFIX=3D${InstallPrefix}" "-DCMAKE_BUILD_TYPE=3D${BuildType}" "-DBUILD_TESTI= NG=3DOFF" "-DENABLE_FUZZ_TESTING=3DOFF" "-GNinja" ${ProtonCMakeExtraArgs} + shell: bash + - name: qpid-proton cmake build/install + run: cmake --build "${ProtonBuildDir}" --config ${BuildType} -t in= stall + shell: bash + - name: qpid-dispatch cmake configure + working-directory: ${{env.DispatchBuildDir}} + run: cmake "${{github.workspace}}/qpid-dispatch" "-DCMAKE_INSTALL_= PREFIX=3D${InstallPrefix}" "-DCMAKE_BUILD_TYPE=3D${BuildType}" "-GNinja" "-= DUSE_BWRAP=3DON" ${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 permissio= ns (executable) + - name: Compress build + working-directory: ${{github.workspace}} + run: tar --xz -cf /tmp/archive.tar.xz --exclude '*.o' --exclude '*= .pyc' --exclude '.git' --exclude=3D'qpid-dispatch/build/console' qpid-dispa= tch 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.shar= ds}}" + 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: ${{matrix.pkg_config_path}} + LD_LIBRARY_PATH: ${{github.workspace}}/install/lib + steps: + - name: Download Build + uses: actions/download-artifact@v2 + with: + name: qpid_dispatch_wrk_${{matrix.os}}_${{matrix.buildType}} + - 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 tox + - name: Install Linux dependencies + if: ${{ runner.os =3D=3D 'Linux' }} + run: | + sudo apt install -y bubblewrap swig ninja-build libsasl2-2 sasl2= -bin libjsoncpp1 libwebsockets15 xz-utils + - name: Install MacOS dependencies + if: ${{ runner.os =3D=3D 'macOS' }} + run: | + brew install cmake ninja libuv swig pkgconfig jsoncpp openssl li= bwebsockets Review comment: I'll drop it. I started doing both Linux and macOS, and then reduced= the scope. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > Use GitHub Actions w/ sharding and bubblewrap for some fast CI > -------------------------------------------------------------- > > Key: DISPATCH-1739 > URL: https://issues.apache.org/jira/browse/DISPATCH-1739 > Project: Qpid Dispatch > Issue Type: Improvement > Components: Tests > Affects Versions: 1.12.0 > Reporter: Jiri Dan=C4=9Bk > Assignee: Jiri Dan=C4=9Bk > Priority: Major > Fix For: 1.13.0 > > > GitHub Actions is a task runner associated with a GitHub project. It is c= onceptually similar to Travis, except that it has some extra features, and = the waits for computational resources are much shorter (currently). > Sharding is a technique to speed up the execution of tests. Instead of ru= nning the tests on one machine one after another, copy the build directory = over to multiple machines, say two, and have the first execute the odd-numb= ered and the second one the even-numbered tests. With luck (if copying the = build directory is relatively fast, and the tests all take approximately th= e same time), this will cut the execution time in half. > Bubblewrap (https://github.com/containers/bubblewrap) is a sandboxing too= l available on Ubuntu and other systems. It is similar to systemd-nspawn ex= cept it does not require sudo or user namespace support in the kernel. It i= s similar to docker, except it does not use images, instead it selectively = mounts directories from the host. Bubblewrap can create an isolated network= namespace, which allows running multiple tests at the same time, each in i= ts own bubblewrap sandbox, and they don't clash on ports. With bubblewrap, = running {{ctest -j4}} is safe. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org For additional commands, e-mail: dev-help@qpid.apache.org