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

Build workflows update #457

Merged
merged 65 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
4e9f893
first try
phnzb Nov 26, 2024
2ff7cfb
update linux workflow
phnzb Nov 26, 2024
d7a8e4c
add matrix build
phnzb Nov 26, 2024
8b462e1
add build-installer step
phnzb Nov 26, 2024
514ce55
add diag
phnzb Nov 26, 2024
7658424
remove initial cleanup
phnzb Nov 26, 2024
e941323
add unpackers download
phnzb Nov 26, 2024
d1f1eed
remove unneded artifacts
phnzb Nov 26, 2024
8d856ae
add separate unpackers download
phnzb Nov 26, 2024
6e4dfcc
test debug build
phnzb Nov 26, 2024
e3a4d44
remove debug rest build
phnzb Nov 26, 2024
3e0de94
update build files links
phnzb Nov 27, 2024
d3cd745
fix typos
phnzb Nov 27, 2024
c3a984f
update windows workflow
phnzb Nov 27, 2024
d084739
Merge branch 'develop' of github.com:nzbgetcom/nzbget into feature/gi…
phnzb Nov 28, 2024
3d99a95
remove CMAKE_STRIP step for windows
phnzb Nov 28, 2024
8993767
update vcpkg urls
phnzb Nov 28, 2024
8307827
add upload nsi files
phnzb Nov 28, 2024
cf0fbd4
update windows build script to support installer-only ci build
phnzb Nov 28, 2024
8369dcb
add windows installer build
phnzb Nov 28, 2024
6f9967c
Merge branch 'feature/github-runners-build' of github.com:nzbgetcom/n…
phnzb Nov 29, 2024
0657582
revert build-nzbget.ps1
phnzb Nov 29, 2024
4ebd51d
update build script, add remove unneeded artifacts
phnzb Nov 29, 2024
520fa39
Merge branch 'develop' of github.com:nzbgetcom/nzbget into feature/gi…
phnzb Nov 29, 2024
9665e20
add parallel debug build
phnzb Nov 29, 2024
2f0f724
Merge branch 'feature/github-runners-build' of github.com:nzbgetcom/n…
phnzb Nov 29, 2024
73bb715
test debug build
phnzb Nov 29, 2024
5d5b999
fix debug build
phnzb Nov 29, 2024
40bab4c
return rename build artifacts
phnzb Nov 29, 2024
e32f0a2
release debug conditions
phnzb Nov 29, 2024
ba3b8fc
android build
phnzb Nov 29, 2024
bc71115
freebsd build
phnzb Nov 29, 2024
d1bf3f0
windows matrix debug
phnzb Nov 29, 2024
63f31c0
unify build conditions
phnzb Dec 2, 2024
b80ff73
test debug build
phnzb Dec 2, 2024
7bd896a
test debug build
phnzb Dec 2, 2024
35bc395
remove debug build
phnzb Dec 2, 2024
a72db2b
remove test file
phnzb Dec 2, 2024
027bf45
update android build
phnzb Dec 2, 2024
58c5771
move conditions to one place
phnzb Dec 2, 2024
8d34ec5
freebsd debug build test
phnzb Dec 2, 2024
0c6e198
update windows workflow
phnzb Dec 2, 2024
0b72999
update artifacts
phnzb Dec 2, 2024
50a84c4
update artifacts name
phnzb Dec 2, 2024
3f5727b
build windows installer
phnzb Dec 2, 2024
a490455
windows debug test
phnzb Dec 2, 2024
439c995
fix testing
phnzb Dec 2, 2024
c26daf8
change linux-pkg to github runners
phnzb Dec 2, 2024
2917082
move repack qnap to github-runners
phnzb Dec 2, 2024
0d77b93
update qnap workflow
phnzb Dec 2, 2024
0073ff4
update qdk path
phnzb Dec 2, 2024
583f628
change ubuntu image to 24.04
phnzb Dec 2, 2024
712523c
docker matrix build
phnzb Dec 3, 2024
863d904
ghcr.io test
phnzb Dec 3, 2024
d37d70e
switch to docker manifest
phnzb Dec 3, 2024
6391756
ghcr
phnzb Dec 3, 2024
46d3440
armv7
phnzb Dec 3, 2024
0606416
apt-get update
phnzb Dec 3, 2024
0ab6ed9
change vars to output
phnzb Dec 3, 2024
9120018
update docker runners
phnzb Dec 4, 2024
4afa461
update digests handling and runners tags
phnzb Dec 4, 2024
0d7103a
Merge branch 'develop' of github.com:nzbgetcom/nzbget into feature/gi…
phnzb Dec 4, 2024
07d6d12
test github arm64 runners
phnzb Dec 4, 2024
905b2dc
Merge branch 'develop' of github.com:nzbgetcom/nzbget into feature/gi…
phnzb Dec 5, 2024
0c0ca07
docker runners update
phnzb Dec 5, 2024
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
103 changes: 85 additions & 18 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,116 @@ on:
workflow_call:
workflow_dispatch:

env:
BUILD_ARCHS: "aarch64-ndk armhf-ndk i686-ndk x86_64-ndk"
BUILD_TYPES: ${{ (github.ref_name == 'develop' || github.ref_name == 'main') && 'release debug' || 'release' }}
BUILD_TESTING: ${{ (github.ref_name != 'main') && 'testing' || '' }}

jobs:
build:
runs-on: [self-hosted, nzbget-android]

