This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/update_github_actions
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 3dcf44067b0eed515ad63c81870a3687ed8a2c75
Author: Pepijn Noltes <[email protected]>
AuthorDate: Fri Jan 13 10:44:00 2023 +0100

    Update github actions to use conan and apt/brew
---
 .github/workflows/celix_etcdlib.yml  | 18 +++----
 .github/workflows/celix_promise.yml  | 18 +++----
 .github/workflows/coverage.yml       | 67 ++++++++++---------------
 .github/workflows/coverity-scan.yml  | 17 +++++--
 .github/workflows/macos-nightly.yml  | 43 -----------------
 .github/workflows/macos.yml          | 94 +++++++++++++++++++++++-------------
 .github/workflows/ubuntu-nightly.yml | 69 --------------------------
 .github/workflows/ubuntu.yml         | 93 ++++++++++++++++++++++++-----------
 8 files changed, 174 insertions(+), 245 deletions(-)

diff --git a/.github/workflows/celix_etcdlib.yml 
b/.github/workflows/celix_etcdlib.yml
index 1abc53cd..a8a3b415 100644
--- a/.github/workflows/celix_etcdlib.yml
+++ b/.github/workflows/celix_etcdlib.yml
@@ -1,21 +1,18 @@
-name: Standalone Celix etcdlib Weekly
+name: Standalone Celix etcdlib
 
 on:
+  push:
+  pull_request:
   schedule:
-    - cron:  '0 0 * * 0'
+    - cron:  '0 0 * * *'
 
 jobs:
   build:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-20.04]
-        compiler: [gcc]
+    runs-on: ubuntu-20.04
     timeout-minutes: 15
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/[email protected]
       - name: Install dependencies
         run: |
           sudo apt-get update
@@ -26,9 +23,6 @@ jobs:
             libjansson-dev \
             libcurl4-openssl-dev
       - name: Build
-        env:
-          CC: ${{ matrix.compiler }}
-          CXX: ${{ matrix.cxx_compiler }}
         run: |
           mkdir build install
           cd build
diff --git a/.github/workflows/celix_promise.yml 
b/.github/workflows/celix_promise.yml
index 92dbd095..bcc2c109 100644
--- a/.github/workflows/celix_promise.yml
+++ b/.github/workflows/celix_promise.yml
@@ -1,21 +1,18 @@
-name: Standalone Celix Promise Weekly
+name: Standalone Celix Promise
 
 on:
+  push:
+  pull_request:
   schedule:
-    - cron:  '0 0 * * 0'
+    - cron:  '0 0 * * *'
 
 jobs:
   build:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-20.04]
-        compiler: [gcc]
+    runs-on: ubuntu-20.04
     timeout-minutes: 15
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/[email protected]
       - name: Install dependencies
         run: |
           sudo apt-get update
@@ -23,9 +20,6 @@ jobs:
             build-essential \
             cmake
       - name: Build
-        env:
-          CC: ${{ matrix.compiler }}
-          CXX: ${{ matrix.cxx_compiler }}
         run: |
           mkdir build install
           cd build
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 26295301..bda133df 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -4,46 +4,37 @@ on: [push, pull_request]
 
 jobs:
   coverage:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
+    timeout-minutes: 120
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
-      - name: Install dependencies
+        uses: actions/[email protected]
+      - name: Install conan and lcov
         run: |
-          sudo apt-get update
-          sudo apt-get install -yq --no-install-recommends \
-            build-essential \
-            curl \
-            uuid-dev \
-            libjansson-dev \
-            libcurl4-openssl-dev \
-            default-jdk \
-            cmake \
-            libffi-dev \
-            libxml2-dev \
-            libczmq-dev \
-            libcpputest-dev \
-            rapidjson-dev \
-            libzip-dev \
-            lcov
-      - name: Build
+          sudo apt-get install -yq --no-install-recommends lcov
+          sudo pip install conan
+      - name: Setup Conan Profile
+        run: |
+          conan profile new default --detect
+          conan profile update settings.build_type=Debug default
+          #Note no backwards compatiblity for gcc5 needed, setting libcxx to 
c++11.
+          conan profile update settings.compiler.libcxx=libstdc++11 default
+      - name: Install Dependencies
         env:
