You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by hg...@apache.org on 2025/12/05 14:17:33 UTC

(iggy) branch prerelease-binaries updated (08e11a9e7 -> 082fab547)

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

hgruszecki pushed a change to branch prerelease-binaries
in repository https://gitbox.apache.org/repos/asf/iggy.git


 discard 08e11a9e7 feat(ci): add Linux edge binary builds with rolling GitHub pre-release
     new 082fab547 feat(ci): add Linux edge binary builds with rolling GitHub pre-release

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (08e11a9e7)
            \
             N -- N -- N   refs/heads/prerelease-binaries (082fab547)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/post-merge.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


(iggy) 01/01: feat(ci): add Linux edge binary builds with rolling GitHub pre-release

Posted by hg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hgruszecki pushed a commit to branch prerelease-binaries
in repository https://gitbox.apache.org/repos/asf/iggy.git

commit 082fab5472df5a93f13e80b7d9b60b1c6e0ccc9b
Author: Hubert Gruszecki <h....@gmail.com>
AuthorDate: Fri Dec 5 15:07:07 2025 +0100

    feat(ci): add Linux edge binary builds with rolling GitHub pre-release
    
    Add reusable _build_rust_binaries.yml workflow for x86_64 GNU/musl.
    Post-merge now builds iggy-server, iggy, iggy-bench tarballs.
    Creates/updates 'edge' pre-release tag on every master push.
---
 .github/workflows/_build_rust_binaries.yml | 212 +++++++++++++++++++++++++++++
 .github/workflows/dependabot-licenses.yml  |  65 ---------
 .github/workflows/post-merge.yml           |  70 +++++++++-
 3 files changed, 280 insertions(+), 67 deletions(-)

