Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions: add building of RPMS #7

Merged
merged 1 commit into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .github/workflows/cmake.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CMake
name: Continuous Integration

on:
push:
Expand Down Expand Up @@ -33,4 +33,37 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}


build-rpm:
needs: build
runs-on: ubuntu-latest
container:
image: fedora:rawhide
options: --security-opt seccomp=unconfined
steps:
# Install git and other tools first to be able to use 'actions/checkout@v2' properly
- name: Install required packages
run: dnf install --nogpgcheck -y tito gcc gcc-c++ make cmake git-core

# Clone repository and set everything for building of RPMs
- name: Checkout
uses: actions/checkout@v2

- name: Create build directory
run: rm -rf ./rpm_build; mkdir ./rpm_build

- name: Build RPM package
run: tito build --test --rpm --verbose --debug -o ./rpm_build --no-cleanup

- name: Store source RPM as artifact
uses: actions/upload-artifact@v2
with:
name: Source RPM
path: ./rpm_build/*.rpm

- name: Store binary RPMs as artifacts
uses: actions/upload-artifact@v2
with:
name: Binary RPMs
# TODO: replace x86_64 with result of 'uname -m'
path: ./rpm_build/x86_64/*.rpm
1 change: 1 addition & 0 deletions .tito/packages/daemon
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2-1 ./