-          BUILD_OPTIONS: |
-            -DENABLE_TESTING=ON
-            -DENABLE_CODE_COVERAGE=ON
-            -DBUILD_EXPERIMENTAL=ON
-            -DBUILD_CXX_REMOTE_SERVICE_ADMIN=ON
-            -DENABLE_TESTING_DEPENDENCY_MANAGER_FOR_CXX11=ON
-            -DENABLE_TESTING_FOR_CXX14=ON
+          CONAN_BUILD_OPTIONS: |
+            -o celix:enable_testing=True
+            -o celix:build_all=True
+            -o enable_code_coverage=True
         run: |
-          mkdir build
-          cd build
-          cmake -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} ..
-          make -j $(nproc)
-      - name: Coverage
+          #force reequire libcurl 7.64.1, due to a sha256 verify issue in 
libcurl/7.87.0
+          conan install . celix/ci -pr:b default -pr:h default -if build 
${CONAN_BUILD_OPTIONS} -b missing --require-override=libcurl/7.64.1
+      - name: Build
         run: |
-          cd $GITHUB_WORKSPACE/build
-          export 
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:$(pwd)/utils:$(pwd)/framework:$(pwd)/dfi
+          conan build . -bf build --configure
+          conan build . -bf build --build
+      - name: Test with coverage
+        run: |
+          cd build
           make coverage
           lcx="lcov --output-file=coverage.info " && for i in `find . -name 
"*.info.cleaned"`; do lcx+=" --add-tracefile=$i"; done && $lcx
       - name: Codecov
@@ -51,11 +42,3 @@ jobs:
         with:
           file: build/coverage.info
           name: codecov-celix
-
-#      NOTE For now disabled, need to be able to configure coveralls thresholds
-#      See https://github.com/lemurheavy/coveralls-public/issues/1431
-#      - name: Coveralls
-#        uses: coverallsapp/github-action@master
-#        with:
-#          github-token: ${{ secrets.GITHUB_TOKEN }}
-#          path-to-lcov: build/coverage.info
diff --git a/.github/workflows/coverity-scan.yml 
b/.github/workflows/coverity-scan.yml
index a159baa6..799800c6 100644
--- a/.github/workflows/coverity-scan.yml
+++ b/.github/workflows/coverity-scan.yml
@@ -1,5 +1,8 @@
-name: coverity-scan
+name: Celix Coverity Scan
+
 on:
+  push:
+  pull_request:
   schedule:
     - cron: '0 0 * * 0' # Weekly at 00:00 UTC
 
@@ -8,7 +11,7 @@ jobs:
     runs-on: ubuntu-20.04
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/[email protected]
       - name: Install dependencies
         run: |
           sudo apt-get update
@@ -16,6 +19,7 @@ jobs:
             build-essential \
             curl \
             uuid-dev \
+            libzip-dev \
             libjansson-dev \
             libcurl4-openssl-dev \
             default-jdk \
@@ -25,7 +29,7 @@ jobs:
             libczmq-dev \
             libcpputest-dev \
             rapidjson-dev \
-            libzip-dev
+            libavahi-compat-libdnssd-dev
       - name: Download Coverity Build Tool
         run: |
           mkdir -p build/cov-analysis-linux64
@@ -37,11 +41,14 @@ jobs:
       - name: Build
         env:
           BUILD_OPTIONS: |
+            -DBUILD_EXPERIMENTAL=ON
             -DENABLE_TESTING=ON
-            -DCMAKE_BUILD_TYPE=Debug
-            -DBUILD_CXX_REMOTE_SERVICE_ADMIN=ON
             -DENABLE_TESTING_DEPENDENCY_MANAGER_FOR_CXX11=ON
             -DENABLE_TESTING_FOR_CXX14=ON
+            -DRSA_JSON_RPC=ON
+            -DRSA_SHM=ON
+            -DRSA_REMOTE_SERVICE_ADMIN_SHM_V2=ON
+            -DSHELL_BONJOUR=ON
         run: |
           cd build
           cmake ${BUILD_OPTIONS} ..
