Add GitHub Actions based CI for Rocky 8 Build, Drop CircleCI, Drop Centos7 CI #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build on Rocky Linux 8 | |
on: | |
push: | |
branches: [master, development] | |
pull_request: | |
branches: [master, development] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: rockylinux/rockylinux:8 | |
options: --privileged | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Build Dependencies | |
run: | | |
set -o xtrace | |
dnf -y install dnf-plugins-core | |
dnf -y config-manager --set-enabled powertools | |
dnf -y install \ | |
https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | |
rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* | |
dnf -y --exclude=systemtap --exclude=subversion install @development \ | |
device-mapper-devel libacl-devel libattr-devel libuuid-devel \ | |
openssl-devel perl-CGI perl-Compress-Raw-Bzip2 perl-Compress-Raw-Zlib \ | |
perl-DBD-MySQL perl-DBI perl-Digest perl-Digest-MD5 perl-IO-Compress \ | |
perl-Sys-Syslog perl-Test-Simple xz-devel ipmitool parted autofs \ | |
e2fsprogs libarchive perl-Test-Harness perl-JSON-PP bsdtar which \ | |
mdadm xfsprogs libtirpc-devel mbedtls-devel | |
- name: Build Common | |
run: | | |
set -o xtrace | |
set -o nounset | |
cd common | |
./autogen.sh | |
make test | |
make dist-gzip | |
rpmbuild -D "_sourcedir $PWD" -D "_rel 0.${GITHUB_SHA::7}" -ba ./warewulf-common.spec | |
- name: Install warewulf-common | |
run: | | |
set -o xtrace | |
set -o nounset | |
cd common | |
DIST=$(rpm --eval '%{dist}') | |
VERSION=$(rpm -q --qf "%{VERSION}\n" -D "_rel 0.${GITHUB_SHA::7}" \ | |
--specfile warewulf-common.spec | head -n 1) | |
yum -y install ~/rpmbuild/RPMS/noarch/\ | |
warewulf-common-${VERSION}-0.${GITHUB_SHA::7}${DIST}.noarch.rpm | |
- name: Build Cluster | |
run: | | |
set -o xtrace | |
set -o nounset | |
cd cluster | |
./autogen.sh | |
make dist-gzip | |
rpmbuild -D "_sourcedir $PWD" -D "_rel 0.${GITHUB_SHA::7}" -ba ./warewulf-cluster.spec | |
- name: Build IPMI | |
run: | | |
set -o xtrace | |
set -o nounset | |
cd ipmi | |
./autogen.sh --with-local-ipmitool=yes | |
make dist-gzip | |
rpmbuild -D "_sourcedir $PWD" -D "_rel 0.${GITHUB_SHA::7}" -ba ./warewulf-ipmi.spec | |
- name: Build Povision | |
run: | | |
set -o xtrace | |
set -o nounset | |
cd provision | |
./autogen.sh --with-local-e2fsprogs --with-local-libarchive \ | |
--with-local-parted --with-local-partprobe --with-local-mdadm \ | |
--with-local-xfsprogs | |
make dist-gzip | |
rpmbuild -D "_sourcedir $PWD" -D "_rel 0.${GITHUB_SHA::7}" \ | |
-D "cross_compile 0" \ | |
-D "mflags -j$(/usr/bin/getconf _NPROCESSORS_ONLN)" \ | |
-ba ./warewulf-provision.spec | |
- name: Build VNFS | |
run: | | |
set -o xtrace | |
set -o nounset | |
cd vnfs | |
./autogen.sh | |
make dist-gzip | |
rpmbuild -D "_sourcedir $PWD" -D "_rel 0.${GITHUB_SHA::7}" -ba ./warewulf-vnfs.spec | |
- name: Archive RPMS | |
uses: actions/upload-artifact@v4 | |
with: | |
name: RPMS | |
path: ~/rpmbuild/RPMS | |
- name: Archive SRPMS | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SRPMS | |
path: ~/rpmbuild/SRPMS |