Skip to content

Commit

Permalink
Add linux packaging testing CI
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Koshura <[email protected]>
  • Loading branch information
AenBleidd committed Dec 20, 2023
1 parent 3833dc2 commit 7a95345
Showing 1 changed file with 138 additions and 2 deletions.
140 changes: 138 additions & 2 deletions .github/workflows/linux-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,147 @@ jobs:
name: linux-package_${{ matrix.type }}_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}
path: rpmbuild/RPMS/${{ env.ARCH }}/${{ env.PKG_FULL }}.rpm

test-debian-deb-package:
name: Test Debian DEB Package
runs-on: ubuntu-latest
container:
image: debian:${{ matrix.os }}
needs: build-deb-package
strategy:
matrix:
os: [bullseye, buster]
fail-fast: false
steps:
- name: Download client
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_client_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}

- name: Download manager
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_manager_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}

- name: Install client and manager
if: success()
run: |
dpkg -i $(find ./ -type f -name "boinc-client*.deb" -printf "%f\n")
dpkg -i $(find ./ -type f -name "boinc-manager*.deb" -printf "%f\n")
test-ubuntu-deb-package:
name: Test Ubuntu DEB Package
runs-on: ubuntu-latest
container:
image: ubuntu:${{ matrix.os }}
needs: build-deb-package
strategy:
matrix:
os: [jammy, focal]
fail-fast: false
steps:
- name: Download client
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_client_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}

- name: Download manager
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_manager_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}

- name: Install client and manager
if: success()
run: |
dpkg -i $(find ./ -type f -name "boinc-client*.deb" -printf "%f\n")
dpkg -i $(find ./ -type f -name "boinc-manager*.deb" -printf "%f\n")
test-fedora-rpm-package:
name: Test Fedora RPM Package
runs-on: ubuntu-latest
container:
image: fedora:${{ matrix.os }}
needs: build-rpm-package
strategy:
matrix:
os: [37, 38]
fail-fast: false
steps:
- name: Get OS name
if: success()
run: |
if [[ "${{ matrix.os }}" == "37" ]]; then
OS="fc37"
elif [[ "${{ matrix.os }}" == "38" ]]; then
OS="fc38"
fi
echo "OS=${OS}" >> $GITHUB_ENV
- name: Download client
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_client_${{ env.OS }}_${{ github.event.pull_request.head.sha }}

- name: Download manager
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_manager_${{ env.OS }}_${{ github.event.pull_request.head.sha }}

- name: Install client and manager
if: success()
run: |
rpm -i $(find ./ -type f -name "boinc-client*.rpm" -printf "%f\n")
rpm -i $(find ./ -type f -name "boinc-manager*.rpm" -printf "%f\n")
test-opensuse-rpm-package:
name: Test openSUSE RPM Package
runs-on: ubuntu-latest
container:
image: opensuse/leap:${{ matrix.os }}
needs: build-rpm-package
strategy:
matrix:
os: [15.4, 15.5]
fail-fast: false
steps:
- name: Get OS name
if: success()
run: |
if [[ "${{ matrix.os }}" == "15.4" ]]; then
OS="suse15_4"
elif [[ "${{ matrix.os }}" == "15.5" ]]; then
OS="suse15_5"
fi
echo "OS=${OS}" >> $GITHUB_ENV
- name: Download client
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_client_${{ env.OS }}_${{ github.event.pull_request.head.sha }}

- name: Download manager
if: success()
uses: actions/download-artifact@v3
with:
name: linux-package_manager_${{ env.OS }}_${{ github.event.pull_request.head.sha }}

- name: Install client and manager
if: success()
run: |
rpm -i $(find ./ -type f -name "boinc-client*.rpm" -printf "%f\n")
rpm -i $(find ./ -type f -name "boinc-manager*.rpm" -printf "%f\n")
publish-deb-package:
name: Publish DEB Package
if: github.repository == 'BOINC/boinc'
runs-on: ubuntu-latest
needs: build-deb-package
needs: [test-debian-deb-package, test-ubuntu-deb-package]
strategy:
matrix:
os: [jammy, focal, bullseye, buster]
Expand Down Expand Up @@ -506,7 +642,7 @@ jobs:
runs-on: ubuntu-latest
container:
image: fedora:38
needs: build-rpm-package
needs: [test-fedora-rpm-package, test-opensuse-rpm-package]
strategy:
matrix:
os: [fc38, fc37, suse15_5, suse15_4]
Expand Down

0 comments on commit 7a95345

Please sign in to comment.