Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
8dc57a7cfa | |||
96cf5b8164 | |||
dfa7fc5b23 | |||
e510c227f0 | |||
30d669ff06 | |||
c19fdf0f6a | |||
5d2895871d |
52
.github/workflows/build-release.yml
vendored
Normal file
52
.github/workflows/build-release.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: build release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '[0-9]+.[0-9]+.[0-9]+-[0-9]+'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
uses: ./.github/workflows/docker
|
||||||
|
id: build
|
||||||
|
with:
|
||||||
|
target: 'all'
|
||||||
|
|
||||||
|
- name: create release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@latest
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: upload srpm
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: /home/runner/work/kf2-srv/kf2-srv/SRPMS/${{ steps.build.outputs.srpm_name }}
|
||||||
|
asset_name: ${{ steps.build.outputs.srpm_name }}
|
||||||
|
asset_content_type: application/gzip
|
||||||
|
|
||||||
|
- name: upload rpm
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: /home/runner/work/kf2-srv/kf2-srv/RPMS/noarch/${{ steps.build.outputs.rpm_name }}
|
||||||
|
asset_name: ${{ steps.build.outputs.rpm_name }}
|
||||||
|
asset_content_type: application/gzip
|
||||||
|
|
7
.github/workflows/docker/Dockerfile
vendored
Normal file
7
.github/workflows/docker/Dockerfile
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM centos:8
|
||||||
|
|
||||||
|
RUN dnf install -y rpmdevtools dnf-utils make
|
||||||
|
|
||||||
|
COPY * /
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
22
.github/workflows/docker/action.yml
vendored
Normal file
22
.github/workflows/docker/action.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: 'make'
|
||||||
|
|
||||||
|
description: 'make <target>'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
target:
|
||||||
|
description: 'make <target>'
|
||||||
|
required: true
|
||||||
|
default: ''
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
rpm_name:
|
||||||
|
description: 'rpm name'
|
||||||
|
srpm_name:
|
||||||
|
description: 'src.rpm name'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: 'docker'
|
||||||
|
image: 'Dockerfile'
|
||||||
|
args:
|
||||||
|
- ${{ inputs.target }}
|
||||||
|
|
10
.github/workflows/docker/entrypoint.sh
vendored
Executable file
10
.github/workflows/docker/entrypoint.sh
vendored
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh -l
|
||||||
|
|
||||||
|
make active && make builddep && make -j$(nproc) "$1"
|
||||||
|
|
||||||
|
RC=$?
|
||||||
|
|
||||||
|
echo "::set-output name=rpm_name::$(find /github/workspace/RPMS -type f -name '*.rpm' -printf '%f\n')"
|
||||||
|
echo "::set-output name=srpm_name::$(find /github/workspace/SRPMS -type f -name '*.src.rpm' -printf '%f\n')"
|
||||||
|
|
||||||
|
exit $RC
|
20
.github/workflows/tests-dev.yml
vendored
Normal file
20
.github/workflows/tests-dev.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: tests (dev)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
uses: ./.github/workflows/docker
|
||||||
|
with:
|
||||||
|
target: 'test'
|
||||||
|
|
20
.github/workflows/tests-master.yml
vendored
Normal file
20
.github/workflows/tests-master.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: tests (master)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
uses: ./.github/workflows/docker
|
||||||
|
with:
|
||||||
|
target: 'test'
|
||||||
|
|
9
Makefile
9
Makefile
@ -34,12 +34,15 @@ SPEC := $(SPECSDIR)/$(NAME).spec
|
|||||||
VERSION := $(shell grep -Fi 'Version:' $(SPEC) | awk '{ print $$2 }')
|
VERSION := $(shell grep -Fi 'Version:' $(SPEC) | awk '{ print $$2 }')
|
||||||
SOURCETARBALL := $(SOURCESDIR)/$(NAME)-$(VERSION).tar.gz
|
SOURCETARBALL := $(SOURCESDIR)/$(NAME)-$(VERSION).tar.gz
|
||||||
|
|
||||||
.PHONY: all prep rpm srpm activate active check-activate clean-tmp clean-pkg clean
|
.PHONY: all prep rpm srpm activate active check-activate clean-tmp clean-pkg clean builddep test
|
||||||
|
|
||||||
all: check-activate prep
|
all: check-activate prep
|
||||||
rpmbuild -ba $(SPEC)
|
rpmbuild -ba $(SPEC)
|
||||||
$(MAKE) clean-tmp
|
$(MAKE) clean-tmp
|
||||||
|
|
||||||
|
builddep:
|
||||||
|
dnf builddep -y $(SPEC)
|
||||||
|
|
||||||
prep: clean-tmp
|
prep: clean-tmp
|
||||||
cd $(SOURCESDIR) && tar czf $(SOURCETARBALL) \
|
cd $(SOURCESDIR) && tar czf $(SOURCETARBALL) \
|
||||||
config \
|
config \
|
||||||
@ -56,6 +59,10 @@ srpm: check-activate prep
|
|||||||
rpmbuild -bs $(SPEC)
|
rpmbuild -bs $(SPEC)
|
||||||
$(MAKE) clean-tmp
|
$(MAKE) clean-tmp
|
||||||
|
|
||||||
|
test: check-activate prep
|
||||||
|
rpmbuild -bi $(SPEC)
|
||||||
|
$(MAKE) clean-tmp
|
||||||
|
|
||||||
active: activate
|
active: activate
|
||||||
|
|
||||||
activate:
|
activate:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: kf2-srv
|
Name: kf2-srv
|
||||||
Version: 0.14.1
|
Version: 0.14.1
|
||||||
Release: 1%{dist}
|
Release: 2%{dist}
|
||||||
Summary: Killing Floor 2 server
|
Summary: Killing Floor 2 server
|
||||||
Group: Amusements/Games
|
Group: Amusements/Games
|
||||||
License: GNU GPLv3
|
License: GNU GPLv3
|
||||||
@ -10,7 +10,10 @@ BuildArch: noarch
|
|||||||
|
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# test deps
|
||||||
|
BuildRequires: systemd
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
|
BuildRequires: libxml2
|
||||||
|
|
||||||
Requires: systemd >= 219
|
Requires: systemd >= 219
|
||||||
Requires: steamcmd >= 2018.01.05-5
|
Requires: steamcmd >= 2018.01.05-5
|
||||||
@ -96,6 +99,9 @@ if [[ $1 == 1 ]]; then # Install
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 10 2020 GenZmeY <genzmey@gmail.com> - 0.14.1-2
|
||||||
|
- github-actions build.
|
||||||
|
|
||||||
* Sat Aug 8 2020 GenZmeY <genzmey@gmail.com> - 0.14.1-1
|
* Sat Aug 8 2020 GenZmeY <genzmey@gmail.com> - 0.14.1-1
|
||||||
- parallel actions for instance list.
|
- parallel actions for instance list.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user