Skip to content

Commit

Permalink
initial rpm automation for GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
CamJN committed Sep 7, 2024
1 parent d2eacfc commit 76daa08
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Passenger RPM packaging tests

env:
ENTERPRISE: 0

on:
push:
branches:
- 'stable-*'
- 'feature/*'
pull_request:
branches:
- 'stable-*'
- 'feature/*'

jobs:
define-matrix:
runs-on: ubuntu-latest
outputs:
distros: ${{ steps.distros.outputs.distros }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Define Distros
id: distros
run: echo "distros=[$(awk -F= '/DEFAULT_DISTROS/{print $2}' packaging/rpm/internal/lib/distro_info.sh | sed -e 's/ /", "/g')]" >> "$GITHUB_OUTPUT"

test:
name: "Test ${{ matrix.distro }} ${{ matrix.arch }} packages"
needs: define-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: ${{ fromJSON(needs.define-matrix.outputs.distros) }}
arch:
- x86_64
#- aarch64
env:
WORKSPACE: ${{ github.workspace }}
ARCHITECTURE: ${{ matrix.arch }}
CACHE_DIR: ${{ github.workspace }}/cache/rpm-test/${{ matrix.distro }}-${{ matrix.arch }}
DISTRIBUTION: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- run: ./dev/ci/tests/rpm/run
- uses: actions/upload-artifact@v4
with:
name: rpm-${{ matrix.distro }}-${{ matrix.arch }}
path: 'output/${{ matrix.distro }}/*'
1 change: 1 addition & 0 deletions dev/ci/tests/rpm/run
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ run ./test \
-d "$WORKSPACE/output/$DISTRIBUTION" \
-c "$CACHE_DIR" \
-x "$TEST_DISTRO_NAME" \
-a "$ARCHITECTURE" \
-j \
$EXTRA_TEST_PARAMS
2 changes: 1 addition & 1 deletion packaging/rpm
Submodule rpm updated 2 files
+0 −1 internal/test/test.sh
+28 −10 test

0 comments on commit 76daa08

Please sign in to comment.