-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow for building packages
Since changes such as introducing a top-level Makefile can cause a failure during building packages, we will extend our CI to test that we can successfully build packages after introducing some changes in the future.
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build packages | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
CARGO_TERM_COLORS: always | ||
|
||
jobs: | ||
build-rpm-pkgs: | ||
name: Build rpm packages | ||
runs-on: ubuntu-latest | ||
container: | ||
image: fedora:latest | ||
options: --privileged | ||
volumes: | ||
- /var/lib/containers:/var/lib/containers | ||
|
||
strategy: | ||
matrix: | ||
dist-version: [rocky-9-x86_64, fedora-40-x86_64] | ||
fail-fast: false | ||
|
||
steps: | ||
# See: https://github.com/actions/checkout/issues/363 | ||
# An issue related to GH actions containers | ||
- name: Install git and update safe directory | ||
run: | | ||
dnf update -y | ||
dnf install -y git | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build rpm package for ${{ matrix.dist-version }} | ||
run: ./dist/redhat/build_rpm.sh --target ${{ matrix.dist-version }} | ||
|
||
build-deb-pkgs: | ||
name: Build deb packages | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
dist-version: [jammy, noble] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build deb package for ${{ matrix.dist-version }} | ||
run: ./dist/debian/build_deb.sh --target ${{ matrix.dist-version }} |