Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test build source package, build binary package and smoke test on CI. #299

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,40 @@ on:
description: "Docker images for smoke testing (comma-separated, e.g., ubuntu:20.04,ubuntu:22.04,ubuntu:24.04)"
required: false
default: "ubuntu:20.04,ubuntu:22.04,ubuntu:24.04"
build_runner:
description: "os in which build steps run on"
required: false
default: "ubuntu-22.04"
type: string
jobs:
build-source-package:
runs-on: ubuntu-latest
runs-on: ${{ inputs.build_runner }}
continue-on-error: true
strategy:
matrix:
dist: ${{ fromJSON(vars.BUILD_DISTS) }}
steps:
- uses: actions/checkout@v4
with:
path: sources
- name: Validate configure.ac version matches GitHub Release (only on release)
if: github.event.release.tag_name != ''
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
# Extract the current version from configure.ac
CURRENT_VERSION=$(awk -F'[(),]' '/AC_INIT/ {print $3}' sources/configure.ac | tr -d ' ')

echo "Current configure.ac version: $CURRENT_VERSION"
echo "GitHub Release version: $VERSION"

# Check if versions match
if [ "$CURRENT_VERSION" != "$VERSION" ]; then
echo "❌ Version mismatch! configure.ac: $CURRENT_VERSION, GitHub Release: $VERSION"
exit 1 # Fail the build
else
echo "Version match. Proceeding with the build."
fi
- name: Install dependencies
run: |
sudo apt-get update && \
Expand Down Expand Up @@ -63,7 +87,8 @@ jobs:
memtier-benchmark_*.tar.*

build-binary-package:
runs-on: ubuntu-latest
runs-on: ${{ inputs.build_runner }}
continue-on-error: true
environment: build
strategy:
matrix:
Expand Down Expand Up @@ -121,7 +146,7 @@ jobs:
*.deb

smoke-test-packages:
runs-on: ubuntu-latest
runs-on: ${{ inputs.build_runner }}
needs: build-binary-package
env:
ARCH: amd64
Expand Down
Loading