add architecture name to artifacts

This commit is contained in:
Alessandro Muntoni 2024-02-02 09:42:04 +01:00
parent f0610fb3f7
commit 3bbbcd4996
7 changed files with 40 additions and 19 deletions

View File

@ -33,12 +33,16 @@ inputs:
description: 'Windows Certificate Password'
required: false
default: ''
use-brew-qt:
description: 'Qt Option'
required: false
default: 'false'
runs:
using: "composite"
steps:
- name: Set Notarization settings
id: notarization
id: envs
shell: bash
run: |
if [ "${{ inputs.mac-notarization-user }}" != "" ]; then
@ -46,6 +50,11 @@ runs:
else
echo "not_setting=" >> $GITHUB_OUTPUT
fi
if [ "${{ inputs.use-brew-qt }}" == "true" ]; then
echo "qt-option=--use_brew_qt" >> $GITHUB_OUTPUT
else
echo "qt-option=" >> $GITHUB_OUTPUT
fi
- name: Set CodeSign Certificate macOS
if: ${{ runner.os == 'macOS' && inputs.mac-certificate != ''}}
uses: apple-actions/import-codesign-certs@v2
@ -62,4 +71,4 @@ runs:
- name: Deploy
shell: bash
run: |
bash scripts/${{ runner.os }}/2_deploy.sh --cert_pssw='${{ inputs.win-certificate-pssw }}' --cert_id='${{ inputs.mac-certificate-id }}' ${{ steps.notarization.outputs.not_setting }}
bash scripts/${{ runner.os }}/2_deploy.sh ${{ steps.envs.outputs.qt-option }} --cert_pssw='${{ inputs.win-certificate-pssw }}' --cert_id='${{ inputs.mac-certificate-id }}' ${{ steps.envs.outputs.not_setting }}

View File

@ -31,19 +31,12 @@ jobs:
id: envs
shell: bash
run: |
ARCH=$(uname -m)
if [ "${{matrix.precision}}" == "double_precision" ]; then
echo "artifact_suffix=_double" >> $GITHUB_OUTPUT
echo "artifact_suffix=_double_$ARCH" >> $GITHUB_OUTPUT
else
echo "artifact_suffix=" >> $GITHUB_OUTPUT
echo "artifact_suffix=_$ARCH" >> $GITHUB_OUTPUT
fi
if [ "${{matrix.os}}" == "macos-14" ]; then
echo "build_options=--use_brew_qt" >> $GITHUB_OUTPUT
echo "artifact_os=${{ runner.os }}_arm64" >> $GITHUB_OUTPUT
else
echo "build_options=" >> $GITHUB_OUTPUT
echo "artifact_os=${{ runner.os }}" >> $GITHUB_OUTPUT
fi
- name: Build
uses: ./.github/actions/1_build
with:
@ -55,6 +48,7 @@ jobs:
- name: Deploy
uses: ./.github/actions/2_deploy
with:
use-brew-qt: ${{matrix.os == 'macos-14'}}
mac-certificate: ${{ secrets.MACOS_CERTIFICATE }}
mac-certificate-id: ${{ secrets.MACOS_CERT_ID }}
mac-certificate-pssw: ${{ secrets.MACOS_CERTIFICATE_PSSW }}
@ -63,10 +57,10 @@ jobs:
- name: Upload MeshLab Portable
uses: actions/upload-artifact@v4
with:
name: MeshLab_${{ steps.envs.outputs.artifact_os }}_portable${{steps.envs.outputs.artifact_suffix}}
name: MeshLab_portable${{steps.envs.outputs.artifact_suffix}}
path: install/
- name: Upload MeshLab Packages
uses: actions/upload-artifact@v4
with:
name: MeshLab_${{ steps.envs.outputs.artifact_os }}_packages${{steps.envs.outputs.artifact_suffix}}
name: MeshLab_packages${{steps.envs.outputs.artifact_suffix}}
path: packages/MeshLab*

View File

@ -32,5 +32,8 @@ STR_VERSION=$($INSTALL_PATH/AppRun --version)
read -a strarr <<< "$STR_VERSION"
ML_VERSION=${strarr[1]} #get the meshlab version from the string
# get running architecture
ARCH=$(uname -m)
mkdir $PACKAGES_PATH
mv MeshLab-*.AppImage $PACKAGES_PATH/MeshLab$ML_VERSION-linux.AppImage
mv MeshLab-*.AppImage $PACKAGES_PATH/MeshLab$ML_VERSION-linux_$ARCH.AppImage

View File

@ -47,4 +47,8 @@ rm $INSTALL_PATH/ExecWaitJob.nsh
rm $INSTALL_PATH/FileAssociation.nsh
mkdir $PACKAGES_PATH
mv $INSTALL_PATH/MeshLab*-windows.exe $PACKAGES_PATH
mv $INSTALL_PATH/MeshLab*-windows.exe $PACKAGES_PATH
# get running architecture
ARCH=$(uname -m)
mv $PACKAGES_PATH/MeshLab*-windows.exe $PACKAGES_PATH/MeshLab*-windows_$ARCH.exe

View File

@ -24,6 +24,10 @@ case $i in
QT_DIR_OPTION=-qt=${i#*=}
shift # past argument=value
;;
--use_brew_qt)
QT_DIR_OPTION="--use_brew_qt"
shift # past argument=value
;;
-p=*|--packages_path=*)
PACKAGES_PATH="${i#*=}"
shift # past argument=value

View File

@ -15,7 +15,11 @@ case $i in
shift # past argument=value
;;
-qt=*|--qt_dir=*)
QT_DIR=${i#*=}/bin/
QT_DIR=${i#*=}
shift # past argument=value
;;
--use_brew_qt)
QT_DIR=$(brew --prefix qt5)
shift # past argument=value
;;
*)
@ -32,7 +36,7 @@ do
done
# save in message the output of macdeployqt
message=$(${QT_DIR}macdeployqt $INSTALL_PATH/$APPNAME \
message=$(${QT_DIR}/bin/macdeployqt $INSTALL_PATH/$APPNAME \
$ARGUMENTS 2>&1)
# if message contains "ERROR" then macdeployqt failed

View File

@ -47,6 +47,9 @@ mv $INSTALL_PATH/meshlab.app $INSTALL_PATH/MeshLab$ML_VERSION.app
mkdir $PACKAGES_PATH
appdmg $RESOURCES_PATH/macos/meshlab_dmg_final.json $PACKAGES_PATH/MeshLab$ML_VERSION-macos.dmg
# get running architecture
ARCH=$(uname -m)
appdmg $RESOURCES_PATH/macos/meshlab_dmg_final.json $PACKAGES_PATH/MeshLab$ML_VERSION-macos_$ARCH.dmg
rm $RESOURCES_PATH/macos/meshlab_dmg_final.json