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

Fedora build on GitHub Actions #484

Merged
merged 7 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
38 changes: 38 additions & 0 deletions .github/workflows/package-fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Package GEDKeeper3 for Fedora

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
DOTNET_VERSION: '6.0.*'

jobs:
build-fedora:
runs-on: ubuntu-latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this actually needs to be built in Fedora, not on Ubuntu.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not need any specific packages for separate build this project in Fedora.

steps:
- name: Init
uses: actions/checkout@v3
with:
submodules: recursive
- name: .NET SDK check
run: dotnet sdk check
# error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'freebsd-x64'
# https://learn.microsoft.com/en-us/dotnet/devops/dotnet-build-github-action
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, RID freebsd-x64 should have been removed a long time ago. I seem to have taken it from the freebsd dotnet build articles, but they have long-standing problems with MS (it seems) and the RID is not valid.

# - name: Install dependencies
# run: dotnet restore
# working-directory: projects/GKv3
- name: Build
run: dotnet build -c Linux_Release
working-directory: projects/GKv3
- name: Package
run: bash ./gk_linux_rpm_fedora_package.sh
guard43ru marked this conversation as resolved.
Show resolved Hide resolved
working-directory: deploy
- name: Upload
uses: actions/upload-artifact@v3
with:
name: gedkeeper3-rpm
path: ~/rpmbuild/RPMS/x86_64/*.rpm
if-no-files-found: error
3 changes: 1 addition & 2 deletions deploy/gk_linux_rpm_fedora_package.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh

APP_VER="$1"
DIR="$( cd "$( dirname "$0" )" && pwd )"

rm -rf ~/rpmbuild/
Expand All @@ -10,7 +9,7 @@ mkdir -p ~/rpmbuild/SOURCES
mkdir -p ~/rpmbuild/SPECS
mkdir -p ~/rpmbuild/SRPMS

tar -zcf ~/rpmbuild/SOURCES/gedkeeper-$APP_VER.tar.gz -T "$DIR/rpm/gk_files.txt"
tar -zcf ~/rpmbuild/SOURCES/gedkeeper.tar.gz -T "$DIR/rpm/gk_files.txt"
guard43ru marked this conversation as resolved.
Show resolved Hide resolved
cp "$DIR/rpm/gedkeeper.spec" ~/rpmbuild/SPECS/gedkeeper.spec
cd ~/rpmbuild/SPECS/

Expand Down
2 changes: 1 addition & 1 deletion deploy/make_gk3_linux_fedora_pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
APP_VER="3.2.1"
dotnet build ../projects/GKv3/GEDKeeper3.sln -c Linux_Release
#cd ./deploy/
sh ./gk_linux_rpm_fedora_package.sh $APP_VER
sh ./gk_linux_rpm_fedora_package.sh
guard43ru marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 3 additions & 11 deletions deploy/rpm/gedkeeper.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ Summary: %{summary}
License: GPLv3
Group: Applications/Editors
Url: https://github.com/serg-norseman/gedkeeper
Source: %{name}-%{version}.tar.gz
Source: %{name}.tar.gz
BuildArch: x86_64

#Requires: mono-core
#Requires: mono-data
#Requires: mono-winforms
#Requires: lua
Requires: dotnet-runtime-6.0
guard43ru marked this conversation as resolved.
Show resolved Hide resolved
Requires: sqlite

AutoReq: no
Expand All @@ -33,11 +30,6 @@ AutoReqProv: no

%prep
%setup -qc
find . -type f -iname "*.dll" -exec chmod -x {} \;
find ./locales -type f -exec chmod -x '{}' \;
find ./plugins -type f -exec chmod -x '{}' \;
find ./scripts -type f -exec chmod -x '{}' \;
find ./samples -type f -exec chmod -x '{}' \;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure it's not needed?

Copy link
Contributor Author

@guard43ru guard43ru Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, %setup macro does:

chmod -Rf a+rX,u+w,g-w,o-w .

Does we need some files executable? (except main)
If we want to make sure all files no executable we can use this:

chmod -cRf a-x,a+rX,u+w,g-w,o-w .
# after these make main file executable


%install
install -Dm 0755 gk_run.sh %{buildroot}%{_bindir}/gk_run.sh
Expand All @@ -52,7 +44,7 @@ cp -r bin \
scripts %{buildroot}%{_libdir}/%{name}

## E: zero-length
rm -rf %{buildroot}%{_libdir}/%{name}/scripts/readme.txt
#rm -rf %{buildroot}%{_libdir}/%{name}/scripts/readme.txt

%changelog
* Apr 28 2023 GEDKeeper - 3.2.1
Expand Down
20 changes: 1 addition & 19 deletions deploy/rpm/gk_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,7 @@
./gedkeeper.desktop
./application-x-gedkeeper.xml
./gedkeeper.appdata.xml
../bin/GEDKeeper3.exe
../bin/GKCore.dll
../bin/GKComponents.dll
../bin/BSLib.dll
../bin/BSLib.DataViz.Model.dll
../bin/BSLib.SQLite.dll
../bin/RtfWriter.dll
../bin/ExcelLibrary.dll
../bin/GKMap.Core.dll
../bin/GKMap.WinForms.dll
../bin/itextsharp.dll
../bin/KopiLua.dll
../bin/NLua.dll
../bin/NLog.dll
../bin/nVLC.dll
../bin/UtfUnknown.dll
../bin/YamlDotNet.dll
../bin/Newtonsoft.Json.dll
../bin/ZedGraph.dll
guard43ru marked this conversation as resolved.
Show resolved Hide resolved
../bin/
../LICENSE
../locales/
../plugins/
Expand Down