diff --git a/.github/workflows/_build_rust_binaries.yml b/.github/workflows/_build_rust_binaries.yml
new file mode 100644
index 000000000..913ac3ea7
--- /dev/null
+++ b/.github/workflows/_build_rust_binaries.yml
@@ -0,0 +1,212 @@
+# 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.
+
+# .github/workflows/_build_rust_binaries.yml
+name: _build_rust_binaries
+on:
+  workflow_call:
+    inputs:
+      version:
+        type: string
+        required: false
+        default: "edge"
+        description: "Version string for artifact naming (e.g., 'edge', '0.6.253')"
+      upload_artifacts:
+        type: boolean
+        required: false
+        default: true
+      use_latest_ci:
+        type: boolean
+        required: false
+        default: false
+        description: "Use latest CI configuration and scripts from master branch"
+      commit:
+        type: string
+        required: false
+        default: ""
+        description: "Specific commit to checkout for building binaries"
+      binaries:
+        type: string
+        required: false
+        default: "iggy-server,iggy,iggy-bench"
+        description: "Comma-separated list of binaries to build"
+    outputs:
+      artifact_name:
+        description: "Name of the uploaded artifact containing all binaries"
+        value: ${{ jobs.collect.outputs.artifact_name }}
+
+env:
+  IGGY_CI_BUILD: true
+
+jobs:
+  linux:
+    name: Linux ${{ matrix.target }}
+    runs-on: ${{ matrix.runner }}
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - target: x86_64-unknown-linux-gnu
+            runner: ubuntu-latest
+            libc: gnu
+          - target: x86_64-unknown-linux-musl
+            runner: ubuntu-latest
+            libc: musl
+    steps:
+      - name: Download latest copy script from master
+        if: inputs.use_latest_ci
+        run: |
+          curl -sSL "https://raw.githubusercontent.com/${{ github.repository }}/master/scripts/copy-latest-from-master.sh" \
+            -o /tmp/copy-latest-from-master.sh
+          chmod +x /tmp/copy-latest-from-master.sh
+
+      - uses: actions/checkout@v4
+        with:
+          ref: ${{ inputs.commit || github.sha }}
+
+      - name: Save and apply latest CI from master
+        if: inputs.use_latest_ci
+        run: |
+          /tmp/copy-latest-from-master.sh save .github scripts
+          /tmp/copy-latest-from-master.sh apply
+
+      - name: Install musl-tools
+        if: matrix.libc == 'musl'
+        run: sudo apt-get update && sudo apt-get install -y musl-tools
+
+      - name: Setup Rust with cache
+        uses: ./.github/actions/utils/setup-rust-with-cache
+        with:
+          cache-targets: false
+
+      - name: Add Rust target
+        run: rustup target add ${{ matrix.target }}
+
+      - name: Build binaries
+        shell: bash
+        run: |
+          set -euo pipefail
+
+          binaries="${{ inputs.binaries }}"
+          bin_flags=()
+
+          IFS=',' read -ra bins <<< "$binaries"
+          for bin in "${bins[@]}"; do
+            name="$(echo "$bin" | xargs)"
+            [[ -z "$name" ]] && continue
+            bin_flags+=(--bin "$name")
+          done
+
+          cargo build --release --target ${{ matrix.target }} "${bin_flags[@]}"
+
+      - name: Package binaries
+        id: pkg
+        shell: bash
+        run: |
+          set -euo pipefail
+
+          target="${{ matrix.target }}"
+          version="${{ inputs.version }}"
+          outdir="dist/${target}"
+          mkdir -p "${outdir}"
+
+          binaries="${{ inputs.binaries }}"
+          IFS=',' read -ra bins <<< "$binaries"
+          for bin in "${bins[@]}"; do
+            bin_name="$(echo "$bin" | xargs)"
+            [[ -z "$bin_name" ]] && continue
+            cp "target/${target}/release/${bin_name}" "${outdir}/"
+          done
+
+          tarball="iggy-${target}-${version}.tar.gz"
+          tar czf "${tarball}" -C "${outdir}" .
+
+          echo "tarball=${tarball}" >> "$GITHUB_OUTPUT"
+          echo "Built: ${tarball}"
+          ls -lh "${tarball}"
+
+      - name: Upload artifact
+        if: inputs.upload_artifacts
+        uses: actions/upload-artifact@v4
+        with:
+          name: rust-binaries-${{ matrix.target }}
+          path: ${{ steps.pkg.outputs.tarball }}
+          retention-days: 7
+          if-no-files-found: error
+
+  collect:
+    name: Collect all binaries
+    needs: [linux]
+    if: inputs.upload_artifacts
+    runs-on: ubuntu-latest
+    outputs:
+      artifact_name: ${{ steps.output.outputs.artifact_name }}
+    steps:
+      - uses: actions/checkout@v4
+        with:
+          ref: ${{ inputs.commit || github.sha }}
+
+      - name: Get server version
+        id: meta
+        run: |
+          chmod +x scripts/extract-version.sh
+          server_version=$(scripts/extract-version.sh rust-server)
+          echo "server_version=${server_version}" >> "$GITHUB_OUTPUT"
+
+      - name: Download all binaries
+        uses: actions/download-artifact@v4
+        with:
+          pattern: rust-binaries-*
+          merge-multiple: true
+          path: dist
+
+      - name: List binaries
+        run: |
+          echo "## 📦 Built Rust Binaries" >> $GITHUB_STEP_SUMMARY
+          echo "" >> $GITHUB_STEP_SUMMARY
+          echo "| Target | Libc | File | Size |" >> $GITHUB_STEP_SUMMARY
+          echo "|--------|------|------|------|" >> $GITHUB_STEP_SUMMARY
+
+          for tarball in dist/*.tar.gz; do
+            filename=$(basename "$tarball")
+            size=$(ls -lh "$tarball" | awk '{print $5}')
+
+            if [[ "$filename" == *"gnu"* ]]; then libc="glibc"
+            elif [[ "$filename" == *"musl"* ]]; then libc="musl (static)"
+            else libc="unknown"; fi
+
+            if [[ "$filename" == *"x86_64"* ]]; then target="x86_64"
+            elif [[ "$filename" == *"aarch64"* ]]; then target="aarch64"
+            else target="unknown"; fi
+
+            echo "| $target | $libc | \`$filename\` | $size |" >> $GITHUB_STEP_SUMMARY
+          done
+
+          echo "" >> $GITHUB_STEP_SUMMARY
+          echo "**Server version:** ${{ steps.meta.outputs.server_version }}" >> $GITHUB_STEP_SUMMARY
+          echo "" >> $GITHUB_STEP_SUMMARY
+          echo "**Binaries included:** ${{ inputs.binaries }}" >> $GITHUB_STEP_SUMMARY
+
+      - name: Upload combined artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: rust-binaries-all
+          path: dist
+          retention-days: 30
+
+      - id: output
+        run: echo "artifact_name=rust-binaries-all" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/dependabot-licenses.yml b/.github/workflows/dependabot-licenses.yml
deleted file mode 100644
index 8b433feb4..000000000
--- a/.github/workflows/dependabot-licenses.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# 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: Update licenses for Dependabot PRs
-
-on:
-  pull_request_target:
-    paths:
-      - "Cargo.toml"
-      - "Cargo.lock"
-      - "**/Cargo.toml"
-
-permissions:
-  contents: write
-  pull-requests: write
-
-jobs:
-  update-licenses:
-    name: Update DEPENDENCIES.md
-    runs-on: ubuntu-latest
-    if: github.actor == 'dependabot[bot]'
-    steps:
-      - name: Checkout PR branch
-        uses: actions/checkout@v4
-        with:
-          ref: ${{ github.event.pull_request.head.ref }}
-          token: ${{ secrets.GITHUB_TOKEN }}
-
-      - name: Setup Rust with cache
-        uses: ./.github/actions/utils/setup-rust-with-cache
-        with:
-          cache-targets: false # Only cache registry and git deps, not target dir (sccache handles that)
-          show-stats: true
-
-      - name: Install cargo-license
-        run: cargo install cargo-license
-
-      - name: Update DEPENDENCIES.md
-        run: ./scripts/ci/licenses-list.sh --update
-
-      - name: Commit changes
-        run: |
-          git config user.name "github-actions[bot]"
-          git config user.email "github-actions[bot]@users.noreply.github.com"
-          git add DEPENDENCIES.md
-          if git diff --staged --quiet; then
-            echo "No changes to commit"
-          else
-            git commit -m "chore(deps): update DEPENDENCIES.md"
-            git push
-          fi
diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml
index 9b383edf6..496b3dfb0 100644
--- a/.github/workflows/post-merge.yml
+++ b/.github/workflows/post-merge.yml
@@ -83,7 +83,7 @@ jobs:
       matrix: ${{ fromJson(needs.plan.outputs.matrix) }}
     env:
       DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
