-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(build.yml): fix armv7 packages' architecture (#145)
* ci(build.yml): fix armv7 packages' architecture * build.yml: Fix Arch Linux ARM armv7 and aarch64 build * build.yml: don't build useless arch mips package * build.yml: don't build useless arch mips package * build.yml: fix skip arch package mips builds * build.yml: fix skip arch package mips upload * trigger build * build.yml: Fix typo * trigger build * Update .github/workflows/build.yml Co-authored-by: kunish <[email protected]> * Revert "Update .github/workflows/build.yml" This reverts commit 21b580c. * ci: sync to and --------- Co-authored-by: 火力全开加特林 <[email protected]> Co-authored-by: kunish <[email protected]> Co-authored-by: Kevin Yu <[email protected]>
- Loading branch information
1 parent
ca3ea96
commit eb28321
Showing
3 changed files
with
132 additions
and
12 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 |
---|---|---|
|
@@ -196,8 +196,37 @@ jobs: | |
sudo apt install -y libarchive-tools rpm | ||
sudo gem install fpm -v 1.15.1 | ||
pushd bundled || exit 1 | ||
for package_manager in deb rpm pacman; do | ||
fpm -s dir -t "$package_manager" -a $GOARCH --version "$PACKAGE_VERSION" \ | ||
if [ "$GOARCH" == 'mips64' ] || [ "$GOARCH" == 'mips64le' ] || [ "$GOARCH" == 'mipsle' ] || [ "$GOARCH" == 'mips' ];then | ||
echo "Skip pacman package build for Arch Linux has never been port to MIPS family, Debian package and RPM package are enough." | ||
ARCH_PACMAN='' | ||
else | ||
ARCH_PACMAN='pacman' | ||
fi | ||
for package_manager in deb rpm $ARCH_PACMAN; do | ||
if [ "$package_manager" == 'pacman' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='arm7hf' | ||
elif [ "$GOARCH" == 'arm64' ];then | ||
package_arch='aarch64' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
elif [ "$package_manager" == 'rpm' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='armhfp' | ||
elif [ "$GOARCH" == 'arm64' ];then | ||
package_arch='aarch64' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
elif [ "$package_manager" == 'deb' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='armhf' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
fi | ||
fpm -s dir -t "$package_manager" -a $package_arch --version "$PACKAGE_VERSION" \ | ||
--url 'https://github.com/daeuniverse/daed' --description "daed, A Modern Dashboard For dae." \ | ||
--maintainer "[email protected]" --name daed --license 'MIT AGPL' \ | ||
--package daed-linux-$GOARCH$GOAMD64$GOARM.$package_manager \ | ||
|
@@ -210,14 +239,25 @@ jobs: | |
popd || exit 1 | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.deb installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.rpm installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.pacman installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
if [ "$ARCH_PACMAN" == 'pacman' ];then | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.pacman installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
fi | ||
ls | grep -E ".deb|.rpm|.pkg.tar.zst" | ||
fi | ||
- name: Upload Linux packages | ||
if: ${{ env.GOARM != '5' && env.GOARM != '6' }} | ||
if: ${{ env.GOARM != '5' && env.GOARM != '6' && env.GOARCH != 'mips' && env.GOARCH != 'mipsle' && env.GOARCH != 'mips64' && env.GOARCH != 'mips64le' }} | ||
uses: nanoufo/[email protected] | ||
with: | ||
path: | | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
- name: Upload Linux packages without Arch Linux package | ||
if: ${{ env.GOARCH == 'mips' || env.GOARCH == 'mipsle' || env.GOARCH == 'mips64' || env.GOARCH == 'mips64le' }} | ||
uses: nanoufo/[email protected] | ||
with: | ||
path: | | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm |
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 |
---|---|---|
|
@@ -196,8 +196,37 @@ jobs: | |
sudo apt install -y libarchive-tools rpm | ||
sudo gem install fpm -v 1.15.1 | ||
pushd bundled || exit 1 | ||
for package_manager in deb rpm pacman; do | ||
fpm -s dir -t "$package_manager" -a $GOARCH --version "$PACKAGE_VERSION" \ | ||
if [ "$GOARCH" == 'mips64' ] || [ "$GOARCH" == 'mips64le' ] || [ "$GOARCH" == 'mipsle' ] || [ "$GOARCH" == 'mips' ];then | ||
echo "Skip pacman package build for Arch Linux has never been port to MIPS family, Debian package and RPM package are enough." | ||
ARCH_PACMAN='' | ||
else | ||
ARCH_PACMAN='pacman' | ||
fi | ||
for package_manager in deb rpm $ARCH_PACMAN; do | ||
if [ "$package_manager" == 'pacman' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='arm7hf' | ||
elif [ "$GOARCH" == 'arm64' ];then | ||
package_arch='aarch64' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
elif [ "$package_manager" == 'rpm' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='armhfp' | ||
elif [ "$GOARCH" == 'arm64' ];then | ||
package_arch='aarch64' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
elif [ "$package_manager" == 'deb' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='armhf' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
fi | ||
fpm -s dir -t "$package_manager" -a $package_arch --version "$PACKAGE_VERSION" \ | ||
--url 'https://github.com/daeuniverse/daed' --description "daed, A Modern Dashboard For dae." \ | ||
--maintainer "[email protected]" --name daed --license 'MIT AGPL' \ | ||
--package daed-linux-$GOARCH$GOAMD64$GOARM.$package_manager \ | ||
|
@@ -210,18 +239,29 @@ jobs: | |
popd || exit 1 | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.deb installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.rpm installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.pacman installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
if [ "$ARCH_PACMAN" == 'pacman' ];then | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.pacman installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
fi | ||
ls | grep -E ".deb|.rpm|.pkg.tar.zst" | ||
fi | ||
- name: Upload Linux packages | ||
if: ${{ env.GOARM != '5' && env.GOARM != '6' }} | ||
if: ${{ env.GOARM != '5' && env.GOARM != '6' && env.GOARCH != 'mips' && env.GOARCH != 'mipsle' && env.GOARCH != 'mips64' && env.GOARCH != 'mips64le' }} | ||
uses: nanoufo/[email protected] | ||
with: | ||
path: | | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
- name: Upload Linux packages without Arch Linux package | ||
if: ${{ env.GOARCH == 'mips' || env.GOARCH == 'mipsle' || env.GOARCH == 'mips64' || env.GOARCH == 'mips64le' }} | ||
uses: nanoufo/[email protected] | ||
with: | ||
path: | | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
upload-prerelease: | ||
needs: [checkout-full-src, build-bundle] | ||
runs-on: ubuntu-latest | ||
|
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 |
---|---|---|
|
@@ -188,8 +188,37 @@ jobs: | |
sudo apt install -y libarchive-tools rpm | ||
sudo gem install fpm -v 1.15.1 | ||
pushd bundled || exit 1 | ||
for package_manager in deb rpm pacman; do | ||
fpm -s dir -t "$package_manager" -a $GOARCH --version "$PACKAGE_VERSION" \ | ||
if [ "$GOARCH" == 'mips64' ] || [ "$GOARCH" == 'mips64le' ] || [ "$GOARCH" == 'mipsle' ] || [ "$GOARCH" == 'mips' ];then | ||
echo "Skip pacman package build for Arch Linux has never been port to MIPS family, Debian package and RPM package are enough." | ||
ARCH_PACMAN='' | ||
else | ||
ARCH_PACMAN='pacman' | ||
fi | ||
for package_manager in deb rpm $ARCH_PACMAN; do | ||
if [ "$package_manager" == 'pacman' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='arm7hf' | ||
elif [ "$GOARCH" == 'arm64' ];then | ||
package_arch='aarch64' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
elif [ "$package_manager" == 'rpm' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='armhfp' | ||
elif [ "$GOARCH" == 'arm64' ];then | ||
package_arch='aarch64' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
elif [ "$package_manager" == 'deb' ];then | ||
if [ "$GOARCH" == 'arm' ] && [ "$GOARM" == '7' ];then | ||
package_arch='armhf' | ||
else | ||
package_arch="$GOARCH" | ||
fi | ||
fi | ||
fpm -s dir -t "$package_manager" -a $package_arch --version "$PACKAGE_VERSION" \ | ||
--url 'https://github.com/daeuniverse/daed' --description "daed, A Modern Dashboard For dae." \ | ||
--maintainer "[email protected]" --name daed --license 'MIT AGPL' \ | ||
--package daed-linux-$GOARCH$GOAMD64$GOARM.$package_manager \ | ||
|
@@ -202,18 +231,29 @@ jobs: | |
popd || exit 1 | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.deb installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.rpm installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.pacman installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
if [ "$ARCH_PACMAN" == 'pacman' ];then | ||
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.pacman installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
fi | ||
ls | grep -E ".deb|.rpm|.pkg.tar.zst" | ||
fi | ||
- name: Upload Linux packages | ||
if: ${{ env.GOARM != '5' && env.GOARM != '6' }} | ||
if: ${{ env.GOARM != '5' && env.GOARM != '6' && env.GOARCH != 'mips' && env.GOARCH != 'mipsle' && env.GOARCH != 'mips64' && env.GOARCH != 'mips64le' }} | ||
uses: nanoufo/[email protected] | ||
with: | ||
path: | | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst | ||
- name: Upload Linux packages without Arch Linux package | ||
if: ${{ env.GOARCH == 'mips' || env.GOARCH == 'mipsle' || env.GOARCH == 'mips64' || env.GOARCH == 'mips64le' }} | ||
uses: nanoufo/[email protected] | ||
with: | ||
path: | | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb | ||
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm | ||
upload-release: | ||
needs: [checkout-full-src, build-bundle] | ||
runs-on: ubuntu-latest | ||
|