|
17 | 17 | description: "Docker images for smoke testing (comma-separated, e.g., ubuntu:20.04,ubuntu:22.04,ubuntu:24.04)"
|
18 | 18 | required: false
|
19 | 19 | default: "ubuntu:20.04,ubuntu:22.04,ubuntu:24.04"
|
| 20 | + build_runner: |
| 21 | + description: "os in which build steps run on" |
| 22 | + required: false |
| 23 | + default: "ubuntu-22.04" |
| 24 | + type: string |
20 | 25 | jobs:
|
21 | 26 | build-source-package:
|
22 |
| - runs-on: ubuntu-latest |
| 27 | + runs-on: ${{ inputs.build_runner }} |
| 28 | + continue-on-error: true |
23 | 29 | strategy:
|
24 | 30 | matrix:
|
25 | 31 | dist: ${{ fromJSON(vars.BUILD_DISTS) }}
|
26 | 32 | steps:
|
27 | 33 | - uses: actions/checkout@v4
|
28 | 34 | with:
|
29 | 35 | path: sources
|
| 36 | + - name: Validate configure.ac version matches GitHub Release (only on release) |
| 37 | + if: github.event.release.tag_name != '' |
| 38 | + env: |
| 39 | + VERSION: ${{ github.event.release.tag_name }} |
| 40 | + run: | |
| 41 | + # Extract the current version from configure.ac |
| 42 | + CURRENT_VERSION=$(awk -F'[(),]' '/AC_INIT/ {print $3}' sources/configure.ac | tr -d ' ') |
| 43 | +
|
| 44 | + echo "Current configure.ac version: $CURRENT_VERSION" |
| 45 | + echo "GitHub Release version: $VERSION" |
| 46 | +
|
| 47 | + # Check if versions match |
| 48 | + if [ "$CURRENT_VERSION" != "$VERSION" ]; then |
| 49 | + echo "❌ Version mismatch! configure.ac: $CURRENT_VERSION, GitHub Release: $VERSION" |
| 50 | + exit 1 # Fail the build |
| 51 | + else |
| 52 | + echo "Version match. Proceeding with the build." |
| 53 | + fi |
30 | 54 | - name: Install dependencies
|
31 | 55 | run: |
|
32 | 56 | sudo apt-get update && \
|
|
63 | 87 | memtier-benchmark_*.tar.*
|
64 | 88 |
|
65 | 89 | build-binary-package:
|
66 |
| - runs-on: ubuntu-latest |
| 90 | + runs-on: ${{ inputs.build_runner }} |
| 91 | + continue-on-error: true |
67 | 92 | environment: build
|
68 | 93 | strategy:
|
69 | 94 | matrix:
|
@@ -121,7 +146,7 @@ jobs:
|
121 | 146 | *.deb
|
122 | 147 |
|
123 | 148 | smoke-test-packages:
|
124 |
| - runs-on: ubuntu-latest |
| 149 | + runs-on: ${{ inputs.build_runner }} |
125 | 150 | needs: build-binary-package
|
126 | 151 | env:
|
127 | 152 | ARCH: amd64
|
|
0 commit comments