chore: bump rdkafka commit hash #403
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'release-*' | |
| pull_request: | |
| branches: [ main ] | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| env: | |
| APP_NAME: 'manticore-executor' | |
| DOCKER_TAG: 'manticoresearch/manticore-executor' | |
| PHP_VERSION: '8.4.17' | |
| MAINTAINER: 'Manticore' | |
| DESC: 'Custom built PHP executor for Manticore.' | |
| EXTRA_NAME: 'manticore-extra' | |
| EXTRA_DESC: 'Manticore extra package that includes executor and columnar lib' | |
| COLUMNAR_NAME: 'manticore-columnar-lib' | |
| COLUMNAR_VERSION: '8.0.0' | |
| GALERA_NAME: 'manticore-galera' | |
| GALERA_VERSION: '3.37' | |
| LOAD_NAME: 'manticore-load' | |
| LOAD_VERSION: '1.18.2' | |
| DOCKER_CLI_EXPERIMENTAL: enabled | |
| jobs: | |
| pack: | |
| name: OK to pack? | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| version: ${{ steps.semver-tagger.outputs.version }} | |
| version_full: ${{ steps.semver-tagger.outputs.version_full }} | |
| version_rpm: ${{ steps.semver-tagger.outputs.version_rpm }} | |
| version_deb: ${{ steps.semver-tagger.outputs.version_deb }} | |
| target: ${{ steps.semver-tagger.outputs.target }} | |
| should_continue: ${{ steps.check-should-continue.outputs.should_continue }} | |
| if: | | |
| (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'pack') || contains(github.event.pull_request.labels.*.name, 'publish'))) | |
| || ( github.event_name == 'push' && ( github.ref == 'refs/heads/main' || startsWith( github.ref, 'refs/tags/release-' ) || contains( github.ref, 'refs/tags/pack_publish' ) ) ) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update version | |
| id: semver-tagger | |
| uses: manticoresoftware/semver-tagger-action@main | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| conventional_commits_authors: alexey@manticoresearch.com | |
| ignore_patterns: '\.md$|^test/|^manual/|\.clt|\.github|\.patterns|\.yml|\.gitignore' | |
| debug: true | |
| - name: Check if we should continue packing | |
| id: check-should-continue | |
| run: | | |
| # Continue if version was updated, if we have the "pack" label on PR, or if target is "release" | |
| if [[ "${{ steps.semver-tagger.outputs.version_updated }}" == "true" ]]; then | |
| echo "Continuing because version was updated" | |
| echo "should_continue=true" >> $GITHUB_OUTPUT | |
| elif [[ "${{ steps.semver-tagger.outputs.target }}" == "release" ]]; then | |
| echo "Continuing because target is release" | |
| echo "should_continue=true" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.event_name }}" == "pull_request" && "${{ contains(github.event.pull_request.labels.*.name, 'pack') }}" == "true" ]]; then | |
| echo "Continuing because PR has 'pack' label" | |
| echo "should_continue=true" >> $GITHUB_OUTPUT | |
| elif [[ "${{ contains(github.ref, 'refs/tags/pack_publish') }}" == "true" ]]; then | |
| echo "Continuing because commit has 'pack_publish' tag" | |
| echo "should_continue=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "Skipping packing because version wasn't updated, target is not release, and there's no 'pack' label or tag" | |
| echo "should_continue=false" >> $GITHUB_OUTPUT | |
| fi | |
| - run: | | |
| echo "# Packing and publishing all for commit ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY | |
| echo "* Commit URL: [${{ github.sha }}](/${{ github.repository }}/commit/${{ github.sha }})" >> $GITHUB_STEP_SUMMARY | |
| echo "* Initiated by: [@${{ github.actor }}](https://github.com/${{ github.actor }})" >> $GITHUB_STEP_SUMMARY | |
| echo "* Ref: ${{ github.ref_type }} \"${{ github.ref_name }}\"" >> $GITHUB_STEP_SUMMARY | |
| echo "* Attempt: ${{ github.run_attempt }}" >> $GITHUB_STEP_SUMMARY | |
| echo "* Version updated: ${{ steps.semver-tagger.outputs.version_updated }}" >> $GITHUB_STEP_SUMMARY | |
| echo "* Should continue packing: ${{ steps.check-should-continue.outputs.should_continue }}" >> $GITHUB_STEP_SUMMARY | |
| build-artifact: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - pack | |
| if: needs.pack.outputs.should_continue == 'true' | |
| strategy: | |
| matrix: | |
| include: | |
| - name: AMD64 with buildx for Linux | |
| os: ubuntu-22.04 | |
| arch: amd64 | |
| use_buildx: true | |
| run: "" | |
| - name: ARM64 with buildx for Linux | |
| os: ubuntu-22.04 | |
| arch: arm64 | |
| use_buildx: true | |
| run: "" | |
| - name: AMD64 native on OSX | |
| os: macos-15-intel | |
| arch: x86_64 | |
| use_buildx: false | |
| run: ./build-osx | |
| - name: ARM64 native on OSX | |
| os: macos-15 | |
| arch: arm64 | |
| use_buildx: false | |
| run: ./build-osx | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| if: ${{ matrix.use_buildx == true }} | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| if: ${{ matrix.use_buildx == true }} | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build docker image | |
| if: ${{ matrix.use_buildx == true }} | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| platforms: linux/${{ matrix.arch }} | |
| load: true | |
| push: false | |
| tags: ${{ env.DOCKER_TAG }}:${{ needs.pack.outputs.version }} | |
| build-args: BUILD_DEV=0 | |
| - name: Create artifact | |
| run: | | |
| [ -n "${{ matrix.run }}" ] && ${{ matrix.run }} ${{ env.PHP_VERSION }} || true | |
| APP_ARCH=${{ matrix.arch }} \ | |
| APP_VERSION=${{ needs.pack.outputs.version_full }} \ | |
| APP_NAME=${{ env.APP_NAME }} \ | |
| RUNNER_OS="${{ runner.os }}" \ | |
| DOCKER_IMAGE=${{ env.DOCKER_TAG }}:${{ needs.pack.outputs.version }} \ | |
| ./collect-assets | |
| shell: bash | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-${{ matrix.os }}-${{ matrix.arch }} | |
| path: ./*${{ matrix.arch }}.tar.gz | |
| # this step is important for the release process, because it creates the artifact for the dev version which is then put to github as a release asset and used by test_kit_docker_build.sh | |
| build-artifact-dev: | |
| runs-on: ubuntu-22.04 | |
| needs: | |
| - pack | |
| if: needs.pack.outputs.should_continue == 'true' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - id: vars | |
| run: | | |
| echo "app_version=$(echo ${{ github.ref_name }} | cut -dv -f2)" >> $GITHUB_OUTPUT | |
| - name: Build manticore-executor-dev | |
| run: ./build-linux ${{ env.PHP_VERSION }} 0 1 | |
| shell: bash | |
| - name: Create artifact | |
| run: | | |
| APP_ARCH=amd64 \ | |
| APP_VERSION=${{ needs.pack.outputs.version_full }} \ | |
| APP_NAME=${{ env.APP_NAME }} \ | |
| RUNNER_OS="${{ runner.os }}" \ | |
| ASSET_SUFFIX=-dev \ | |
| ./collect-assets | |
| shell: bash | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-dev-ubuntu-22.04-amd64 | |
| path: ./*.tar.gz | |
| build-linux-packages: | |
| needs: | |
| - pack | |
| - build-artifact | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Download artifact | |
| uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: artifact-ubuntu-22.04-amd64 | |
| path: . | |
| - name: Prepare packages structure | |
| run: | | |
| tar -xzf *.tar.gz | |
| # Setup openssl workaround | |
| mkdir -p .debpkg/DEBIAN | |
| cp -p packages/postrun .debpkg/DEBIAN/postinst | |
| mkdir -p .debpkg/usr/bin | |
| mkdir -p .rpmpkg/usr/bin | |
| mkdir -p .rpmpkg/usr/share/ | |
| cp -p *-linux-amd64/${{ env.APP_NAME }} .debpkg/usr/bin/${{ env.APP_NAME }} | |
| chmod +x .debpkg/usr/bin/${{ env.APP_NAME }} | |
| # cp -p README.md .debpkg/README.md | |
| # cp -p LICENSE .debpkg/LICENSE | |
| cp -p *-linux-amd64/${{ env.APP_NAME }} .rpmpkg/usr/bin/${{ env.APP_NAME }} | |
| cp -p LICENSE .rpmpkg/usr/share/${{ env.APP_NAME }}-LICENSE | |
| cp -p README.md .rpmpkg/usr/share/${{ env.APP_NAME }}-README.md | |
| - uses: manticoresoftware/actions-build-deb-action@master | |
| with: | |
| package: ${{ env.APP_NAME }} | |
| package_root: .debpkg | |
| maintainer: ${{ env.MAINTAINER }} | |
| version: ${{ needs.pack.outputs.version_deb }} | |
| arch: 'amd64' | |
| desc: '${{ env.DESC }}' | |
| license: 'PHP-3.01' | |
| - name: Build RPM packages | |
| run: | | |
| sudo apt-get update -y -q | |
| sudo apt-get install -y rpm | |
| RPMBUILD_DIR="$HOME/rpmbuild" | |
| RPMBUILD_SOURCE_DIR="$RPMBUILD_DIR/SOURCES" | |
| RPMBUILD_SPEC_DIR="$RPMBUILD_DIR/SPECS" | |
| WORKDIR="/tmp/work" | |
| mkdir "$WORKDIR" | |
| spec_file=main.spec | |
| cp "packages/$spec_file" "$WORKDIR" | |
| cp -rp ".rpmpkg" "$WORKDIR/${{ env.APP_NAME }}" | |
| cd "$WORKDIR" | |
| # Prepare spec file for RPM | |
| sed -i 's/{{ NAME }}/${{ env.APP_NAME }}/g' $spec_file | |
| sed -i 's/{{ VERSION }}/${{ needs.pack.outputs.version_rpm }}/g' $spec_file | |
| sed -i 's/{{ MAINTAINER }}/${{ env.MAINTAINER }}/g' $spec_file | |
| sed -i 's/{{ DESC }}/${{ env.DESC }}/g' $spec_file | |
| sed -i 's/{{ ARCH }}/x86_64/g' $spec_file | |
| # sed -i "s@{{ POSTRUN }}@$(<packages/postrun)@g" $spec_file | |
| tar czf tmp.tar.gz "${{ env.APP_NAME }}/" | |
| mkdir -p "$RPMBUILD_SOURCE_DIR" | |
| mkdir -p "$RPMBUILD_SPEC_DIR" | |
| mv tmp.tar.gz "$RPMBUILD_SOURCE_DIR" | |
| cp -p $spec_file "$RPMBUILD_SPEC_DIR" | |
| rpmbuild -bb "$RPMBUILD_SPEC_DIR/$spec_file" | |
| ls -lah "$RPMBUILD_DIR/RPMS/x86_64"/*.rpm | |
| cp -p "$RPMBUILD_DIR/RPMS/x86_64"/*.rpm $GITHUB_WORKSPACE | |
| - name: Rename packages to proper name | |
| run: | | |
| version=${{ needs.pack.outputs.version_rpm }} | |
| rpm_path="./${{ env.APP_NAME }}-${version}-1.x86_64.rpm" | |
| cp $rpm_path "./${{ env.APP_NAME }}-${version}-1.el8.x86_64.rpm" | |
| cp $rpm_path "./${{ env.APP_NAME }}-${version}-1.el9.x86_64.rpm" | |
| mv $rpm_path "./${{ env.APP_NAME }}-${version}-1.el10.x86_64.rpm" | |
| mkdir -p ./artifacts | |
| mv *.deb ./artifacts/ | |
| mv *.rpm ./artifacts/ | |
| ls -lah ./artifacts/*.deb | |
| ls -lah ./artifacts/*.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-deb-amd64 | |
| path: ./artifacts/*.deb | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-rpm-el8-amd64 | |
| path: ./artifacts/*.el8.*.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-rpm-el9-amd64 | |
| path: ./artifacts/*.el9.*.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-rpm-el10-amd64 | |
| path: ./artifacts/*.el10.*.rpm | |
| build-linux-packages-arm64: | |
| needs: | |
| - pack | |
| - build-artifact | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Download artifact | |
| uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: artifact-ubuntu-22.04-arm64 | |
| path: . | |
| - name: Prepare package | |
| run: | | |
| tar -xzf *.tar.gz | |
| # Setup openssl workaround | |
| mkdir -p .debpkg/DEBIAN | |
| cp -p packages/postrun .debpkg/DEBIAN/postinst | |
| mkdir -p .debpkg/usr/bin | |
| mkdir -p .rpmpkg/usr/bin | |
| mkdir -p .rpmpkg/usr/share | |
| cp -p *-linux-arm64/${{ env.APP_NAME }} .debpkg/usr/bin/${{ env.APP_NAME }} | |
| cp -p *-linux-arm64/${{ env.APP_NAME }} .rpmpkg/usr/bin/${{ env.APP_NAME }} | |
| cp -p LICENSE .rpmpkg/usr/share/${{ env.APP_NAME }}-LICENSE | |
| cp -p README.md .rpmpkg/usr/share/${{ env.APP_NAME }}-README.md | |
| - uses: manticoresoftware/actions-build-deb-action@master | |
| with: | |
| package: ${{ env.APP_NAME }} | |
| package_root: .debpkg | |
| maintainer: ${{ env.MAINTAINER }} | |
| version: ${{ needs.pack.outputs.version_deb }} | |
| arch: 'arm64' | |
| desc: '${{ env.DESC }}' | |
| license: 'PHP-3.01' | |
| - name: Rename package to proper name | |
| run: | | |
| mkdir -p ./artifacts | |
| mv *.deb ./artifacts | |
| ls -lah ./artifacts/*.deb | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-deb-arm64 | |
| path: ./artifacts/*.deb | |
| - name: Cleanup the artifacts directory | |
| run: | | |
| rm -fr ./artifacts/* | |
| - uses: manticoresoftware/actions-run-on-arch-action@master | |
| name: Preparing EL8 RPM package | |
| with: | |
| arch: aarch64 | |
| distro: centos8 | |
| githubToken: ${{ github.token }} | |
| setup: | | |
| mkdir -p "${PWD}/artifacts/packages" | |
| cp -rp .rpmpkg "${PWD}/artifacts/.rpmpkg" | |
| dockerRunArgs: | | |
| --volume "${PWD}/artifacts:/artifacts" | |
| install: | | |
| cd /etc/yum.repos.d | |
| sed -i 's|mirrorlist=|#mirrorlist=|g' *.repo | |
| sed -i 's|#baseurl=|baseurl=|g' *.repo | |
| sed -i 's|http://mirror.centos.org|http://vault.centos.org|g' *.repo | |
| yum clean all | |
| yum install -y sudo git kernel-devel kernel-headers | |
| yum groupinstall -y "Development Tools" | |
| run: | | |
| RPMBUILD_DIR="$HOME/rpmbuild" | |
| RPMBUILD_SOURCE_DIR="$RPMBUILD_DIR/SOURCES" | |
| RPMBUILD_SPEC_DIR="$RPMBUILD_DIR/SPECS" | |
| WORKDIR="/tmp/work" | |
| mkdir "$WORKDIR" | |
| spec_file=main.spec | |
| cp "packages/$spec_file" "$WORKDIR" | |
| cp -rp "/artifacts/.rpmpkg" "$WORKDIR/${{ env.APP_NAME }}" | |
| cd "$WORKDIR" | |
| # Prepare spec file for RPM | |
| sed -i 's/{{ NAME }}/${{ env.APP_NAME }}/g' $spec_file | |
| sed -i 's/{{ VERSION }}/${{ needs.pack.outputs.version_rpm }}/g' $spec_file | |
| sed -i 's/{{ MAINTAINER }}/${{ env.MAINTAINER }}/g' $spec_file | |
| sed -i 's/{{ DESC }}/${{ env.DESC }}/g' $spec_file | |
| sed -i 's/{{ ARCH }}/aarch64/g' $spec_file | |
| # sed -i "s@{{ POSTRUN }}@$(<packages/postrun)@g" $spec_file | |
| tar czf tmp.tar.gz "${{ env.APP_NAME }}/" | |
| mkdir -p "$RPMBUILD_SOURCE_DIR" | |
| mkdir -p "$RPMBUILD_SPEC_DIR" | |
| mv tmp.tar.gz "$RPMBUILD_SOURCE_DIR" | |
| cp -p $spec_file "$RPMBUILD_SPEC_DIR" | |
| rpmbuild -bb "$RPMBUILD_SPEC_DIR/$spec_file" | |
| cp -p "$RPMBUILD_DIR/RPMS/$(uname -m)"/*.rpm /artifacts/ | |
| - name: Rename package to proper name | |
| run: | | |
| ls -lah ./artifacts/*.rpm | |
| version=${{ needs.pack.outputs.version_rpm }} | |
| rpm_path="./artifacts/${{ env.APP_NAME }}-${version}-1.el8.aarch64.rpm" | |
| cp $rpm_path "./artifacts/${{ env.APP_NAME }}-${version}-1.el9.aarch64.rpm" | |
| cp $rpm_path "./artifacts/${{ env.APP_NAME }}-${version}-1.el10.aarch64.rpm" | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-rpm-el8-aarch64 | |
| path: ./artifacts/*.el8.*.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-rpm-el9-aarch64 | |
| path: ./artifacts/*.el9.*.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-rpm-el10-aarch64 | |
| path: ./artifacts/*.el10.*.rpm | |
| build-extra-packages: | |
| runs-on: ubuntu-22.04 | |
| needs: | |
| - pack | |
| if: needs.pack.outputs.should_continue == 'true' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Prepare packages structure | |
| run: | | |
| mkdir -p .debpkg/usr/bin | |
| mkdir -p .debpkg/usr/share/manticore | |
| mkdir -p .rpmpkg/usr/bin | |
| mkdir -p .rpmpkg/usr/share/manticore | |
| cp -p extra.notice .debpkg/usr/share/manticore/${{ env.EXTRA_NAME }}.notice | |
| cp -p extra.notice .rpmpkg/usr/share/manticore/${{ env.EXTRA_NAME }}.notice | |
| echo "" > .rpmpkg/usr/share/${{ env.EXTRA_NAME }}-LICENSE | |
| - uses: manticoresoftware/actions-build-deb-action@master | |
| name: Build DEB packages | |
| with: | |
| package: ${{ env.EXTRA_NAME }} | |
| package_root: .debpkg | |
| maintainer: ${{ env.MAINTAINER }} | |
| version: ${{ needs.pack.outputs.version_deb }} | |
| arch: 'all' | |
| desc: '${{ env.EXTRA_DESC }}' | |
| license: 'Apache-2.0' | |
| depends: '${{ env.APP_NAME }} (>= ${{ needs.pack.outputs.version_deb }}), ${{ env.COLUMNAR_NAME }} (>= ${{ env.COLUMNAR_VERSION }}), ${{ env.GALERA_NAME }} (>= ${{ env.GALERA_VERSION }}), ${{ env.LOAD_NAME }} (>= ${{ env.LOAD_VERSION }}), ca-certificates' | |
| - name: Build RPM packages | |
| run: | | |
| sudo apt-get update -y -q | |
| sudo apt-get install -y rpm | |
| RPMBUILD_DIR="$HOME/rpmbuild" | |
| RPMBUILD_SOURCE_DIR="$RPMBUILD_DIR/SOURCES" | |
| RPMBUILD_SPEC_DIR="$RPMBUILD_DIR/SPECS" | |
| WORKDIR="/tmp/work" | |
| mkdir "$WORKDIR" | |
| spec_file=extra.spec | |
| cp "packages/$spec_file" "$WORKDIR" | |
| cp -rp ".rpmpkg" "$WORKDIR/${{ env.EXTRA_NAME }}" | |
| cd "$WORKDIR" | |
| # Prepare spec file for RPM | |
| sed -i 's/{{ NAME }}/${{ env.EXTRA_NAME }}/g' $spec_file | |
| sed -i 's/{{ VERSION }}/${{ needs.pack.outputs.version_rpm }}/g' $spec_file | |
| sed -i 's/{{ MAINTAINER }}/${{ env.MAINTAINER }}/g' $spec_file | |
| sed -i 's/{{ DESC }}/${{ env.EXTRA_DESC }}/g' $spec_file | |
| sed -i 's/{{ EXECUTOR_NAME }}/${{ env.APP_NAME }}/g' $spec_file | |
| sed -i 's/{{ EXECUTOR_VERSION }}/${{ needs.pack.outputs.version_rpm }}/g' $spec_file | |
| sed -i 's/{{ COLUMNAR_NAME }}/${{ env.COLUMNAR_NAME }}/g' $spec_file | |
| sed -i 's/{{ COLUMNAR_VERSION }}/${{ env.COLUMNAR_VERSION }}/g' $spec_file | |
| sed -i 's/{{ GALERA_NAME }}/${{ env.GALERA_NAME }}/g' $spec_file | |
| sed -i 's/{{ GALERA_VERSION }}/${{ env.GALERA_VERSION }}/g' $spec_file | |
| sed -i 's/{{ LOAD_NAME }}/${{ env.LOAD_NAME }}/g' $spec_file | |
| sed -i 's/{{ LOAD_VERSION }}/${{ env.LOAD_VERSION }}/g' $spec_file | |
| tar czf tmp.tar.gz "${{ env.EXTRA_NAME }}/" | |
| mkdir -p "$RPMBUILD_SOURCE_DIR" | |
| mkdir -p "$RPMBUILD_SPEC_DIR" | |
| mv tmp.tar.gz "$RPMBUILD_SOURCE_DIR" | |
| cp -p $spec_file "$RPMBUILD_SPEC_DIR" | |
| rpmbuild -bb "$RPMBUILD_SPEC_DIR/$spec_file" | |
| ls -lah "$RPMBUILD_DIR/RPMS/noarch"/*.rpm | |
| cp -p "$RPMBUILD_DIR/RPMS/noarch"/*.rpm $GITHUB_WORKSPACE | |
| - name: Rename packages to proper name | |
| run: | | |
| version=${{ needs.pack.outputs.version_rpm }} | |
| rpm_path="./${{ env.EXTRA_NAME }}-${version}-1.noarch.rpm" | |
| cp $rpm_path "./${{ env.EXTRA_NAME }}-${version}-1.el8.noarch.rpm" | |
| cp $rpm_path "./${{ env.EXTRA_NAME }}-${version}-1.el9.noarch.rpm" | |
| mv $rpm_path "./${{ env.EXTRA_NAME }}-${version}-1.el10.noarch.rpm" | |
| mkdir -p ./artifacts | |
| mv *.deb ./artifacts/ | |
| mv *.rpm ./artifacts/ | |
| ls -lah ./artifacts/*.deb | |
| ls -lah ./artifacts/*.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-extra-deb | |
| path: ./artifacts/*.deb | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-extra-rpm-el8 | |
| path: ./artifacts/*.el8.noarch.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-extra-rpm-el9 | |
| path: ./artifacts/*.el9.noarch.rpm | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: artifact-extra-rpm-el10 | |
| path: ./artifacts/*.el10.noarch.rpm | |
| create-release: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| repository-projects: write | |
| needs: | |
| - build-artifact | |
| - build-artifact-dev | |
| - build-linux-packages | |
| - build-linux-packages-arm64 | |
| - build-extra-packages | |
| - pack | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate changelog | |
| run: | | |
| curl -sSL https://github.com/git-chglog/git-chglog/releases/download/v0.15.1/git-chglog_0.15.1_linux_amd64.tar.gz | tar -xzf - | |
| chmod +x git-chglog | |
| ./git-chglog --output ./CHANGELOG.md $(git describe --tags $(git rev-list --tags --max-count=1)) | |
| - name: Create Release | |
| id: create-release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ needs.pack.outputs.version }} | |
| release_name: ${{ needs.pack.outputs.version }} | |
| body_path: ./CHANGELOG.md | |
| draft: false | |
| prerelease: true | |
| - name: Write upload_url to file | |
| run: echo '${{ steps.create-release.outputs.upload_url }}' > upload_url.txt | |
| - uses: manticoresoftware/upload_artifact_with_retries@main | |
| with: | |
| name: create-release | |
| path: upload_url.txt | |
| upload-release: | |
| runs-on: ubuntu-22.04 | |
| needs: create-release | |
| strategy: | |
| matrix: | |
| include: | |
| - artifact_suffix: ubuntu-22.04-amd64 | |
| asset_name_suffix: linux-amd64.tar.gz | |
| asset_content_type: application/gzip | |
| - artifact_suffix: ubuntu-22.04-arm64 | |
| asset_name_suffix: linux-arm64.tar.gz | |
| asset_content_type: application/gzip | |
| - artifact_suffix: macos-15-intel-x86_64 | |
| asset_name_suffix: macos-x86_64.tar.gz | |
| asset_content_type: application/gzip | |
| - artifact_suffix: macos-15-arm64 | |
| asset_name_suffix: macos-arm64.tar.gz | |
| asset_content_type: application/gzip | |
| - artifact_suffix: dev-ubuntu-22.04-amd64 | |
| asset_name_suffix: linux-amd64-dev.tar.gz | |
| asset_content_type: application/gzip | |
| steps: | |
| - uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: artifact-${{ matrix.artifact_suffix }} | |
| path: . | |
| - uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: create-release | |
| path: . | |
| - id: vars | |
| run: | | |
| echo "upload_url=$(cat upload_url.txt)" >> $GITHUB_OUTPUT | |
| echo "asset_path=$(ls *${{ matrix.asset_name_suffix }} | head -n 1)" >> $GITHUB_OUTPUT | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.vars.outputs.upload_url }} | |
| asset_path: ${{ steps.vars.outputs.asset_path }} | |
| asset_name: ${{ steps.vars.outputs.asset_path }} | |
| asset_content_type: ${{ matrix.asset_content_type }} | |
| upload-linux-packages: | |
| runs-on: ubuntu-22.04 | |
| needs: create-release | |
| strategy: | |
| matrix: | |
| include: | |
| - pkg: deb | |
| suffix: "amd64" | |
| asset_content_type: application/vnd.debian.binary-package | |
| - pkg: deb | |
| suffix: "arm64" | |
| asset_content_type: application/vnd.debian.binary-package | |
| - pkg: rpm | |
| suffix: "el8-amd64" | |
| asset_content_type: application/x-rpm | |
| - pkg: rpm | |
| suffix: "el9-amd64" | |
| asset_content_type: application/x-rpm | |
| - pkg: rpm | |
| suffix: "el10-amd64" | |
| asset_content_type: application/x-rpm | |
| - pkg: rpm | |
| suffix: "el8-aarch64" | |
| asset_content_type: application/x-rpm | |
| - pkg: rpm | |
| suffix: "el9-aarch64" | |
| asset_content_type: application/x-rpm | |
| - pkg: rpm | |
| suffix: "el10-aarch64" | |
| asset_content_type: application/x-rpm | |
| steps: | |
| - uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: artifact-${{ matrix.pkg }}-${{ matrix.suffix }} | |
| path: . | |
| - uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: create-release | |
| path: . | |
| - id: vars | |
| run: | | |
| asset_path=$(ls ./artifacts/*.${{ matrix.pkg }} | head -n 1) | |
| echo "upload_url=$(cat upload_url.txt)" >> $GITHUB_OUTPUT | |
| echo "asset_path=$asset_path" >> $GITHUB_OUTPUT | |
| echo "asset_name=$(basename $asset_path)" >> $GITHUB_OUTPUT | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.vars.outputs.upload_url }} | |
| asset_path: ${{ steps.vars.outputs.asset_path }} | |
| asset_name: ${{ steps.vars.outputs.asset_name }} | |
| asset_content_type: ${{ matrix.asset_content_type }} | |
| upload-extra-packages: | |
| runs-on: ubuntu-22.04 | |
| needs: create-release | |
| strategy: | |
| matrix: | |
| include: | |
| - pkg: deb | |
| suffix: "" | |
| asset_content_type: application/vnd.debian.binary-package | |
| - pkg: rpm | |
| suffix: "-el8" | |
| asset_content_type: application/x-rpm | |
| - pkg: rpm | |
| suffix: "-el9" | |
| asset_content_type: application/x-rpm | |
| - pkg: rpm | |
| suffix: "-el10" | |
| asset_content_type: application/x-rpm | |
| steps: | |
| # We download amd64 only but just because of noarch | |
| - uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: artifact-extra-${{ matrix.pkg }}${{ matrix.suffix }} | |
| path: . | |
| - uses: manticoresoftware/download_artifact_with_retries@main | |
| with: | |
| name: create-release | |
| path: . | |
| - name: Prepare package names | |
| run: | | |
| file=$(ls ./artifacts/*.${{ matrix.pkg }} | head -n 1) | |
| mv "$file" artifact | |
| rm -f *.${{ matrix.pkg }} | |
| file=${file/amd64/all} | |
| file=${file/x86_64/noarch} | |
| mv artifact "$file" | |
| shell: bash | |
| - id: vars | |
| run: | | |
| asset_path=$(ls ./artifacts/*.${{ matrix.pkg }} | head -n 1) | |
| echo "upload_url=$(cat upload_url.txt)" >> $GITHUB_OUTPUT | |
| echo "asset_path=$asset_path" >> $GITHUB_OUTPUT | |
| echo "asset_name=$(basename $asset_path)" >> $GITHUB_OUTPUT | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.vars.outputs.upload_url }} | |
| asset_path: ${{ steps.vars.outputs.asset_path }} | |
| asset_name: ${{ steps.vars.outputs.asset_name }} | |
| asset_content_type: ${{ matrix.asset_content_type }} | |
| deploy: | |
| needs: | |
| - pack | |
| - upload-release | |
| - upload-linux-packages | |
| - upload-extra-packages | |
| runs-on: ubuntu-22.04 | |
| env: | |
| target: ${{ needs.pack.outputs.target }} | |
| strategy: | |
| matrix: | |
| include: | |
| - artifact: artifact-deb-amd64 | |
| type: deb | |
| arch: amd64 | |
| delimiter: "-" | |
| distro: buster | |
| - artifact: artifact-deb-arm64 | |
| type: deb | |
| arch: arm64 | |
| delimiter: "-" | |
| distro: buster | |
| - artifact: artifact-deb-amd64 | |
| type: deb | |
| arch: amd64 | |
| delimiter: "-" | |
| distro: bionic | |
| - artifact: artifact-deb-arm64 | |
| type: deb | |
| arch: arm64 | |
| delimiter: "-" | |
| distro: bionic | |
| - artifact: artifact-deb-amd64 | |
| type: deb | |
| arch: amd64 | |
| delimiter: "-" | |
| distro: focal | |
| - artifact: artifact-deb-arm64 | |
| type: deb | |
| arch: arm64 | |
| delimiter: "-" | |
| distro: focal | |
| - artifact: artifact-deb-amd64 | |
| type: deb | |
| arch: amd64 | |
| delimiter: "-" | |
| distro: jammy | |
| - artifact: artifact-deb-arm64 | |
| type: deb | |
| arch: arm64 | |
| delimiter: "-" | |
| distro: jammy | |
| - artifact: artifact-deb-amd64 | |
| type: deb | |
| arch: amd64 | |
| delimiter: "-" | |
| distro: bullseye | |
| - artifact: artifact-deb-arm64 | |
| type: deb | |
| arch: arm64 | |
| delimiter: "-" | |
| distro: bullseye | |
| - artifact: artifact-deb-amd64 | |
| type: deb | |
| arch: amd64 | |
| delimiter: "-" | |
| distro: bookworm | |
| - artifact: artifact-deb-arm64 | |
| type: deb | |
| arch: arm64 | |
| delimiter: "-" | |
| distro: bookworm | |
| - artifact: artifact-rpm-el8-amd64 | |
| type: rpm | |
| arch: x86_64 | |
| delimiter: "_" | |
| distro: 8 | |
| - artifact: artifact-rpm-el8-aarch64 | |
| type: rpm | |
| arch: aarch | |
| delimiter: "_" | |
| distro: 8 | |
| - artifact: artifact-rpm-el9-amd64 | |
| type: rpm | |
| arch: x86_64 | |
| delimiter: "_" | |
| distro: 9 | |
| - artifact: artifact-rpm-el9-aarch64 | |
| type: rpm | |
| arch: aarch | |
| delimiter: "_" | |
| distro: 9 | |
| - artifact: artifact-rpm-el10-amd64 | |
| type: rpm | |
| arch: x86_64 | |
| delimiter: "_" | |
| distro: 10 | |
| - artifact: artifact-rpm-el10-aarch64 | |
| type: rpm | |
| arch: aarch | |
| delimiter: "_" | |
| distro: 10 | |
| - artifact: artifact-macos-15-intel-x86_64 | |
| type: arc | |
| arch: x86_64 | |
| delimiter: "-" | |
| distro: "" | |
| - artifact: artifact-macos-15-arm64 | |
| type: arc | |
| arch: aarch | |
| delimiter: "-" | |
| distro: "" | |
| # manticore-extra meta package now | |
| - artifact: artifact-extra-deb | |
| type: deb | |
| arch: all | |
| delimiter: "-" | |
| distro: buster | |
| - artifact: artifact-extra-deb | |
| type: deb | |
| arch: all | |
| delimiter: "-" | |
| distro: bionic | |
| - artifact: artifact-extra-deb | |
| type: deb | |
| arch: all | |
| delimiter: "-" | |
| distro: focal | |
| - artifact: artifact-extra-deb | |
| type: deb | |
| arch: all | |
| delimiter: "-" | |
| distro: jammy | |
| - artifact: artifact-extra-deb | |
| type: deb | |
| arch: all | |
| delimiter: "-" | |
| distro: bullseye | |
| - artifact: artifact-extra-deb | |
| type: deb | |
| arch: all | |
| delimiter: "-" | |
| distro: bookworm | |
| - artifact: artifact-extra-rpm-el8 | |
| type: rpm | |
| arch: noarch | |
| delimiter: "_" | |
| distro: 8 | |
| - artifact: artifact-extra-rpm-el9 | |
| type: rpm | |
| arch: noarch | |
| delimiter: "_" | |
| distro: 9 | |
| - artifact: artifact-extra-rpm-el10 | |
| type: rpm | |
| arch: noarch | |
| delimiter: "_" | |
| distro: 10 | |
| steps: | |
| - name: Deploy package | |
| uses: manticoresoftware/publish_to_repo@main | |
| with: | |
| ssh_key: ${{ secrets.REPO_SSH_KEY }} | |
| distr: ${{ matrix.distro }} | |
| arch: ${{ matrix.arch }} | |
| artifact: ${{ matrix.artifact }} | |
| type: ${{ matrix.type }} | |
| delimiter: ${{ matrix.delimiter }} | |
| target: ${{ env.target }} | |
| deploy-docker: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - pack | |
| - deploy | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Deploy docker amd64 | |
| arch: amd64 | |
| os: ubuntu-22.04 | |
| - name: Deploy docker arm64 | |
| arch: arm64 | |
| os: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USER }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build docker image | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| file: ./Dockerfile-dist | |
| platforms: linux/amd64, linux/arm64 | |
| load: false | |
| push: true | |
| tags: ${{ env.DOCKER_TAG }}:${{ needs.pack.outputs.version }} | |
| update-manticoresearch-deps: | |
| needs: | |
| - pack | |
| - deploy | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Update deps | |
| uses: manticoresoftware/manticoresearch/actions/update-deps@master | |
| with: | |
| name: executor | |
| version: "${{ needs.pack.outputs.version_full }}" | |
| token: ${{ secrets.PR_TOKEN }} |