-      DOCKERHUB_TOKEN:    ${{ secrets.DOCKERHUB_TOKEN }}
+      DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
     steps:
       - uses: actions/checkout@v4
 
@@ -93,4 +93,70 @@ jobs:
           libc: musl
           component: ${{ matrix.component }}
           version: edge
-          dry_run: ${{ github.event.repository.fork }}  # forks: always dry-run
+          dry_run: ${{ github.event.repository.fork }} # forks: always dry-run
+
+  build-rust-binaries:
+    name: Build Rust binaries
+    uses: ./.github/workflows/_build_rust_binaries.yml
+    with:
+      version: edge
+      upload_artifacts: true
+
+  create-prerelease:
+    name: Create edge pre-release
+    runs-on: ubuntu-latest
+    needs: build-rust-binaries
+    if: needs.build-rust-binaries.result == 'success'
+    permissions:
+      contents: write
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Get server version
+        id: meta
+        run: |
+          chmod +x scripts/extract-version.sh
+          server_version=$(scripts/extract-version.sh rust-server)
+          echo "server_version=${server_version}" >> "$GITHUB_OUTPUT"
+
+      - name: Download edge artifacts
+        uses: actions/download-artifact@v4
+        with:
+          name: rust-binaries-all
+          path: ./artifacts
+
+      - name: Delete existing edge release
+        env:
+          GH_TOKEN: ${{ github.token }}
+        run: |
+          # Delete the release (this also deletes assets) but keep the tag
+          gh release delete edge --yes 2>/dev/null || true
+
+      - name: Create edge pre-release
+        uses: softprops/action-gh-release@v2
+        with:
+          tag_name: edge
+          name: Edge (latest)
+          draft: false
+          prerelease: true
+          make_latest: false
+          files: artifacts/**/*.tar.gz
+          body: |
+            Rolling edge build of Apache Iggy binaries.
+
+            **This release is automatically updated on every push to master.**
+
+            ## Binaries included
+            - `iggy-server` - The streaming server
+            - `iggy` - Command-line interface
+            - `iggy-bench` - Benchmarking tool
+
+            ## Downloads
+            - `iggy-x86_64-unknown-linux-gnu-edge.tar.gz` - Linux (glibc)
+            - `iggy-x86_64-unknown-linux-musl-edge.tar.gz` - Linux (musl, static)
+
+            ## Build info
+            - Server version: ${{ steps.meta.outputs.server_version }}
+            - Commit: ${{ github.sha }}
+
+            ⚠️ **Not an official ASF release** - for development/testing only.