Skip to content

Commit

Permalink
cops, bicbucstriim: Amend build for DSM 7.2 (#6341)
Browse files Browse the repository at this point in the history
* Amend build matrix for noarch-7.2
- Fixes incorrect inclusion of DSM 7.2 builds when only noarch packages are required (#6340)
- Consolidated matrix logic into set-defaults as a single source of truth
- Simplified and clarified manual build inputs for a better user experience
- Removed redundant needs dependencies in downstream jobs

* Update BicBucStriim to v3.6.3
* Update cops to v3.4.5
  • Loading branch information
mreid-tt authored Dec 6, 2024
1 parent e145e72 commit d07eac6
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 124 deletions.
223 changes: 113 additions & 110 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,51 @@ on:
publish:
description: 'Publish to repository'
required: false
default: 'false'
default: false
type: boolean
# Add a separator as a non-input description
build_settings_description:
description: 'Build Settings (archs to include):'
required: false
default: ''
type: choice
options:
- 'true'
- 'false'
- '---'
add_noarch_builds:
description: 'Include noarch packages'
required: false
default: 'true'
type: choice
options:
- 'true'
- 'false'
default: true
type: boolean
add_noarch_dsm72_builds:
description: 'Include noarch DSM 7.2 packages'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
default: false
type: boolean
add_dsm72_builds:
description: 'Include DSM 7.2 archs'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
default: false
type: boolean
add_dsm71_builds:
description: 'Include DSM 7.1 archs'
required: false
default: 'true'
type: choice
options:
- 'true'
- 'false'
default: true
type: boolean
add_dsm62_builds:
description: 'Include DSM 6.2 archs'
required: false
default: 'true'
type: choice
options:
- 'true'
- 'false'
default: true
type: boolean
add_dsm52_builds:
description: 'Include DSM 5.2 archs'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
default: false
type: boolean
add_srm12_builds:
description: 'Include SRM 1.2 archs'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
default: false
type: boolean
pull_request:
paths:
- 'spk/**'
Expand All @@ -92,13 +76,7 @@ jobs:
outputs:
arch_packages: ${{ steps.dependencies.outputs.arch_packages }}
noarch_packages: ${{ steps.dependencies.outputs.noarch_packages }}
add_noarch_builds: ${{ steps.set-defaults.outputs.add_noarch_builds }}
add_noarch_dsm72_builds: ${{ steps.set-defaults.outputs.add_noarch_dsm72_builds }}
add_dsm72_builds: ${{ steps.set-defaults.outputs.add_dsm72_builds }}
add_dsm71_builds: ${{ steps.set-defaults.outputs.add_dsm71_builds }}
add_dsm62_builds: ${{ steps.set-defaults.outputs.add_dsm62_builds }}
add_dsm52_builds: ${{ steps.set-defaults.outputs.add_dsm52_builds }}
add_srm12_builds: ${{ steps.set-defaults.outputs.add_srm12_builds }}
has_min_dsm72_packages: ${{ steps.dependencies.outputs.has_min_dsm72_packages }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -127,18 +105,6 @@ jobs:
GH_FILES: ${{ steps.getfile.outputs.files }} ${{ steps.getfile_pr.outputs.files }}
SPK_TO_BUILD: ${{ github.event.inputs.package }}

# Set default values for all builds (manual or automated)
- name: Set default values for generate matrix
id: set-defaults
run: |
echo "add_noarch_builds=${{ github.event.inputs.add_noarch_builds || steps.dependencies.outputs.has_noarch_packages }}" >> $GITHUB_OUTPUT
echo "add_noarch_dsm72_builds=${{ github.event.inputs.add_noarch_dsm72_builds || (steps.dependencies.outputs.has_noarch_packages && steps.dependencies.outputs.has_min_dsm72_packages) }}" >> $GITHUB_OUTPUT
echo "add_dsm72_builds=${{ github.event.inputs.add_dsm72_builds || (steps.dependencies.outputs.has_arch_packages && steps.dependencies.outputs.has_min_dsm72_packages) }}" >> $GITHUB_OUTPUT
echo "add_dsm71_builds=${{ github.event.inputs.add_dsm71_builds || steps.dependencies.outputs.has_arch_packages }}" >> $GITHUB_OUTPUT
echo "add_dsm62_builds=${{ github.event.inputs.add_dsm62_builds || steps.dependencies.outputs.has_arch_packages }}" >> $GITHUB_OUTPUT
echo "add_dsm52_builds=${{ github.event.inputs.add_dsm52_builds || 'false' }}" >> $GITHUB_OUTPUT
echo "add_srm12_builds=${{ github.event.inputs.add_srm12_builds || 'false' }}" >> $GITHUB_OUTPUT
- name: Cache downloaded files
uses: actions/cache@v4
with:
Expand All @@ -153,78 +119,115 @@ jobs:
ARCH_PACKAGES: ${{ needs.prepare.outputs.arch_packages }}
NOARCH_PACKAGES: ${{ needs.prepare.outputs.noarch_packages }}

generate_matrix:
name: Generate Matrix
needs: prepare
set-defaults:
name: Set Defaults
runs-on: ubuntu-latest
needs: prepare
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
matrix: ${{ steps.defaults.outputs.matrix }}
steps:
- id: set-matrix
- id: defaults
run: |
# Use the default values passed from the prepare step
add_noarch_builds=${{ needs.prepare.outputs.add_noarch_builds }}
add_noarch_dsm72_builds=${{ needs.prepare.outputs.add_noarch_dsm72_builds }}
add_dsm72_builds=${{ needs.prepare.outputs.add_dsm72_builds }}
add_dsm71_builds=${{ needs.prepare.outputs.add_dsm71_builds }}
add_dsm62_builds=${{ needs.prepare.outputs.add_dsm62_builds }}
add_dsm52_builds=${{ needs.prepare.outputs.add_dsm52_builds }}
add_srm12_builds=${{ needs.prepare.outputs.add_srm12_builds }}
# Retrieve inputs and package availability
add_noarch_builds=${{ github.event.inputs.add_noarch_builds || 'false' }}
add_noarch_dsm72_builds=${{ github.event.inputs.add_noarch_dsm72_builds || 'false' }}
add_dsm72_builds=${{ github.event.inputs.add_dsm72_builds || 'false' }}
add_dsm71_builds=${{ github.event.inputs.add_dsm71_builds || 'false' }}
add_dsm62_builds=${{ github.event.inputs.add_dsm62_builds || 'false' }}
add_dsm52_builds=${{ github.event.inputs.add_dsm52_builds || 'false' }}
add_srm12_builds=${{ github.event.inputs.add_srm12_builds || 'false' }}
has_noarch_packages=$([ -n "${{ needs.prepare.outputs.noarch_packages }}" ] && echo "true" || echo "false")
has_arch_packages=$([ -n "${{ needs.prepare.outputs.arch_packages }}" ] && echo "true" || echo "false")
has_min_dsm72_packages=${{ needs.prepare.outputs.has_min_dsm72_packages || 'false' }}
# Dynamic logic for automatic builds
if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
# Enable noarch builds if noarch packages exist
add_noarch_builds=$([ "$has_noarch_packages" == "true" ] && echo "true" || echo "false")
# Enable noarch DSM 7.2 builds if noarch packages exist and minimum DSM 7.2 requirements are met
add_noarch_dsm72_builds=$([ "$has_noarch_packages" == "true" ] && [ "$has_min_dsm72_packages" == "true" ] && echo "true" || echo "false")
# Enable DSM 7.2 builds if arch packages exist and minimum DSM 7.2 requirements are met
add_dsm72_builds=$([ "$has_arch_packages" == "true" ] && [ "$has_min_dsm72_packages" == "true" ] && echo "true" || echo "false")
# Create matrix as a JSON object
matrix='{"include": ['
if [ "$add_noarch_builds" == "true" ]; then
matrix+='{"arch": "noarch-1.1"},'
matrix+='{"arch": "noarch-3.1"},'
matrix+='{"arch": "noarch-6.1"},'
matrix+='{"arch": "noarch-7.0"},'
if [ "$add_noarch_dsm72_builds" == "true" ]; then
matrix+='{"arch": "noarch-7.2"},'
fi
# Enable DSM 7.1 builds if arch packages exist
add_dsm71_builds=$([ "$has_arch_packages" == "true" ] && echo "true" || echo "false")
# Enable DSM 6.2 builds if arch packages exist
add_dsm62_builds=$([ "$has_arch_packages" == "true" ] && echo "true" || echo "false")
fi
if [ "$add_dsm72_builds" == "true" ]; then
matrix+='{"arch": "x64-7.2"},'
matrix+='{"arch": "aarch64-7.2"},'
matrix+='{"arch": "armv7-7.2"},'
# Build matrix
matrix=$(jq -n '{"include": []}')
# Helper function to add entries to the matrix
add_to_matrix() {
matrix=$(echo "$matrix" | jq --arg arch "$1" '.include += [{"arch": $arch}]')
}
# Add noarch builds
if [ "$add_noarch_builds" == "true" ] && [ "$has_noarch_packages" == "true" ]; then
add_to_matrix "noarch-1.1"
add_to_matrix "noarch-3.1"
add_to_matrix "noarch-6.1"
add_to_matrix "noarch-7.0"
fi
if [ "$add_dsm71_builds" == "true" ]; then
matrix+='{"arch": "x64-7.1"},'
matrix+='{"arch": "aarch64-7.1"},'
matrix+='{"arch": "evansport-7.1"},'
matrix+='{"arch": "armv7-7.1"},'
matrix+='{"arch": "comcerto2k-7.1"},'
# Add noarch DSM 7.2 builds
if [ "$add_noarch_dsm72_builds" == "true" ] && [ "$has_noarch_packages" == "true" ]; then
add_to_matrix "noarch-7.2"
fi
# Add DSM 7.2 builds
if [ "$add_dsm72_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x64-7.2"
add_to_matrix "aarch64-7.2"
add_to_matrix "armv7-7.2"
fi
# Add DSM 7.1 builds
if [ "$add_dsm71_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x64-7.1"
add_to_matrix "aarch64-7.1"
add_to_matrix "evansport-7.1"
add_to_matrix "armv7-7.1"
add_to_matrix "comcerto2k-7.1"
fi
if [ "$add_dsm62_builds" == "true" ]; then
matrix+='{"arch": "x64-6.2.4"},'
matrix+='{"arch": "aarch64-6.2.4"},'
matrix+='{"arch": "evansport-6.2.4"},'
matrix+='{"arch": "armv7-6.2.4"},'
matrix+='{"arch": "hi3535-6.2.4"},'
matrix+='{"arch": "88f6281-6.2.4"},'
matrix+='{"arch": "qoriq-6.2.4"},'
# Add DSM 6.2 builds
if [ "$add_dsm62_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x64-6.2.4"
add_to_matrix "aarch64-6.2.4"
add_to_matrix "evansport-6.2.4"
add_to_matrix "armv7-6.2.4"
add_to_matrix "hi3535-6.2.4"
add_to_matrix "88f6281-6.2.4"
add_to_matrix "qoriq-6.2.4"
fi
if [ "$add_dsm52_builds" == "true" ]; then
matrix+='{"arch": "x86-5.2"},'
matrix+='{"arch": "88f6281-5.2"},'
matrix+='{"arch": "ppc853x-5.2"},'
# Add DSM 5.2 builds
if [ "$add_dsm52_builds" == "true" ] && [ "$has_arch_packages" == "true" ]; then
add_to_matrix "x86-5.2"
add_to_matrix "88f6281-5.2"
add_to_matrix "ppc853x-5.2"
fi
# Add SRM 1.2 builds
if [ "$add_srm12_builds" == "true" ]; then
matrix+='{"arch": "armv7-1.2"},'
add_to_matrix "armv7-1.2"
fi
# Remove trailing comma and close the matrix
matrix=$(echo $matrix | sed 's/,$//')
matrix+=']}'
echo "matrix=$matrix" >> $GITHUB_OUTPUT
# Output the final matrix
echo "matrix=$(echo $matrix | jq -c)" >> $GITHUB_OUTPUT
build:
name: Build
needs: [prepare, generate_matrix]
needs: [prepare, set-defaults]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate_matrix.outputs.matrix) }}
matrix: ${{ fromJSON(needs.set-defaults.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion cross/bicbucstriim/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = bicbucstriim
PKG_VERS = 3.5.2
PKG_VERS = 3.6.3
PKG_EXT = zip
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-php82.$(PKG_EXT)
PKG_DIST_SITE = https://github.com/mikespub-org/rvolz-BicBucStriim/releases/download/v$(PKG_VERS)
Expand Down
6 changes: 3 additions & 3 deletions cross/bicbucstriim/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bicbucstriim-3.5.2-php82.zip SHA1 b1dee2639c258d4f7d4afa0cc41b3ac7f5cd1dc5
bicbucstriim-3.5.2-php82.zip SHA256 1a6670edbd56043dc6a4e16ab779ebbc8aada9489eaec9630cbc6b7eef769906
bicbucstriim-3.5.2-php82.zip MD5 264ff78755e269be4b06e6e97fa8e731
bicbucstriim-3.6.3-php82.zip SHA1 ee7b41b21bfb7496dd46f124b7f1ac36b93a954f
bicbucstriim-3.6.3-php82.zip SHA256 7a8daca742951fe14c94c7d7cc12c8e03dbae6297ea6e118f38d6af7c16122f3
bicbucstriim-3.6.3-php82.zip MD5 979417c18d6494d3d0b735d1ea348e06
2 changes: 1 addition & 1 deletion cross/cops/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = cops
PKG_VERS = 3.2.2
PKG_VERS = 3.4.5
PKG_EXT = zip
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-php82.$(PKG_EXT)
PKG_DIST_SITE = https://github.com/mikespub-org/seblucas-cops/releases/download/$(PKG_VERS)
Expand Down
6 changes: 3 additions & 3 deletions cross/cops/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cops-3.2.2-php82.zip SHA1 530c525cdfdb72040d089d031e8d48053d68437c
cops-3.2.2-php82.zip SHA256 c3dbb1a310d846364e7a1c3f1453098a2273b45a80655a57fadc5a393868797b
cops-3.2.2-php82.zip MD5 1e89e57e7862df462a1f6b397858bd4b
cops-3.4.5-php82.zip SHA1 e8acbdc3a8816d33de748a2b8f34e6ca5ddc6e10
cops-3.4.5-php82.zip SHA256 c583da1e3442d38a20a54b7b650687a6ecece43057fad0e16dc6c4e82a00b16f
cops-3.4.5-php82.zip MD5 b170c674a389a899890f0c5c692ee0c5
6 changes: 3 additions & 3 deletions spk/bicbucstriim/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = bicbucstriim
SPK_VERS = 3.5.2
SPK_REV = 9
SPK_VERS = 3.6.3
SPK_REV = 10
SPK_ICON = src/bicbucstriim.png

DEPENDS = cross/bicbucstriim
Expand All @@ -13,7 +13,7 @@ SPK_DEPENDS = WebStation:PHP8.2:Apache2.4
MAINTAINER = SynoCommunity
DESCRIPTION = BicBucStriim streams books, digital books. It fills a gap in the functionality of current NAS devices, which provide access to your collection of music, videos and photos -- but not books. BicBucStriim covers that area and provides web-based access to your e-book collection.
DISPLAY_NAME = BicBucStriim
CHANGELOG = "Update to v3.5.2 (Requires PHP 8.2 and DSM 7.2)"
CHANGELOG = "Update to v3.6.3 (Requires PHP 8.2 and DSM 7.2)"

HOMEPAGE = https://github.com/mikespub-org/rvolz-BicBucStriim/
LICENSE = MIT
Expand Down
6 changes: 3 additions & 3 deletions spk/cops/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = cops
SPK_VERS = 3.2.2
SPK_REV = 12
SPK_VERS = 3.4.5
SPK_REV = 13
SPK_ICON = src/cops.png

DEPENDS = cross/cops
Expand All @@ -14,7 +14,7 @@ MAINTAINER = SynoCommunity
DESCRIPTION = Calibre OPDS and HTML PHP Server : light alternative to Calibre content server / Calibre2OPDS.
DESCRIPTION_FRE = Calibre OPDS et HTML PHP Serveur : alternative légère au serveur de contenu de Calibre et à Calibre2OPDS.
DISPLAY_NAME = COPS
CHANGELOG = "1. Update to v3.2.2. (Requires PHP 8.2 and DSM 7.2)"
CHANGELOG = "1. Update to v3.4.5. (Requires PHP 8.2 and DSM 7.2)"

HOMEPAGE = https://blog.slucas.fr/en/oss/calibre-opds-php-server
LICENSE = GPLv2
Expand Down

0 comments on commit d07eac6

Please sign in to comment.