diff --git a/.github/workflows/ci-build-binary-artifacts.yaml b/.github/workflows/ci-build-binary-artifacts.yaml index a2b7be84..239ebeff 100644 --- a/.github/workflows/ci-build-binary-artifacts.yaml +++ b/.github/workflows/ci-build-binary-artifacts.yaml @@ -39,8 +39,6 @@ jobs: matrix: pkg: - { name: 'RPM', type: 'rpm', path: 'pkg/rpm/RPMS' } - - { name: 'Deb', type: 'deb', path: 'pkg/deb/BUILD/DEB' } - - { name: 'Alpine', type: 'apk', path: 'pkg/apk/build' } cpu: - { arch: 'x86_64', platform: 'x86_64' } - { arch: 'aarch64', platform: 'arm64' } @@ -80,146 +78,3 @@ jobs: with: name: ${{matrix.pkg.type}}-${{matrix.cpu.platform}} path: ${{matrix.pkg.path}} - - package-windows: - timeout-minutes: 120 - name: Build CPP Client on ${{ matrix.name }} - runs-on: ${{ matrix.os }} - env: - VCPKG_ROOT: '${{ github.workspace }}/vcpkg' - INSTALL_DIR: 'C:\\pulsar-cpp' - strategy: - fail-fast: false - matrix: - include: - - name: 'Windows x64' - os: windows-2019 - triplet: x64-windows-static - suffix: 'windows-win64' - generator: 'Visual Studio 16 2019' - arch: '-A x64' - - name: 'Windows x86' - os: windows-2019 - triplet: x86-windows-static - suffix: 'windows-win32' - generator: 'Visual Studio 16 2019' - arch: '-A Win32' - - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: Restore vcpkg and its artifacts. - uses: actions/cache@v3 - id: vcpkg-cache - with: - path: | - ${{ env.VCPKG_ROOT }} - vcpkg_installed - !${{ env.VCPKG_ROOT }}/.git - !${{ env.VCPKG_ROOT }}/buildtrees - !${{ env.VCPKG_ROOT }}/packages - !${{ env.VCPKG_ROOT }}/downloads - key: | - ${{ runner.os }}-${{ matrix.triplet }}-${{ hashFiles( 'vcpkg.json' ) }} - - - name: Get vcpkg(windows) - if: ${{ runner.os == 'Windows' && steps.vcpkg-cache.outputs.cache-hit != 'true' }} - run: | - cd ${{ github.workspace }} - mkdir build -force - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - .\bootstrap-vcpkg.bat - - - name: remove system vcpkg(windows) - if: runner.os == 'Windows' - run: rm -rf "$VCPKG_INSTALLATION_ROOT" - shell: bash - - - name: Install vcpkg packages - run: | - ${{ env.VCPKG_ROOT }}\vcpkg.exe install --triplet ${{ matrix.triplet }} > dependencies.txt - - - name: Build and package - shell: bash - run: | - BUILD_DIR=./build - mkdir -p $BUILD_DIR - cmake -B $BUILD_DIR \ - -G "${{ matrix.generator }}" ${{ matrix.arch }} \ - -DBUILD_TESTS=OFF \ - -DVCPKG_TRIPLET=${{ matrix.triplet }} \ - -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \ - -S . - cmake --build $BUILD_DIR --parallel --config Release - cmake --install $BUILD_DIR - cp dependencies.txt ${{ env.INSTALL_DIR }} - - - name: Zip artifact - shell: bash - run: 7z a -tzip pulsar-client-cpp-${{ matrix.triplet }}.zip ${{ env.INSTALL_DIR }}/* - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.triplet }} - path: ${{ env.INSTALL_DIR }} - - - name: Build and package (Debug) - shell: bash - run: | - BUILD_DIR=./build-debug - INSTALL_DIR_DEBUG=${{ env.INSTALL_DIR }}-Debug - mkdir -p $BUILD_DIR - cmake -B $BUILD_DIR \ - -G "${{ matrix.generator }}" ${{ matrix.arch }} \ - -DBUILD_TESTS=OFF \ - -DVCPKG_TRIPLET=${{ matrix.triplet }} \ - -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR_DEBUG \ - -DCMAKE_BUILD_TYPE=Debug \ - -S . - cmake --build $BUILD_DIR --parallel --config Debug - cmake --install $BUILD_DIR --config Debug - cp dependencies.txt $INSTALL_DIR_DEBUG - - - name: Zip artifact (Debug) - shell: bash - run: 7z a -tzip pulsar-client-cpp-${{ matrix.triplet }}-Debug.zip ${{ env.INSTALL_DIR }}-Debug/* - - - name: Upload artifacts (Debug) - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.triplet }}-Debug - path: ${{ env.INSTALL_DIR }}-Debug - - package-macos: - name: Build macOS libraries - runs-on: macos-latest - timeout-minutes: 500 - - strategy: - fail-fast: false - matrix: - arch: [x86_64, arm64] - - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - export ARCH=${{ matrix.arch }} - ./pkg/mac/build-static-library.sh - - - name: Zip artifact - run: | - cd ./pkg/mac/.install - zip -r macos-${{ matrix.arch }}.zip ./include/pulsar/* ./lib/* - cp macos-${{ matrix.arch }}.zip ../../../ - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: macos-${{ matrix.arch }}.zip - path: macos-${{ matrix.arch }}.zip diff --git a/pkg/rpm/Dockerfile b/pkg/rpm/Dockerfile index 25e56ec8..c384d5ec 100644 --- a/pkg/rpm/Dockerfile +++ b/pkg/rpm/Dockerfile @@ -19,7 +19,7 @@ # Build pulsar client library in Centos with tools to build static RPM -FROM centos:7 +FROM rockylinux:8 ARG PLATFORM @@ -27,10 +27,10 @@ RUN yum update -y && \ yum install -y \ gcc-c++ \ make \ + perl \ rpm-build \ which \ createrepo \ - libstdc++-static \ python3 RUN pip3 install pyyaml @@ -39,15 +39,13 @@ ADD .build/dependencies.yaml / ADD .build/dep-version.py /usr/local/bin # Download and compile boost -# GCC 4.8.2 implementation of std::regex is buggy, so we install boost::regex here RUN BOOST_VERSION=$(dep-version.py boost) && \ echo "BOOST VERSION: '${BOOST_VERSION}'" && \ BOOST_VERSION_UNDESRSCORE=$(echo $BOOST_VERSION | sed 's/\./_/g') && \ curl -O -L https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz && \ tar xfz boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz && \ cd boost_${BOOST_VERSION_UNDESRSCORE} && \ - ./bootstrap.sh --with-libraries=regex && \ - ./b2 address-model=64 cxxflags=-fPIC link=static threading=multi variant=release install && \ + cp -rf ./boost /usr/include/ && \ rm -rf /boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz /boost_${BOOST_VERSION_UNDESRSCORE} RUN CMAKE_VERSION=$(dep-version.py cmake) && \ @@ -102,7 +100,6 @@ RUN OPENSSL_VERSION=$(dep-version.py openssl) && \ make -j8 && make install && \ rm -rf /OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz /openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE} -ENV LD_LIBRARY_PATH /usr/local/ssl/lib/: ENV OPENSSL_ROOT_DIR /usr/local/ssl/ # LibCurl