-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from fhem/fix-cpanfile-notAMD64
Fix dependency install from cpanfile if not a amd64 build
- Loading branch information
Showing
6 changed files
with
142 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,7 @@ jobs: | |
perl-version: "5.38" | ||
install-modules-with: cpanm | ||
install-modules-args: --notest | ||
install-modules: PPI Perl::PrereqScanner::NotQuiteLite File::Find::Rule List::MoreUtils CPAN::Meta Module::CPANfile CPAN::Meta::Merge Scalar::Util | ||
|
||
install-modules: PPI Perl::PrereqScanner::NotQuiteLite File::Path File::Find::Rule List::MoreUtils CPAN::Meta Module::CPANfile CPAN::Meta::Merge Scalar::Util | ||
|
||
- name: clone 3rdparty repositories at github | ||
run: | | ||
|
@@ -48,6 +47,15 @@ jobs: | |
cd ./3rdparty | ||
printf "%s\n" "${REPO_URLS[@]}" | xargs -I {} -P3 sh -c 'echo "{}: $(basename $(dirname {}))/$(basename {})"; git clone "{}" "$(basename $(dirname {}))/$(basename {})"; ' | ||
- name: Init PPI Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: .cache/PPI | ||
save-always: true | ||
restore-keys: | | ||
PPI-SVN- | ||
key: PPI-SVN-${{ steps.prepareSVN.outputs.FHEM_REVISION_LATEST }} | ||
|
||
- name: "create private modules filter regex" | ||
run: | | ||
echo "FHEM_MODULES=$(perl scripts/get-Packages.pl ./3rdparty ./src/fhem/trunk)" >> $GITHUB_ENV | ||
|
@@ -109,6 +117,67 @@ jobs: | |
cache-to: type=gha,mode=max,scope=base_linux/${{ matrix.platform }}-${{ matrix.dockerfile }} | ||
tags: baseonly | ||
|
||
base_cpan_build: | ||
needs: [get_dependencies, base_build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dockerfile: [-bullseye, -threaded-bullseye] | ||
platform: [arm/v7, arm64, 386] | ||
steps: | ||
- name: Checkout this repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Inject slug/short variables | ||
uses: rlespinasse/[email protected] | ||
|
||
- name: Get git vars | ||
shell: bash | ||
run: | | ||
echo "IMAGE_VERSION=$( git describe --tags --dirty --match "v[0-9]*")" >> $GITHUB_OUTPUT | ||
id: gitVars | ||
|
||
- name: Prepare SVN repository checkout and variables | ||
id: prepareSVN | ||
uses: ./.github/workflows/prepare-svn | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: cpanfile-FHEM | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: cpanfile-3rdParty | ||
path: 3rdParty | ||
|
||
- name: Prepare docker for build and publish | ||
id: prepareDOCKER | ||
uses: ./.github/workflows/prepare-docker | ||
with: | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
GHCR_OWNER: ${{ github.repository_owner }} | ||
GHCR_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCKERFILE: ${{ matrix.dockerfile }} | ||
|
||
- name: Build base cpan layer for ${{ matrix.platform }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
load: true | ||
file: ./Dockerfile${{ matrix.dockerfile }} | ||
platforms: linux/${{ matrix.platform }} | ||
push: false | ||
target: base-cpan | ||
cache-from: | | ||
type=gha,scope=base-cpan_linux/${{ matrix.platform }}-${{ matrix.dockerfile }} | ||
type=gha,scope=base_linux/${{ matrix.platform }}-${{ matrix.dockerfile }} | ||
cache-to: type=gha,mode=max,scope=base-cpan_linux/${{ matrix.platform }}-${{ matrix.dockerfile }} | ||
tags: basecpanonly | ||
|
||
|
||
test_build: | ||
# The type of runner that the job will run on | ||
needs: [get_dependencies, base_build] | ||
|
@@ -243,7 +312,7 @@ jobs: | |
published_build: | ||
runs-on: ubuntu-latest | ||
needs: test_build | ||
needs: [test_build, base_cpan_build] | ||
strategy: | ||
matrix: | ||
dockerfile: [-bullseye, -threaded-bullseye] | ||
|
@@ -311,9 +380,8 @@ jobs: | |
push: ${{ github.event_name != 'pull_request' }} | ||
target: with-fhem-python-nodejs | ||
cache-from: | | ||
type=gha,scope=base_linux/arm64-${{ matrix.dockerfile }} | ||
type=gha,scope=base_linux/amd64-${{ matrix.dockerfile }} | ||
type=gha,scope=base_linux/armv7-${{ matrix.dockerfile }} | ||
type=gha,scope=base-cpan_linux/arm64-${{ matrix.dockerfile }} | ||
type=gha,scope=base-cpan_linux/arm/v7-${{ matrix.dockerfile }} | ||
type=gha,scope=full_linux/amd64-${{ matrix.dockerfile }} | ||
type=gha,scope=full_linux/cross-${{ matrix.dockerfile }} | ||
cache-to: type=gha,mode=max,scope=full_linux/cross-${{ matrix.dockerfile }} | ||
|
@@ -357,7 +425,7 @@ jobs: | |
cache-from: | | ||
type=gha,scope=base_linux/arm64-${{ matrix.dockerfile }} | ||
type=gha,scope=base_linux/amd64-${{ matrix.dockerfile }} | ||
type=gha,scope=base_linux/armv7-${{ matrix.dockerfile }} | ||
type=gha,scope=base_linux/arm/v7-${{ matrix.dockerfile }} | ||
type=gha,scope=full_linux/amd64-${{ matrix.dockerfile }} | ||
type=gha,scope=full_linux/cross-${{ matrix.dockerfile }} | ||
type=gha,scope=base_linux/cross-${{ matrix.dockerfile }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ fhem/cache/* | |
fhem/log/* | ||
fhem/restoreDir/* | ||
.vscode/* | ||
src/FHEM/trunk/* | ||
src/FHEM/trunk/* | ||
.cache/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters