Build aarch64 packages with GitHub actions
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
This commit is contained in:
124
.github/workflows/nightly-release.yml
vendored
124
.github/workflows/nightly-release.yml
vendored
@@ -7,64 +7,70 @@ on:
|
||||
- cron: '05 00 * * *'
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
name: Generate spec, dist and collect commits info
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should-continue: ${{ steps.generate.outputs.should-continue }}
|
||||
version: ${{ steps.generate.outputs.version }}
|
||||
release-id: ${{ steps.generate.outputs.release-id }}
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/generate
|
||||
name: generate warewulf spec, dist and collect commits info
|
||||
id: generate
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
event-id: ${{ github.event.release.id }}
|
||||
generate:
|
||||
name: Generate spec, dist and collect commits info
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
should-continue: ${{ steps.generate.outputs.should-continue }}
|
||||
version: ${{ steps.generate.outputs.version }}
|
||||
release-id: ${{ steps.generate.outputs.release-id }}
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: generate warewulf spec, dist and collect commits info
|
||||
uses: ./.github/actions/generate
|
||||
id: generate
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
event-id: ${{ github.event.release.id }}
|
||||
|
||||
publish:
|
||||
name: Build and publish releases
|
||||
runs-on: ubuntu-latest
|
||||
needs: generate
|
||||
if: needs.generate.outputs.should-continue == 'true'
|
||||
container:
|
||||
image: rockylinux/rockylinux:9
|
||||
options: --privileged
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: rocky+epel-8-x86_64
|
||||
arch: x86_64
|
||||
dist: el8
|
||||
- target: rocky+epel-9-x86_64
|
||||
arch: x86_64
|
||||
dist: el9
|
||||
- target: opensuse-leap-15.5-x86_64
|
||||
arch: x86_64
|
||||
dist: suse.lp155
|
||||
permissions: write-all
|
||||
publish:
|
||||
name: Build and publish releases
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
needs: generate
|
||||
if: needs.generate.outputs.should-continue == 'true'
|
||||
container:
|
||||
image: rockylinux/rockylinux:9
|
||||
options: --privileged
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
dist: [el9, el8, suse.lp155]
|
||||
include:
|
||||
- dist: el8
|
||||
target: rocky+epel-8 #-arch
|
||||
- dist: el9
|
||||
target: rocky+epel-9
|
||||
- dist: suse.lp155
|
||||
target: opensuse-leap-15.5
|
||||
- arch: x86_64
|
||||
runs-on: ubuntu-24.04
|
||||
upload-source: 'true'
|
||||
- arch: aarch64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- name: Install git
|
||||
run: |
|
||||
dnf install -y git
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/rpm
|
||||
name: build rpms
|
||||
id: rpm
|
||||
with:
|
||||
dist: ${{ matrix.dist }}
|
||||
arch: ${{ matrix.arch }}
|
||||
target: ${{ matrix.target }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ needs.generate.outputs.version }}
|
||||
event-id: ${{ needs.generate.outputs.release-id }}
|
||||
permissions: write-all
|
||||
|
||||
steps:
|
||||
- name: Install git
|
||||
run: |
|
||||
dnf install -y git
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: build rpms
|
||||
uses: ./.github/actions/rpm
|
||||
id: rpm
|
||||
with:
|
||||
dist: ${{ matrix.dist }}
|
||||
arch: ${{ matrix.arch }}
|
||||
target: ${{ matrix.target }}-${{ matrix.arch }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ needs.generate.outputs.version }}
|
||||
event-id: ${{ needs.generate.outputs.release-id }}
|
||||
upload-source: ${{ matrix.upload-source }}
|
||||
|
||||
30
.github/workflows/tagged-release.yml
vendored
30
.github/workflows/tagged-release.yml
vendored
@@ -41,24 +41,26 @@ jobs:
|
||||
rpm:
|
||||
name: Build RPMs
|
||||
needs: dist
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
container:
|
||||
image: rockylinux/rockylinux:9
|
||||
options: --privileged
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
dist: [el9, el8, suse.lp155]
|
||||
include:
|
||||
- target: rocky+epel-8-x86_64
|
||||
arch: x86_64
|
||||
dist: el8
|
||||
- target: rocky+epel-9-x86_64
|
||||
arch: x86_64
|
||||
dist: el9
|
||||
- target: opensuse-leap-15.5-x86_64
|
||||
arch: x86_64
|
||||
dist: suse.lp155
|
||||
|
||||
- dist: el8
|
||||
target: rocky+epel-8 #-arch
|
||||
- dist: el9
|
||||
target: rocky+epel-9
|
||||
- dist: suse.lp155
|
||||
target: opensuse-leap-15.5
|
||||
- arch: x86_64
|
||||
runs-on: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- name: Prepare mock and rpm-build
|
||||
run: |
|
||||
@@ -73,13 +75,13 @@ jobs:
|
||||
|
||||
- name: Build RPMs and run tests
|
||||
run: |
|
||||
mock -r ${{ matrix.target }} --rebuild --spec=warewulf.spec --sources=. \
|
||||
&& mock -r ${{ matrix.target }} --chroot -- bash -c "make -C /builddir/build/BUILD/warewulf-*/ test"
|
||||
mock -r ${{ matrix.target }}-${{ matrix.arch }} --rebuild --spec=warewulf.spec --sources=. \
|
||||
&& mock -r ${{ matrix.target }}-${{ matrix.arch }} --chroot -- bash -c "make -C /builddir/build/BUILD/warewulf-*/ test"
|
||||
|
||||
- name: Attach RPM and SRPM to release
|
||||
uses: xresloader/upload-to-github-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
file: "/var/lib/mock/${{ matrix.target }}/result/warewulf-*.rpm"
|
||||
file: "/var/lib/mock/${{ matrix.target }}-${{ matrix.arch }}/result/warewulf-*.rpm"
|
||||
tags: true
|
||||
|
||||
Reference in New Issue
Block a user