prepare-build-matrix:
runs-on: ubuntu-24.04
outputs:
archs: ${{ steps.matrix-vars.outputs.ARCHS }}
types: ${{ steps.matrix-vars.outputs.TYPES }}
steps:

- name: Calculate matrix variables
id: matrix-vars
run: |
echo ARCHS=[\"$BUILD_ARCHS\"] | sed 's| |","|g' >> "$GITHUB_OUTPUT"
echo TYPES=[\"$BUILD_TYPES\"] | sed 's| |","|g' >> "$GITHUB_OUTPUT"

build-bin:
runs-on: ubuntu-24.04
needs: prepare-build-matrix
strategy:
matrix:
arch: ${{ fromJSON(needs.prepare-build-matrix.outputs.archs) }}
type: ${{ fromJSON(needs.prepare-build-matrix.outputs.types) }}

steps:

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

- name: Build
- name: Prepare ${{ matrix.arch }} / ${{ matrix.type }} environment
run: |
BUILD_PARAMS="android bin installer"
if [ "$GITHUB_REF_NAME" == "develop" ] || [ "$GITHUB_REF_NAME" == "main" ]; then
BUILD_PARAMS="$BUILD_PARAMS debug release"
else
BUILD_PARAMS="$BUILD_PARAMS release"
fi
if [ "$GITHUB_REF_NAME" != "main" ]; then
BUILD_PARAMS="$BUILD_PARAMS testing"
fi
bash linux/build-nzbget.sh $BUILD_PARAMS
sudo mkdir -p /build
sudo chown $USER:$USER /build
mkdir -p /build/android
mkdir -p /build/lib
curl -L https://github.com/nzbgetcom/build-files/releases/download/v1.0/android-${{ matrix.arch }}.tar.gz -o /build/android/ndk.tar.gz
curl -L https://github.com/nzbgetcom/build-files/releases/download/v1.0/lib-${{ matrix.arch }}.tar.gz -o /build/lib/lib.tar.gz
tar zxf /build/android/ndk.tar.gz -C /build/android
tar zxf /build/lib/lib.tar.gz -C /build/lib
sudo apt-get update
sudo apt-get install -y autoconf automake bc build-essential cmake cpio curl file git libtool pkg-config rsync unzip wget libtinfo6

- name: Build
run: bash linux/build-nzbget.sh bin ${{ matrix.arch }} ${{ matrix.type }} ${{ env.BUILD_TESTING }}

- name: Upload full build log on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: nzbget-android-build-log
name: nzbget-android-${{ matrix.arch }}-${{ matrix.type }}-build-log
path: build/*/build.log
retention-days: 5

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-${{ matrix.arch }}-${{ matrix.type }}-bin
path: build/*.tar.gz
retention-days: 5

build-installer:
runs-on: ubuntu-24.04
needs: build-bin

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Prepare build environment
run: |
sudo mkdir -p /build
sudo chown $USER:$USER /build
curl -L https://github.com/nzbgetcom/build-files/releases/download/v1.0/android-unpack.tar.gz -o /build/unpack.tar.gz
tar zxf /build/unpack.tar.gz -C /build

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

- name: Build installer
run: |
mkdir -p build
for ARCH in ${{ env.BUILD_ARCHS }}; do
for TYPE in ${{ env.BUILD_TYPES }}; do
cp nzbget-$ARCH-$TYPE-bin/*.tar.gz build/
done
done
bash linux/build-nzbget.sh android installer ${{ env.BUILD_TYPES }} ${{ env.BUILD_TESTING }}

- name: Rename build artifacts
if: github.ref_name != 'main' && github.ref_name != 'develop'
run: |
cd build
SUFFIX="-${GITHUB_REF_NAME/\//-}-bin-android.run"
SUFFIX="-${GITHUB_REF_NAME/\//-}-bin-android"
for FILE in *.run; do
[ -f $FILE ] || continue
NEW_FILE=${FILE/-bin-android.run/$SUFFIX}
NEW_FILE=${FILE/-bin-android/$SUFFIX}
mv $FILE $NEW_FILE
done

- name: Delete unneeded platform-specific artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: |
nzbget-*-*-*-bin

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
permissions:
actions: write
secrets: inherit

build-linux-pkg:
uses: ./.github/workflows/linux-pkg.yml
with:
Expand All @@ -45,15 +45,15 @@ jobs:
generate-signatures:
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [build-windows, build-linux, build-osx, build-android, build-freebsd, repack-qnap, build-linux-pkg]
permissions:
actions: write
steps:

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

- name: Generate signatures
run: |
mkdir -p builds
Expand Down Expand Up @@ -97,15 +97,15 @@ jobs:
cd ..
echo
echo "Done."

- name: Upload build artifacts with signatures
uses: actions/upload-artifact@v4
with:
name: nzbget-installers
path: builds/*
retention-days: 5

- name: Delete unneded platform-specific artifacts
- name: Delete unneeded platform-specific artifacts
uses: geekyeggo/delete-artifact@v4
with:
name: |
Expand All @@ -116,7 +116,7 @@ jobs:
nzbget-osx-installers
nzbget-qnap-packages

- name: Delete unneded linux packages artifacts
- name: Delete unneeded linux packages artifacts
uses: geekyeggo/delete-artifact@v4
with:
name: |
Expand All @@ -130,7 +130,7 @@ jobs:
contents: write
if: github.ref_name == 'develop'
steps:

- name: Delete tag and release
uses: dev-drprasad/[email protected]
with:
Expand Down
Loading