diff --git a/.github/workflows/macos-nightly.yml 
b/.github/workflows/macos-nightly.yml
deleted file mode 100644
index 56352880..00000000
--- a/.github/workflows/macos-nightly.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Celix MacOS Nightly
-
-on:
-  schedule:
-    - cron:  '0 0 * * *'
-
-jobs:
-  build:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [macOS-latest]
-        compiler: [clang]
-    timeout-minutes: 120
-    steps:
-    - name: Checkout source code
-      uses: actions/checkout@v2
-    - name: Install dependencies
-      run: |
-        brew update
-        brew install lcov zeromq czmq openssl cpputest jansson rapidjson libzip
-        brew unlink openssl && brew link openssl --force
-    - name: Build
-      env:
-        CC: ${{ matrix.compiler }}
-        BUILD_OPTIONS: |
-          -DENABLE_TESTING=ON
-          -DENABLE_ADDRESS_SANITIZER=ON
-          -DBUILD_CXX_REMOTE_SERVICE_ADMIN=ON
-          -DENABLE_TESTING_DEPENDENCY_MANAGER_FOR_CXX11=ON
-          -DENABLE_TESTING_FOR_CXX14=ON
-      run: |
-        mkdir build install
-        cd build
-        cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${BUILD_OPTIONS} 
-DCMAKE_INSTALL_PREFIX=../install ..
-        make -j && make install
-    - name: Test
-      run: |
-        cd $GITHUB_WORKSPACE/build
-        export 
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:$(pwd)/utils:$(pwd)/framework:$(pwd)/dfi
-        make test ARGS="-V"
-
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 0921585d..178cb837 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -3,39 +3,67 @@ name: Celix MacOS
 on: [push, pull_request]
 
 jobs:
-  build:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [macOS-latest]
-        compiler: [clang]
+
+  build-conan:
+    if: false #issues in pubsub tests, disable for now
+    runs-on: macOS-latest
+    timeout-minutes: 120
+    steps:
+      - name: Checkout source code
+        uses: actions/[email protected]
+      - name: Install conan
+        run: |
+          brew install conan
+      - name: Setup Conan Profile
+        run: |
+          conan profile new default --detect
+          conan profile update settings.build_type=Debug default
+      - name: Install Dependencies
+        env:
+          CONAN_BUILD_OPTIONS: |
+            -o celix:enable_testing=True
+            -o celix:build_all=True
+        run: |
+          #force reequire libcurl 7.64.1, due to a sha256 verify issue in 
libcurl/7.87.0
+          conan install . celix/ci -pr:b default -pr:h default -if build 
${CONAN_BUILD_OPTIONS} -b missing  --require-override=libcurl/7.64.1
+      - name: Build
+        run: |
+          conan build . -bf build --configure
+          conan build . -bf build --build
+      - name: Test
+        run: |
+          cd build
+          source activate_run.sh
+          ctest --verbose
+          source deactivate_run.sh
+
+  build-brew:
+    runs-on: macOS-latest
     timeout-minutes: 120
     steps:
