From 68d4f75791127ed93dd9ca0354dbfd8a3720d817 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Fri, 22 Dec 2023 15:51:40 +0100 Subject: [PATCH 01/19] Update nightly-build.yml --- .github/workflows/nightly-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 8ba075b5cd..af21fbe556 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -51,6 +51,8 @@ jobs: security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain + hdiutil attach installers/dist/SasView-Installer-macos-*/SasView5.dmg + cp -rf /Volumes/SasView5.app installers/dist cd installers/dist python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app From 6332951f42f83053379b6690252041e4895d23f3 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Fri, 22 Dec 2023 22:16:45 +0100 Subject: [PATCH 02/19] Update nightly-build.yml --- .github/workflows/nightly-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index af21fbe556..5024ca8689 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -1,6 +1,9 @@ name: Nightly Build on: + pull_request: + branches: + - main push: branches: - main From 9984a7efffd70be7cf61e42a01d1d5344282cbce Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Sat, 23 Dec 2023 08:19:25 +0100 Subject: [PATCH 03/19] Update nightly-build.yml --- .github/workflows/nightly-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 5024ca8689..fe9582c9fa 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -55,7 +55,7 @@ jobs: security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain hdiutil attach installers/dist/SasView-Installer-macos-*/SasView5.dmg - cp -rf /Volumes/SasView5.app installers/dist + cp -rf /Volumes/SasView5/SasView5.app installers/dist cd installers/dist python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app From cdc704f79702cfca0664596a6d687ef9e37ff9f1 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Mon, 25 Dec 2023 16:53:24 +0100 Subject: [PATCH 04/19] Removing version depenedency --- build_tools/code_sign_osx.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build_tools/code_sign_osx.py b/build_tools/code_sign_osx.py index 90b5f819c9..69ec6e0cd0 100644 --- a/build_tools/code_sign_osx.py +++ b/build_tools/code_sign_osx.py @@ -6,13 +6,13 @@ import subprocess import itertools -so_list = glob.glob("SasView5.app/Contents/MacOS/**/*.so", recursive=True) -dylib_list = glob.glob("SasView5.app/Contents/MacOS/**/*.dylib", recursive=True) +so_list = glob.glob("SasView*.app/Contents/MacOS/**/*.so", recursive=True) +dylib_list = glob.glob("SasView*.app/Contents/MacOS/**/*.dylib", recursive=True) dylib_list_resources = glob.glob( - "SasView5.app/Contents/Resources/.dylibs/*.dylib", recursive=True + "SasView*.app/Contents/Resources/.dylibs/*.dylib", recursive=True ) zmq_dylib_list_resources = glob.glob( - "SasView5.app/Contents/Resources/zmq/.dylibs/*.dylib", recursive=True + "SasView*.app/Contents/Resources/zmq/.dylibs/*.dylib", recursive=True ) sign_command = ['codesign', '--timestamp', '--options=runtime', '--verify', '--verbose=4', '--force', @@ -24,4 +24,3 @@ sign_command.append(sfile) subprocess.check_call(sign_command) sign_command.pop() - From 7b0cd6832560e391ded5dedc9ffe9125a52b88ff Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Tue, 26 Dec 2023 22:04:54 +0100 Subject: [PATCH 05/19] Moving folder fixing to nightly build --- .github/workflows/ci.yml | 1 - .github/workflows/nightly-build.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57d3549401..acde169ad7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -251,7 +251,6 @@ jobs: if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} run: | cd installers/dist - python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO - name: Publish installer package diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index fe9582c9fa..7bfbf8d9fa 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -57,6 +57,7 @@ jobs: hdiutil attach installers/dist/SasView-Installer-macos-*/SasView5.dmg cp -rf /Volumes/SasView5/SasView5.app installers/dist cd installers/dist + python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO From ce1bfc1645bfc42296e77f7a9a154cd89a0c6722 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Wed, 27 Dec 2023 08:21:02 +0100 Subject: [PATCH 06/19] adding macholib --- .github/workflows/nightly-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 7bfbf8d9fa..8e2752f7e9 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -42,6 +42,10 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install Macholib + run: | + python -m pip install macholib + - name: Sign executable and create dmg (OSX) env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} From 7f8918fcbadb84f6cd05245933ea9e8ac2b047e8 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Wed, 27 Dec 2023 21:40:26 +0100 Subject: [PATCH 07/19] trying with passing app file --- .github/workflows/ci.yml | 6 +++--- .github/workflows/nightly-build.yml | 24 +++++++++--------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acde169ad7..e417474815 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -247,11 +247,11 @@ jobs: installers/dist/sasview-pyinstaller-dist.tar.gz if-no-files-found: ignore - - name: Fix qt folders and create dmg (OSX) + - name: Fix qt folders if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} run: | cd installers/dist - hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO + python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app - name: Publish installer package if: ${{ matrix.installer }} @@ -260,7 +260,7 @@ jobs: name: SasView-Installer-${{ matrix.os }}-${{ matrix.python-version }} path: | installers/dist/setupSasView.exe - installers/dist/SasView5.dmg + installers/dist/SasView5.app installers/dist/sasview5.tar.gz if-no-files-found: error diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 8e2752f7e9..e1922b0607 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -42,10 +42,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install Macholib - run: | - python -m pip install macholib - - name: Sign executable and create dmg (OSX) env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} @@ -58,21 +54,20 @@ jobs: security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain - hdiutil attach installers/dist/SasView-Installer-macos-*/SasView5.dmg - cp -rf /Volumes/SasView5/SasView5.app installers/dist + mv installers/dist/SasView-Installer-macos-*/SasView5.app installers/dist + cd installers/dist - python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app - python ../../build_tools/code_sign_osx.py + python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app - hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO - codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.dmg + hdiutil create SasView5.dmg -srcfolder SasView-nightly-MacOSX.dmg -ov -format UDZO + codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView-nightly-MacOSX.dmg #This GH action will need to be replaced soon as altool will be deprecated late 2023 - name: Notarize Release Build (OSX) uses: GuillaumeFalourd/xcode-notarize@v1 with: - product-path: "installers/dist/SasView5.dmg" - primary-bundle-id: "org.sasview.SasView5" + product-path: "installers/dist/SasView-nightly-MacOSX.dmg" + primary-bundle-id: "org.sasview.SasView6" appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }} appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }} verbose: True @@ -80,12 +75,11 @@ jobs: - name: Staple Release Build (OSX) uses: BoundfoxStudios/action-xcode-staple@v1 with: - product-path: "installers/dist/SasView5.dmg" + product-path: "installers/dist/SasView-nightly-MacOSX.dmg" - - name: Rename artifacts + - name: Rename remaining artifacts artifacts run: | mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe - mv installers/dist/SasView-Installer-macos-*/SasView5.dmg installers/dist/SasView-nightly-MacOSX.dmg mv installers/dist/SasView-Installer-ubuntu-*/sasview5.tar.gz installers/dist/SasView-nightly-Linux.tar.gz - name: Upload Nightly Build Installer to GitHub releases From 458f4322ebd4d81f96dfa8cf445a77a1cdbb64c3 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Thu, 28 Dec 2023 22:20:11 +0100 Subject: [PATCH 08/19] adding dist-info to explicit signing --- build_tools/code_sign_osx.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build_tools/code_sign_osx.py b/build_tools/code_sign_osx.py index 69ec6e0cd0..edfefd687a 100644 --- a/build_tools/code_sign_osx.py +++ b/build_tools/code_sign_osx.py @@ -15,12 +15,17 @@ "SasView*.app/Contents/Resources/zmq/.dylibs/*.dylib", recursive=True ) +dist_info_list_resources = glob.glob( + "SasView*.app/Contents/MacOS/*.dist-info", recursive=True +) + sign_command = ['codesign', '--timestamp', '--options=runtime', '--verify', '--verbose=4', '--force', '--sign', 'Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)'] #TODO: Check if it is necesarry to do it per file (one long list maybe enough) -for sfile in itertools.chain(so_list, dylib_list, dylib_list_resources, zmq_dylib_list_resources): +for sfile in itertools.chain(so_list, dylib_list, dylib_list_resources, + zmq_dylib_list_resources, dist_info_list_resources): sign_command.append(sfile) subprocess.check_call(sign_command) sign_command.pop() From 2e57ebb3fbb351934001b7613ffd1f74f2a15aaf Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Fri, 29 Dec 2023 22:11:36 +0100 Subject: [PATCH 09/19] removing dmg creation --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e417474815..10d9385931 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,11 +226,11 @@ jobs: iscc installers/installer.iss mv installers/Output/setupSasView.exe installers/dist - - name: Build sasview installer dmg file (OSX) - if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} - run: | - cd installers/dist - hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO +# - name: Build sasview installer dmg file (OSX) +# if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} +# run: | +# cd installers/dist +# hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO - name: Build sasview installer tarball (Linux) if: ${{ matrix.installer && startsWith(matrix.os, 'ubuntu') }} From 9f3649b33dbe7e85395b37108cd711a820a6ef01 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Mon, 1 Jan 2024 22:44:24 +0100 Subject: [PATCH 10/19] trying without explicit signing --- .github/workflows/nightly-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index e1922b0607..c4da70052b 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -57,7 +57,7 @@ jobs: mv installers/dist/SasView-Installer-macos-*/SasView5.app installers/dist cd installers/dist - python ../../build_tools/code_sign_osx.py + #python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app hdiutil create SasView5.dmg -srcfolder SasView-nightly-MacOSX.dmg -ov -format UDZO codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView-nightly-MacOSX.dmg From f700837135ad79e52ee9b8c130a714e36c852dab Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Tue, 2 Jan 2024 22:25:53 +0100 Subject: [PATCH 11/19] removing explicit dist-info signing --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/nightly-build.yml | 3 ++- build_tools/code_sign_osx.py | 6 +----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10d9385931..13f860bf67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -247,11 +247,11 @@ jobs: installers/dist/sasview-pyinstaller-dist.tar.gz if-no-files-found: ignore - - name: Fix qt folders - if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} - run: | - cd installers/dist - python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app +# - name: Fix qt folders +# if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} +# run: | +# cd installers/dist +# python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app - name: Publish installer package if: ${{ matrix.installer }} diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index c4da70052b..cb669b3181 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -57,7 +57,8 @@ jobs: mv installers/dist/SasView-Installer-macos-*/SasView5.app installers/dist cd installers/dist - #python ../../build_tools/code_sign_osx.py + python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app + python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app hdiutil create SasView5.dmg -srcfolder SasView-nightly-MacOSX.dmg -ov -format UDZO codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView-nightly-MacOSX.dmg diff --git a/build_tools/code_sign_osx.py b/build_tools/code_sign_osx.py index edfefd687a..ed92de5759 100644 --- a/build_tools/code_sign_osx.py +++ b/build_tools/code_sign_osx.py @@ -15,17 +15,13 @@ "SasView*.app/Contents/Resources/zmq/.dylibs/*.dylib", recursive=True ) -dist_info_list_resources = glob.glob( - "SasView*.app/Contents/MacOS/*.dist-info", recursive=True -) - sign_command = ['codesign', '--timestamp', '--options=runtime', '--verify', '--verbose=4', '--force', '--sign', 'Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)'] #TODO: Check if it is necesarry to do it per file (one long list maybe enough) for sfile in itertools.chain(so_list, dylib_list, dylib_list_resources, - zmq_dylib_list_resources, dist_info_list_resources): + zmq_dylib_list_resources): sign_command.append(sfile) subprocess.check_call(sign_command) sign_command.pop() From a6cedb66bfa80a97b38e24d87e9dbed5ed94bbac Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Wed, 3 Jan 2024 06:41:17 +0100 Subject: [PATCH 12/19] adding deps installation --- .github/workflows/nightly-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index cb669b3181..64187df3a2 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -42,6 +42,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + python -m pip install wheel setuptools + python -m pip install macholib + - name: Sign executable and create dmg (OSX) env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} From a421b9ce49e757c143a62374b77085a6772e0fda Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Wed, 3 Jan 2024 08:47:29 +0100 Subject: [PATCH 13/19] moving fix qt folders --- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/nightly-build.yml | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13f860bf67..da818bbae6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,6 +226,12 @@ jobs: iscc installers/installer.iss mv installers/Output/setupSasView.exe installers/dist + - name: Fix qt folders + if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} + run: | + cd installers/dist + python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app + # - name: Build sasview installer dmg file (OSX) # if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} # run: | @@ -247,12 +253,6 @@ jobs: installers/dist/sasview-pyinstaller-dist.tar.gz if-no-files-found: ignore -# - name: Fix qt folders -# if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} -# run: | -# cd installers/dist -# python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app - - name: Publish installer package if: ${{ matrix.installer }} uses: actions/upload-artifact@v3 diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 64187df3a2..2eaad56cb8 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -63,7 +63,6 @@ jobs: mv installers/dist/SasView-Installer-macos-*/SasView5.app installers/dist cd installers/dist - python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app hdiutil create SasView5.dmg -srcfolder SasView-nightly-MacOSX.dmg -ov -format UDZO From 9b873e79d27d150322265973233c2556eac33bba Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Wed, 3 Jan 2024 09:43:16 +0100 Subject: [PATCH 14/19] moving signing to ci.yml for testing --- .github/workflows/ci.yml | 20 ++++++++++- .github/workflows/nightly-build.yml | 53 +++++++++++++++-------------- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da818bbae6..49223918ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -232,6 +232,24 @@ jobs: cd installers/dist python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app + - name: Sign executable and create dmg (OSX) + env: + MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} + MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + run: | + echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 + security create-keychain -p DloaAcYP build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p DloaAcYP build.keychain + security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain + + cd installers/dist + python ../../build_tools/code_sign_osx.py + codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app + hdiutil create SasView5.dmg -srcfolder SasView5.dmg -ov -format UDZO + codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.dmg + # - name: Build sasview installer dmg file (OSX) # if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} # run: | @@ -260,7 +278,7 @@ jobs: name: SasView-Installer-${{ matrix.os }}-${{ matrix.python-version }} path: | installers/dist/setupSasView.exe - installers/dist/SasView5.app + installers/dist/SasView5.dmg installers/dist/sasview5.tar.gz if-no-files-found: error diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 2eaad56cb8..b9b70ac750 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -48,34 +48,40 @@ jobs: python -m pip install wheel setuptools python -m pip install macholib - - name: Sign executable and create dmg (OSX) - env: - MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} - MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - run: | - echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 - security create-keychain -p DloaAcYP build.keychain - security default-keychain -s build.keychain - security unlock-keychain -p DloaAcYP build.keychain - security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain +# - name: Sign executable and create dmg (OSX) +# env: +# MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} +# MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} +# run: | +# echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 +# security create-keychain -p DloaAcYP build.keychain +# security default-keychain -s build.keychain +# security unlock-keychain -p DloaAcYP build.keychain +# security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign +# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain +# +# mv installers/dist/SasView-Installer-macos-*/SasView5.app installers/dist +# +# cd installers/dist +# python ../../build_tools/code_sign_osx.py +# codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app +# hdiutil create SasView5.dmg -srcfolder SasView-nightly-MacOSX.dmg -ov -format UDZO +# codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView-nightly-MacOSX.dmg - mv installers/dist/SasView-Installer-macos-*/SasView5.app installers/dist - - cd installers/dist - python ../../build_tools/code_sign_osx.py - codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app - hdiutil create SasView5.dmg -srcfolder SasView-nightly-MacOSX.dmg -ov -format UDZO - codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView-nightly-MacOSX.dmg + - name: Rename remaining artifacts artifacts + run: | + mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe + mv installers/dist/SasView-Installer-macos-*/SasView5.dmg installers/dist/SasView-nightly-MacOSX.dmg + mv installers/dist/SasView-Installer-ubuntu-*/sasview5.tar.gz installers/dist/SasView-nightly-Linux.tar.gz - #This GH action will need to be replaced soon as altool will be deprecated late 2023 - name: Notarize Release Build (OSX) - uses: GuillaumeFalourd/xcode-notarize@v1 + uses: lando/notarize-action@v2 with: product-path: "installers/dist/SasView-nightly-MacOSX.dmg" - primary-bundle-id: "org.sasview.SasView6" + primary-bundle-id: "org.sasview.SasView5" appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }} appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }} + appstore-connect-team-id: W2AG9MPZ43 verbose: True - name: Staple Release Build (OSX) @@ -83,11 +89,6 @@ jobs: with: product-path: "installers/dist/SasView-nightly-MacOSX.dmg" - - name: Rename remaining artifacts artifacts - run: | - mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe - mv installers/dist/SasView-Installer-ubuntu-*/sasview5.tar.gz installers/dist/SasView-nightly-Linux.tar.gz - - name: Upload Nightly Build Installer to GitHub releases uses: ncipollo/release-action@v1 with: From d86ae90639195b35627d462856e2341eb1b35392 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Wed, 3 Jan 2024 10:24:14 +0100 Subject: [PATCH 15/19] fixing action --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49223918ce..975307092b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -233,6 +233,7 @@ jobs: python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app - name: Sign executable and create dmg (OSX) + if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} @@ -247,7 +248,7 @@ jobs: cd installers/dist python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app - hdiutil create SasView5.dmg -srcfolder SasView5.dmg -ov -format UDZO + hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.dmg # - name: Build sasview installer dmg file (OSX) From 44ddfac0a80e23f637167fcd378a2a4de14ff639 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Wed, 3 Jan 2024 12:28:39 +0100 Subject: [PATCH 16/19] further cleanup --- .github/workflows/ci.yml | 13 +----------- .github/workflows/nightly-build.yml | 33 +---------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 975307092b..1204cdec0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,12 +226,6 @@ jobs: iscc installers/installer.iss mv installers/Output/setupSasView.exe installers/dist - - name: Fix qt folders - if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} - run: | - cd installers/dist - python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app - - name: Sign executable and create dmg (OSX) if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} env: @@ -246,17 +240,12 @@ jobs: security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain cd installers/dist + python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app python ../../build_tools/code_sign_osx.py codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.dmg -# - name: Build sasview installer dmg file (OSX) -# if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} -# run: | -# cd installers/dist -# hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO - - name: Build sasview installer tarball (Linux) if: ${{ matrix.installer && startsWith(matrix.os, 'ubuntu') }} run: | diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index b9b70ac750..a99540fc42 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -37,37 +37,6 @@ jobs: run: ls -R working-directory: installers/dist - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - python -m pip install wheel setuptools - python -m pip install macholib - -# - name: Sign executable and create dmg (OSX) -# env: -# MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} -# MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} -# run: | -# echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 -# security create-keychain -p DloaAcYP build.keychain -# security default-keychain -s build.keychain -# security unlock-keychain -p DloaAcYP build.keychain -# security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign -# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain -# -# mv installers/dist/SasView-Installer-macos-*/SasView5.app installers/dist -# -# cd installers/dist -# python ../../build_tools/code_sign_osx.py -# codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app -# hdiutil create SasView5.dmg -srcfolder SasView-nightly-MacOSX.dmg -ov -format UDZO -# codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView-nightly-MacOSX.dmg - - name: Rename remaining artifacts artifacts run: | mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe @@ -78,7 +47,7 @@ jobs: uses: lando/notarize-action@v2 with: product-path: "installers/dist/SasView-nightly-MacOSX.dmg" - primary-bundle-id: "org.sasview.SasView5" + primary-bundle-id: "org.sasview.SasView6" appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }} appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }} appstore-connect-team-id: W2AG9MPZ43 From 1d4f58b020bf498973a91fe2ac57392694a64dba Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Fri, 5 Jan 2024 09:52:19 +0100 Subject: [PATCH 17/19] Upgrading names to SasView6 for linux and Mac distributions --- .github/workflows/ci.yml | 16 ++++++++-------- .github/workflows/nightly-build.yml | 2 +- installers/sasview.spec | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1204cdec0b..2ad7de7167 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -240,17 +240,17 @@ jobs: security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain cd installers/dist - python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app + python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView6.app python ../../build_tools/code_sign_osx.py - codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app - hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO - codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.dmg + codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView6.app + hdiutil create SasView6.dmg -srcfolder SasView6.app -ov -format UDZO + codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView6.dmg - name: Build sasview installer tarball (Linux) if: ${{ matrix.installer && startsWith(matrix.os, 'ubuntu') }} run: | cd installers/dist - tar zcf sasview5.tar.gz sasview + tar zcf sasview6.tar.gz sasview - name: Collect a debug tarball of the installer package if: ${{ matrix.installer }} @@ -268,8 +268,8 @@ jobs: name: SasView-Installer-${{ matrix.os }}-${{ matrix.python-version }} path: | installers/dist/setupSasView.exe - installers/dist/SasView5.dmg - installers/dist/sasview5.tar.gz + installers/dist/SasView6.dmg + installers/dist/sasview6.tar.gz if-no-files-found: error @@ -379,7 +379,7 @@ jobs: if: ${{ startsWith(matrix.os, 'ubuntu') }} run: | # $INSTALL_PATH is already the base directory - tar xf "$DL_PATH/sasview5.tar.gz" + tar xf "$DL_PATH/sasview6.tar.gz" - name: Check installation files run: | diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index a99540fc42..25fe98a9f9 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -40,7 +40,7 @@ jobs: - name: Rename remaining artifacts artifacts run: | mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe - mv installers/dist/SasView-Installer-macos-*/SasView5.dmg installers/dist/SasView-nightly-MacOSX.dmg + mv installers/dist/SasView-Installer-macos-*/SasView6.dmg installers/dist/SasView-nightly-MacOSX.dmg mv installers/dist/SasView-Installer-ubuntu-*/sasview5.tar.gz installers/dist/SasView-nightly-Linux.tar.gz - name: Notarize Release Build (OSX) diff --git a/installers/sasview.spec b/installers/sasview.spec index 01582c444a..2d528e3b31 100644 --- a/installers/sasview.spec +++ b/installers/sasview.spec @@ -132,7 +132,7 @@ coll = COLLECT( if platform.system() == 'Darwin': app = BUNDLE(coll, - name='SasView5.app', + name='SasView6.app', icon='../src/sas/qtgui/images/ball.icns', - bundle_identifier='org.sasview.SasView5', + bundle_identifier='org.sasview.SasView6', info_plist={'NSHighResolutionCapable': 'True'}) From c38c9e910b61c7eefa7dfb01196bbcf91b90f2a2 Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Fri, 5 Jan 2024 10:28:00 +0100 Subject: [PATCH 18/19] Fixing typo --- .github/workflows/nightly-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 25fe98a9f9..f11dda428c 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -41,7 +41,7 @@ jobs: run: | mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe mv installers/dist/SasView-Installer-macos-*/SasView6.dmg installers/dist/SasView-nightly-MacOSX.dmg - mv installers/dist/SasView-Installer-ubuntu-*/sasview5.tar.gz installers/dist/SasView-nightly-Linux.tar.gz + mv installers/dist/SasView-Installer-ubuntu-*/sasview6.tar.gz installers/dist/SasView-nightly-Linux.tar.gz - name: Notarize Release Build (OSX) uses: lando/notarize-action@v2 From c658162a0771e99889bb1ccc838e5de36a5948db Mon Sep 17 00:00:00 2001 From: Wojciech Potrzebowski Date: Fri, 5 Jan 2024 11:44:25 +0100 Subject: [PATCH 19/19] removing PR build for nightly build (only push stays) --- .github/workflows/nightly-build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index f11dda428c..0b11ee66e9 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -1,9 +1,6 @@ name: Nightly Build on: - pull_request: - branches: - - main push: branches: - main