Skip to content

Commit

Permalink
Update to v23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
beertje44 committed Feb 19, 2024
2 parents c7007d4 + c116a63 commit 2a5850c
Show file tree
Hide file tree
Showing 135 changed files with 6,000 additions and 1,198 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,28 @@ jobs:
build-synology:
uses: ./.github/workflows/synology.yml

build-qnap:
uses: ./.github/workflows/qnap.yml

repack-qnap:
uses: ./.github/workflows/qnap-repack.yml
with:
external_call: true
needs: [build-linux]
permissions:
actions: write

generate-signatures:
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
runs-on: ubuntu-latest
needs: [build-windows, build-linux, build-osx, build-synology]
needs: [build-windows, build-linux, build-osx, build-synology, build-qnap, repack-qnap]
permissions:
actions: write
steps:

- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Generate signatures
run: |
Expand All @@ -37,6 +50,8 @@ jobs:
mv nzbget-linux-installers/* builds || true
mv nzbget-osx-installers/* builds || true
mv nzbget-synology-packages/* builds || true
mv nzbget-qnap-packages/* builds || true
mv nzbget-qnap-native-packages/* builds || true
cd builds
VERSION=$(ls | grep bin-windows-setup | cut -d - -f 2)
if [ "$GITHUB_REF_NAME" != "main" ]; then VERSION="$VERSION-testing"; fi
Expand All @@ -48,7 +63,7 @@ jobs:
echo "nzbget_signatures({" | tee $SIGS_FILE
echo | tee -a $SIGS_FILE
for FILE in *.exe *.run *.zip *.spk; do
for FILE in *.exe *.run *.zip *.spk *.qpkg; do
[ -f $FILE ] || continue
MD5=$(openssl dgst -md5 $FILE | cut -d ' ' -f 2)
Expand All @@ -71,20 +86,22 @@ jobs:
echo "Done."
- name: Upload build artifacts with signatures
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nzbget-installers
path: builds/*
retention-days: 5

- name: Delete unneded platform-specific artifacts
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v4
with:
name: |
nzbget-windows-installers
nzbget-linux-installers
nzbget-osx-installers
nzbget-synology-packages
nzbget-qnap-packages
nzbget-qnap-native-packages
make-testing-release:
runs-on: [self-hosted, linux]
Expand All @@ -103,7 +120,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}

- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Create latest artifacts
run: |
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
push:
branches:
- develop
- main
tags:
- v*
workflow_dispatch:

env:
REGISTRY_IMAGE: nzbgetcom/nzbget
Expand Down Expand Up @@ -68,7 +66,7 @@ jobs:
provenance: false
push: true
tags: ${{ steps.gen_tags.outputs.tags }}
outputs: "type=image,name=${{ env.REGISTRY_IMAGE }},annotation-index.org.opencontainers.image.description=NZBGet from nzbget.com - version ${{ steps.gen_tags.outputs.version }}"
outputs: "type=image,oci-mediatypes=false,name=${{ env.REGISTRY_IMAGE }}"
build-args: |
"NZBGET_RELEASE=${{ github.ref_name }}"
"MAKE_JOBS=2"
Expand All @@ -80,3 +78,12 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ env.REGISTRY_IMAGE }}
readme-filepath: ./docker/README.md

- name: Cleanup ghcr.io from outdated images
uses: miklinux/ghcr-cleanup-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-owner: nzbgetcom
package-name: nzbget
delete-orphans: true
dry-run: false
6 changes: 3 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -29,7 +29,7 @@ jobs:
rm -rf /build/output
cp -r . /build/nzbget
cd /build
docker run -e ALL_ARCHS="i686 x86_64 aarch64 armhf armel" -v /build:/build nzbget-build /build/scripts/build-nzbget-ci.sh
docker run -e ALL_ARCHS="i686 x86_64 aarch64 armhf armel mipseb mipsel ppc6xx ppc500" -v /build:/build nzbget-build /build/scripts/build-nzbget-ci.sh
- name: Rename build artifacts
if: github.ref_name != 'main' && github.ref_name != 'develop'
Expand All @@ -43,7 +43,7 @@ jobs:
done
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nzbget-linux-installers
path: /build/output/*.run
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
done
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nzbget-osx-installers
path: osx/build/Release/*.zip
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/qnap-repack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: qnap repack

on:
workflow_call:
inputs:
external_call:
description: 'To distinguish workflow_call from regular push / workflow_dispatch'
type: boolean
required: false
default: false
workflow_dispatch:

jobs:
build-linux:
uses: ./.github/workflows/linux.yml
if: ${{ inputs.external_call == false }}

repack:
runs-on: [self-hosted, linux]
needs: [build-linux]
if: always()
permissions:
actions: write

steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@v4

- name: Repack linux installer for QNAP
run: |
export PATH="$PATH:/usr/share/QDK/bin"
bash qnap/repack-nzbget.sh
- name: Rename build artifacts
if: github.ref_name != 'main'
run: |
VERSION=$(cat configure.ac | grep AC_INIT | cut -d , -f 2 | xargs)
NEW_VERSION="$VERSION-testing-$(date '+%Y%m%d')"
cd /qnap/nzbget/build/
for FILE in *.qpkg; do
[ -f $FILE ] || continue
NEW_FILE=${FILE/$VERSION/$NEW_VERSION}
sudo mv $FILE $NEW_FILE
done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-qnap-packages
path: /qnap/nzbget/build/*.qpkg
retention-days: 5

- name: Delete unneded linux artifacts
if: ${{ inputs.external_call == false }}
uses: geekyeggo/delete-artifact@v4
with:
name: |
nzbget-linux-installers
49 changes: 49 additions & 0 deletions .github/workflows/qnap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: qnap build

on:
workflow_call:
workflow_dispatch:

jobs:
build:
runs-on: [self-hosted, linux]

steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Save version for non-release to env
if: github.ref_name != 'main'
run: |
VERSION=$(cat configure.ac | grep AC_INIT | cut -d , -f 2 | xargs)
echo VERSION=$VERSION >> $GITHUB_ENV
- name: Build
run: |
export PATH="$PATH:/usr/share/QDK/bin"
bash qnap/build-nzbget.sh
- name: Rename build artifacts
if: github.ref_name != 'main'
run: |
cd /qnap/nzbget/build/
NEW_VERSION="$VERSION-testing-$(date '+%Y%m%d')"
for FILE in *.qpkg; do
[ -f $FILE ] || continue
NEW_FILE=${FILE/$VERSION/$NEW_VERSION}
sudo mv $FILE $NEW_FILE
done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-qnap-native-packages
path: /qnap/nzbget/build/*.qpkg
retention-days: 5

- name: Cleanup
run: |
rm -rf /qnap/nzbget/
4 changes: 2 additions & 2 deletions .github/workflows/synology.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -32,7 +32,7 @@ jobs:
done
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nzbget-synology-packages
path: /toolkit/result_spk/nzbget/*.spk
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/windows-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- feature/*
- develop
- main
pull_request:
branches:
- develop
- main
workflow_call:
workflow_dispatch:

Expand All @@ -20,7 +24,7 @@ jobs:
"C:\Program Files\CMake\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build
run: |
Expand All @@ -36,7 +40,7 @@ jobs:
ctest -C Release
- name: Upload test artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: nzbget-windows-test-log
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Change version for non-release
if: github.ref_name != 'main'
Expand All @@ -38,7 +38,7 @@ jobs:
}
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nzbget-windows-installers
path: C:\nzbget\build\output\*.exe
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ posix/config.sub
posix/depcomp
posix/install-sh
posix/missing
posix/compile
stamp-h1
autom4te.cache/
.dirstamp
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
cmake_minimum_required(VERSION 3.22)

set(VERSION "23.0")

project(
nzbget
VERSION "22.2"
VERSION ${VERSION}
DESCRIPTION "NZBGet is a binary downloader, which downloads files from Usenet"
LANGUAGES C CXX
)

option(ENABLE_TESTS "Enable tests" ON)

set(VERSION "22")
set(PACKAGE "nzbget")
add_compile_definitions(HAVE_CONFIG_H=1)

Expand All @@ -35,6 +36,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
find_package(OpenSSL REQUIRED)
find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(Boost REQUIRED COMPONENTS json)

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Weverything")
Expand Down
Loading

0 comments on commit 2a5850c

Please sign in to comment.