-    - name: Checkout source code
-      uses: actions/checkout@v2
-    - name: Install dependencies
-      run: |
-        brew update
-        brew install lcov zeromq czmq openssl cpputest jansson rapidjson libzip
-        brew unlink openssl && brew link openssl --force
-    - name: Build
-      env:
-        CC: ${{ matrix.compiler }}
-        BUILD_OPTIONS: |
-          -DENABLE_TESTING=ON
-          -DENABLE_ADDRESS_SANITIZER=ON
-          -DBUILD_CXX_REMOTE_SERVICE_ADMIN=ON
-          -DENABLE_TESTING_DEPENDENCY_MANAGER_FOR_CXX11=ON
-          -DENABLE_TESTING_FOR_CXX14=ON
-      run: |
-        mkdir build install
-        cd build
-        cmake -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} 
-DCMAKE_INSTALL_PREFIX=../install ..
-        make -j && make install
-    - name: Test
-      run: |
-        cd $GITHUB_WORKSPACE/build
-        export 
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:$(pwd)/utils:$(pwd)/framework:$(pwd)/dfi
-        make test ARGS="-V"
+      - name: Checkout source code
+        uses: actions/[email protected]
+      - name: Install dependencies
+        run: |
+          brew update
+          brew install lcov zeromq czmq cpputest jansson rapidjson libzip
+      - name: Build
+        env:
+          BUILD_OPTIONS: |
+            -DENABLE_TESTING=ON
+            -DENABLE_TESTING_DEPENDENCY_MANAGER_FOR_CXX11=ON
+            -DENABLE_TESTING_FOR_CXX14=ON
+            -DENABLE_ADDRESS_SANITIZER=ON
+            -DCMAKE_BUILD_TYPE=Debug
+            -DBUILD_SYSLOG_WRITER=OFF
+        run: |
+          mkdir build install
+          cd build
+          cmake ${BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX=../install ..
+          make -j && make install
+      - name: Test
+        run: |
+          cd $GITHUB_WORKSPACE/build
+          export 
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:$(pwd)/utils:$(pwd)/framework:$(pwd)/dfi
+          make test ARGS="-V"
 
diff --git a/.github/workflows/ubuntu-nightly.yml 
b/.github/workflows/ubuntu-nightly.yml
deleted file mode 100644
index ae14baa1..00000000
--- a/.github/workflows/ubuntu-nightly.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-name: Celix Ubuntu Nightly
-
-on:
-  schedule:
-    - cron:  '0 0 * * *'
-
-jobs:
-  build:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        include:
-          - os: ubuntu-20.04
-            name: clang
-            sanitizer: false #note sanitizer on clang with cpputest does not 
work
-            compiler: clang
-            cxx_compiler: clang++
-          - os: ubuntu-20.04
-            name: gcc
-            sanitizer: true
-            compiler: gcc
-            cxx_compiler: g++
-    timeout-minutes: 120
-    steps:
-    - name: Checkout source code
-      uses: actions/checkout@v2
-    - name: Install dependencies
-      run: |
-        sudo apt-get update
-        sudo apt-get install -yq --no-install-recommends \
-          build-essential \
-          curl \
-          uuid-dev \
-          libjansson-dev \
-          libcurl4-openssl-dev \
-          default-jdk \
-          cmake \
-          libffi-dev \
-          libxml2-dev \
-          libczmq-dev \
-          libcpputest-dev \
-          rapidjson-dev \
-          libzip-dev
-    - name: Build
-      env:
-        CC: ${{ matrix.compiler }}
-        CXX: ${{ matrix.cxx_compiler }}
-        BUILD_OPTIONS: |
-          -DENABLE_TESTING=ON
-          -DBUILD_EXPERIMENTAL=ON
-          -DBUILD_CXX_REMOTE_SERVICE_ADMIN=ON
-          -DENABLE_TESTING_DEPENDENCY_MANAGER_FOR_CXX11=ON
-          -DENABLE_TESTING_FOR_CXX14=ON
-        BUILD_OPTIONS_SANITIZER: |
-          -DENABLE_ADDRESS_SANITIZER=ON
-      run: |
-        mkdir build install
-        cd build
-        if [[ "${{ matrix.sanitizer }}" == "true" ]]; then
-          export BUILD_OPTIONS="${BUILD_OPTIONS} ${BUILD_OPTIONS_SANITIZER}"
-        fi
-        cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${BUILD_OPTIONS} 
-DCMAKE_INSTALL_PREFIX=../install ..
-        make -j $(nproc) && make install
-    - name: Test
-      run: |
-        cd $GITHUB_WORKSPACE/build
-        export 
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:$(pwd)/utils:$(pwd)/framework:$(pwd)/dfi
-        make test ARGS="-V"
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 614f7b1c..9fd7764f 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -1,30 +1,68 @@
 name: Celix Ubuntu
 
-on: [push, pull_request]
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron:  '0 0 * * *'
 
 jobs:
-  build:
-    runs-on: ${{ matrix.os }}
+
+  build-conan:
+    runs-on: ubuntu-latest
     strategy:
       fail-fast: false
       matrix:
-        #os: [ubuntu-20.04]
-        #compiler: [gcc, clang]
-        include:
-          - os: ubuntu-20.04
-            name: clang
-            sanitizer: false #note sanitizer on clang with cpputest does not 
work
-            compiler: clang
-            cxx_compiler: clang++
-          - os: ubuntu-20.04
-            name: gcc
-            sanitizer: true
-            compiler: gcc
-            cxx_compiler: g++
+        compiler: [ [gcc,g++], [clang,clang++] ]
+        type: [ Debug ]
+    timeout-minutes: 120
+    steps:
+      - name: Checkout source code
+        uses: actions/[email protected]
+      - name: Install conan
+        run: |
+          sudo pip install conan
+      - name: Setup Conan Profile
+        env:
+          CC: ${{ matrix.compiler[0] }}
+          CXX: ${{ matrix.compiler[1] }}
+        run: |
+          conan profile new default --detect
+          conan profile update settings.build_type=${{ matrix.type }} default
+          #Note no backwards compatiblity for gcc5 needed, setting libcxx to 
c++11.
+          conan profile update settings.compiler.libcxx=libstdc++11 default
+          conan profile show default
+      - name: Configure and install dependencies
+        env:
+          CC: ${{ matrix.compiler[0] }}
+          CXX: ${{ matrix.compiler[1] }}
+          CONAN_BUILD_OPTIONS: |
+            -o celix:enable_testing=True
+            -o celix:enable_address_sanitizer=True
+            -o celix:build_all=True
+        run: |
+          #force reequire libcurl 7.64.1, due to a sha256 verify issue in 
libcurl/7.87.0
+          conan install . celix/ci -pr:b default -pr:h default -if build 
${CONAN_BUILD_OPTIONS} -b missing  --require-override=libcurl/7.64.1
+      - name: Build
+        env:
+          CC: ${{ matrix.compiler[0] }}
+          CXX: ${{ matrix.compiler[1] }}
+        run: |
+          conan build . -bf build --configure
+          conan build . -bf build --build
+      - name: Test
+        run: |
+          cd build
+          source activate_run.sh
+          ctest --verbose
+          source deactivate_run.sh
+
+  build-apt:
+    runs-on: ubuntu-20.04
     timeout-minutes: 120
     steps:
     - name: Checkout source code
-      uses: actions/checkout@v2
+      uses: actions/[email protected]
     - name: Install dependencies
       run: |
         sudo apt-get update
@@ -32,6 +70,7 @@ jobs:
           build-essential \
           curl \
           uuid-dev \
+          libzip-dev \
           libjansson-dev \
           libcurl4-openssl-dev \
           default-jdk \
@@ -41,30 +80,26 @@ jobs:
           libczmq-dev \
           libcpputest-dev \
           rapidjson-dev \
-          libzip-dev
+          libavahi-compat-libdnssd-dev
     - name: Build
       env:
-        CC: ${{ matrix.compiler }}
-        CXX: ${{ matrix.cxx_compiler }}
         BUILD_OPTIONS: |
-          -DENABLE_TESTING=ON
           -DBUILD_EXPERIMENTAL=ON
-          -DBUILD_CXX_REMOTE_SERVICE_ADMIN=ON
+          -DENABLE_TESTING=ON
           -DENABLE_TESTING_DEPENDENCY_MANAGER_FOR_CXX11=ON
           -DENABLE_TESTING_FOR_CXX14=ON
-        BUILD_OPTIONS_SANITIZER: |
-          -DENABLE_ADDRESS_SANITIZER=ON
+          -DRSA_JSON_RPC=ON
+          -DRSA_SHM=ON
+          -DRSA_REMOTE_SERVICE_ADMIN_SHM_V2=ON
+          -DSHELL_BONJOUR=ON
+          -DCMAKE_BUILD_TYPE=Release
       run: |
         mkdir build install
         cd build
-        if [[ "${{ matrix.sanitizer }}" == "true" ]]; then
-          export BUILD_OPTIONS="${BUILD_OPTIONS} ${BUILD_OPTIONS_SANITIZER}"
-        fi
-        cmake -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} 
-DCMAKE_INSTALL_PREFIX=../install ..
+        cmake ${BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX=../install ..
         make -j $(nproc) && make install
     - name: Test
       run: |
         cd $GITHUB_WORKSPACE/build
         export 
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:$(pwd)/utils:$(pwd)/framework:$(pwd)/dfi
         make test ARGS="-V"
-

Reply via email to