From be013ed74ca8273677e35cbb9960c4ab28bab896 Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Mon, 21 Apr 2025 17:26:36 +0200 Subject: [PATCH 01/19] Update CI/CD workflows for Ubuntu and Windows: - Change Ubuntu runner to use specific versions for AppImage builds. - Refactor AppImage installation steps for amd64 and arm64 - Update Windows runner to use Windows Server 2025. --- .github/workflows/cicd_ubuntu.yaml | 36 +++++++++++++++++++++-------- .github/workflows/cicd_windows.yaml | 8 +------ 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cicd_ubuntu.yaml b/.github/workflows/cicd_ubuntu.yaml index f53f818..61107a4 100644 --- a/.github/workflows/cicd_ubuntu.yaml +++ b/.github/workflows/cicd_ubuntu.yaml @@ -13,10 +13,9 @@ on: jobs: build: - runs-on: ubuntu-24.04 #ubuntu-latest timeout-minutes: 60 - env: # Use the latest Lazarus source code. + env: # Use the latest Lazarus source code. Copied from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/ LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" strategy: @@ -29,21 +28,36 @@ jobs: - BUILD_TARGET: gtk2_amd64 RELEASE_FILE_NAME: trackereditor_linux_amd64_gtk2.zip LAZ_OPT: --widgetset=gtk2 + RUNS_ON: ubuntu-24.04 - BUILD_TARGET: qt5_amd64 RELEASE_FILE_NAME: trackereditor_linux_amd64_qt5.zip LAZ_OPT: --widgetset=qt5 QT_VERSION_CI: '5' + RUNS_ON: ubuntu-24.04 - BUILD_TARGET: qt6_amd64 RELEASE_FILE_NAME: trackereditor_linux_amd64_qt6.zip LAZ_OPT: --widgetset=qt6 QT_VERSION_CI: '6' + RUNS_ON: ubuntu-24.04 - BUILD_TARGET: AppImage_amd64 RELEASE_FILE_NAME: trackereditor_linux_amd64_qt6.AppImage LAZ_OPT: --widgetset=qt6 QT_VERSION_CI: '6' + LINUX_DEPLOY_FILE_CPU: x86_64 + RUNS_ON: ubuntu-22.04 + + - BUILD_TARGET: AppImage_arm64 + RELEASE_FILE_NAME: trackereditor_linux_arm64_qt6.AppImage + LAZ_OPT: --widgetset=qt6 + QT_VERSION_CI: '6' + LINUX_DEPLOY_FILE_CPU: aarch64 + RUNS_ON: ubuntu-22.04-arm + + name: ${{ matrix.BUILD_TARGET }} + runs-on: ${{ matrix.RUNS_ON }} steps: - uses: actions/checkout@v4 @@ -51,7 +65,9 @@ jobs: submodules: true - name: Install dependency for all build - run: sudo apt-get install -y fpc xvfb + run: | + sudo apt-get update + sudo apt-get install -y fpc xvfb shell: bash - name: Install dependency for gtk2 @@ -70,14 +86,14 @@ jobs: shell: bash - name: Install dependency for AppImage - if: matrix.BUILD_TARGET == 'AppImage_amd64' + if: matrix.BUILD_TARGET == 'AppImage_amd64' || matrix.BUILD_TARGET == 'AppImage_arm64' run: | # Add wayland plugin and platform theme sudo apt-get install -y fuse qt6-wayland qt6-xdgdesktopportal-platformtheme qt6-gtk-platformtheme - # Use static versions of AppImage builder. So it won't depend on some specific OS image or library version. - curl -L -O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-static-x86_64.AppImage - curl -L -O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-static-x86_64.AppImage - curl -L -O https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage + # Download/Install AppImage tools + curl -L -O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${{ matrix.LINUX_DEPLOY_FILE_CPU }}.AppImage + curl -L -O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${{ matrix.LINUX_DEPLOY_FILE_CPU }}.AppImage + curl -L -O https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-${{ matrix.LINUX_DEPLOY_FILE_CPU }}.AppImage chmod +x linuxdeploy-*.AppImage shell: bash @@ -138,7 +154,7 @@ jobs: shell: bash - name: Create AppImage - if: matrix.BUILD_TARGET == 'AppImage_amd64' + if: matrix.BUILD_TARGET == 'AppImage_amd64' || matrix.BUILD_TARGET == 'AppImage_arm64' # LDAI_NO_APPSTREAM=1: skip checking AppStream metadata for issues env: LDAI_NO_APPSTREAM: 1 @@ -148,7 +164,7 @@ jobs: EXTRA_PLATFORM_PLUGINS: libqwayland-generic.so;libqwayland-egl.so DEPLOY_PLATFORM_THEMES: true run: | - ./linuxdeploy-static-x86_64.AppImage \ + ./linuxdeploy-${{ matrix.LINUX_DEPLOY_FILE_CPU }}.AppImage \ --output appimage \ --appdir temp_appdir \ --plugin qt \ diff --git a/.github/workflows/cicd_windows.yaml b/.github/workflows/cicd_windows.yaml index c9dca02..425b96e 100644 --- a/.github/workflows/cicd_windows.yaml +++ b/.github/workflows/cicd_windows.yaml @@ -13,7 +13,7 @@ on: jobs: build: - runs-on: windows-2022 + runs-on: windows-2025 timeout-minutes: 60 env: LAZBUILD_WITH_PATH: c:/lazarus/lazbuild @@ -25,12 +25,6 @@ jobs: with: submodules: true - - name: Install winget - # winget will be included in windows server 2025 - uses: Cyberboss/install-winget@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Lazarus IDE run: winget install lazarus --disable-interactivity --accept-source-agreements --silent From 805b123887daed3aefb5f2ce5e1910d8fb52169c Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Wed, 23 Apr 2025 19:24:49 +0200 Subject: [PATCH 02/19] Refactor CI/CD workflows for macOS and Ubuntu - Download Lazarus source code into temp folder - Add lazbuild to the PATH variable. --- .github/workflows/cicd_macos.yaml | 32 +++++++++++++++++++++++++----- .github/workflows/cicd_ubuntu.yaml | 22 ++++++++++---------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index 81cf110..5133a1b 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -16,33 +16,55 @@ jobs: runs-on: macos-latest timeout-minutes: 60 env: - LAZBUILD_WITH_PATH: /Applications/Lazarus/lazbuild MACOS_APP: enduser/trackereditor.app PROGRAM_NAME_WITH_PATH: 'enduser/trackereditor' BUILD_WITH_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }} PROJECT_LPI: source/project/tracker_editor/trackereditor.lpi RELEASE_DMG_FILE: trackereditor_macOS_notarized_universal_binary.dmg + # Copied the latest Lazarus source code from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/ + LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" steps: - uses: actions/checkout@v4 with: submodules: true - - name: Install Lazarus IDE - run: brew install --cask lazarus + - name: Install Free Pascal Compiler (FPC) multi arch version for macOS x86_64 and aarch64 + run: brew install --cask fpc-laz + shell: bash - name: Install Create dmg run: brew install create-dmg + - name: Download Lazarus source code into temp folder + run: | + #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. + cd ${RUNNER_TEMP} + curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }} + tar -xzf *.tar.gz + shell: bash + + - name: Build lazbuild from Lazarus source code + run: | + # make lazbuild and put the link with extra parameter in the temp folder. + LAZARUS_DIR=${RUNNER_TEMP}/lazarus + cd "$LAZARUS_DIR" + make lazbuild + echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild + chmod +x ${RUNNER_TEMP}/lazbuild + # Add lazbuild to the PATH variable. So it can be used in the next steps. + echo ${RUNNER_TEMP} >> $GITHUB_PATH + shell: bash + - name: Build trackereditor app for Apple silicon (aarch64) run: | - ${{ env.LAZBUILD_WITH_PATH }} --build-all --build-mode=Release --widgetset=cocoa --cpu=aarch64 ${{ env.PROJECT_LPI }} + lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=aarch64 ${{ env.PROJECT_LPI }} mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 shell: bash - name: Build trackereditor app for Intel Mac version (x86_64) run: | - ${{ env.LAZBUILD_WITH_PATH }} --build-all --build-mode=Release --widgetset=cocoa --cpu=x86_64 ${{ env.PROJECT_LPI }} + lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=x86_64 ${{ env.PROJECT_LPI }} mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 shell: bash diff --git a/.github/workflows/cicd_ubuntu.yaml b/.github/workflows/cicd_ubuntu.yaml index 61107a4..4d1b826 100644 --- a/.github/workflows/cicd_ubuntu.yaml +++ b/.github/workflows/cicd_ubuntu.yaml @@ -97,9 +97,10 @@ jobs: chmod +x linuxdeploy-*.AppImage shell: bash - - name: Download Lazarus source code + - name: Download Lazarus source code into temp folder run: | - #Download lazarus source code. Directory 'lazarus' will be created in the project folder. + #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. + cd ${RUNNER_TEMP} curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }} tar -xzf *.tar.gz shell: bash @@ -107,26 +108,27 @@ jobs: - name: Build libQTpas.so if: matrix.QT_VERSION_CI != '' run: | - cd "${{ github.workspace }}/lazarus/lcl/interfaces/qt${{ matrix.QT_VERSION_CI }}/cbindings/" + cd "${RUNNER_TEMP}/lazarus/lcl/interfaces/qt${{ matrix.QT_VERSION_CI }}/cbindings/" /usr/lib/qt${{ matrix.QT_VERSION_CI }}/bin/qmake make -j$(nproc) sudo make install shell: bash - - name: Build lazbuild - env: - LAZARUS_DIR: "${{ github.workspace }}/lazarus" + - name: Build lazbuild from Lazarus source code run: | - # make lazbuild and put the link with extra parameter in project folder + # make lazbuild and put the link with extra parameter in the temp folder. + LAZARUS_DIR=${RUNNER_TEMP}/lazarus cd "$LAZARUS_DIR" make lazbuild - echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${{ github.workspace }}/lazbuild - chmod +x ${{ github.workspace }}/lazbuild + echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild + chmod +x ${RUNNER_TEMP}/lazbuild + # Add lazbuild to the PATH variable. So it can be used in the next steps. + echo ${RUNNER_TEMP} >> $GITHUB_PATH shell: bash - name: Build trackereditor # Build trackereditor project (Release mode) - run: ./lazbuild --build-all --build-mode=Release ${{ matrix.LAZ_OPT }} source/project/tracker_editor/trackereditor.lpi + run: lazbuild --build-all --build-mode=Release ${{ matrix.LAZ_OPT }} source/project/tracker_editor/trackereditor.lpi shell: bash - name: Test if OpenSSL works on Linux CI From b76cff28eaeb3d427ef3c429f73aaa104e6e45ab Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Wed, 23 Apr 2025 19:30:28 +0200 Subject: [PATCH 03/19] Update conditional custom options for macOS aarch64 architecture - aarch64 -> macOS: 11.0 (first macOS version for aarch64) - intel -> macOS: 10.14 (dark theme is supported since macOS 10.14) the aarch64 linker give warning that the minimum version should be 11.0 --- source/project/tracker_editor/trackereditor.lpi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/project/tracker_editor/trackereditor.lpi b/source/project/tracker_editor/trackereditor.lpi index a91b00d..338ca85 100644 --- a/source/project/tracker_editor/trackereditor.lpi +++ b/source/project/tracker_editor/trackereditor.lpi @@ -74,7 +74,14 @@ From aa9e751d03c9d4fa35806a786422bf951aeac85b Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Tue, 21 Oct 2025 21:35:09 +0200 Subject: [PATCH 04/19] macOS: Update custom options for aarch64 architecture to use -WM10.15 Reason: The newer xCode linker is no longer compatible with the current FPC compiler. Await a future FPC fix. This is a temporary workaround. --- source/project/tracker_editor/trackereditor.lpi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/project/tracker_editor/trackereditor.lpi b/source/project/tracker_editor/trackereditor.lpi index 338ca85..9b49c62 100644 --- a/source/project/tracker_editor/trackereditor.lpi +++ b/source/project/tracker_editor/trackereditor.lpi @@ -76,7 +76,7 @@ begin If TargetCPU = 'aarch64' then begin - CustomOptions += '-WM11.0'; + CustomOptions += '-WM10.15'; end else begin From 8b2d945565183ed7cad38d3a8920a9eeabe02d9f Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Tue, 21 Oct 2025 21:38:11 +0200 Subject: [PATCH 05/19] snap: Update snapcraft.yaml to support QT6 and core24 base Upgrade: core22 -> core24 QT5 -> QT6 --- snap/snapcraft.yaml | 50 +++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9a88fe0..23803bc 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -2,23 +2,22 @@ name: bittorrent-tracker-editor adopt-info: mainprogram icon: metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.png -base: core22 +base: core24 grade: stable confinement: strict -architectures: - - build-on: amd64 - - build-on: arm64 +platforms: + amd64: + build-on: [amd64] + arm64: + build-on: [arm64] apps: bittorrent-tracker-editor: desktop: io.github.gerryferdinandus.bittorrent-tracker-editor.desktop extensions: - - kde-neon + - kde-neon-6 command: trackereditor - environment: - # Fallback to XWayland if running in a Wayland session. - DISABLE_WAYLAND: 1 plugs: - home - network @@ -32,28 +31,29 @@ parts: - curl - build-essential - fpc - - libqt5x11extras5-dev + build-environment: - LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" - - LAZARUS_QT_VERSION: "5" + - LAZARUS_QT_VERSION: "6" - LIB_DIR: "/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR" - LAZARUS_DIR: "$PWD/lazarus" override-build: | - # Remove the older libQTpas.so - rm -f $LIB_DIR/libQt${LAZARUS_QT_VERSION}Pas.* - #Download lazarus source code. Directory 'lazarus' will be created in the root. curl -L -O $LAZARUS_URL_TAR_GZ tar -xzf *.tar.gz - # Create libQTpas.so and put it in snap $CRAFT_PART_INSTALL + #--- Create libQTpas.so and put it in /usr/lib/ and $CRAFT_PART_INSTALL cd "$LAZARUS_DIR/lcl/interfaces/qt${LAZARUS_QT_VERSION}/cbindings/" - qmake + /snap/kde-qt6-core24-sdk/current/usr/bin/qt6/qmake6 make -j$(nproc) - make install + + # copy the libQTpas.so to /usr/lib/ (needed for compile-time linking) + cp -av libQt${LAZARUS_QT_VERSION}Pas.* $LIB_DIR/ + + # copy the libQTpas.so to snap install directory (needed for run-time linking) cp -av --parents $LIB_DIR/libQt${LAZARUS_QT_VERSION}Pas.* $CRAFT_PART_INSTALL - # make lazbuild and put the link with extra parameter in /usr/bin/ + #--- Make lazbuild and put the link with extra parameter in /usr/bin/ cd "$LAZARUS_DIR" make lazbuild echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > /usr/bin/lazbuild @@ -65,19 +65,20 @@ parts: plugin: nil parse-info: [metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.metainfo.xml] override-build: | - lazbuild --build-mode=Release --widgetset=qt5 source/project/tracker_editor/trackereditor.lpi + lazbuild --build-mode=Release --widgetset=qt6 source/project/tracker_editor/trackereditor.lpi install enduser/trackereditor $CRAFT_PART_INSTALL/ install metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.desktop $CRAFT_PART_INSTALL/ # -------------------------------------------------------------- -# Only 2 files are explicitly added in this snap +# Only 3 files are explicitly added in this snap # - main program: enduser/trackereditor -# - Lazarus QT suport library: libQt5Pas.so +# - desktop file: metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.desktop +# - libQt6Pas.so created during the build_lazarus part # # Create snap. Run from the project root folder: -# snapcraft --verbosity verbose +# snapcraft pack --verbosity verbose # -# he snapTo look what is inside t file. Directory 'squashfs-root' will be created in the root folder: +# To look what is inside the snap file. Directory 'squashfs-root' will be created in the root folder: # unsquashfs *.snap # # Install the snap: @@ -86,8 +87,3 @@ parts: # Run the snap # snap run bittorrent-tracker-editor # -------------------------------------------------------------- -# Todo: building for QT6 is still not working with snap -# https://askubuntu.com/questions/1460242/ubuntu-22-04-with-qt6-qmake-could-not-find-a-qt-installation-of -# qtchooser -install qt{LAZARUS_QT_VERSION} $(which qmake6) -# export QT_SELECT=qt{LAZARUS_QT_VERSION} -# -------------------------------------------------------------- From ce456b60d37b20df9fc127542604a0a0e2f6b469 Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Fri, 24 Oct 2025 22:50:56 +0200 Subject: [PATCH 06/19] macOS: CI/CD adds macOS 15 Intel build server Two important changes: - Use two build servers: Intel and ARM instead of a single ARM build server. Reason: Intel processor stuck on the 'macos-15-intel' runner as the last macOS runner that supported Intel architecture. Arm processor still uses the 'macos-latest' runner. Brew install --cask Replace fpc-laz with fpc Reason: fpc-laz will be disabled/removed on September 1, 2026. https://github.com/Homebrew/homebrew-cask/commit/3648170a09b66772291c27ea5d4a2774fe84cb61 Fpc should now be used as a replacement. Note: Brew 'Lazarus' has not been updated due to an issue. The solution is to use 'fpc' to build Lazarus from source code. And to build the tracker editor. --- .github/workflows/cicd_macos.yaml | 215 ++++++++++++++++++++++++------ 1 file changed, 173 insertions(+), 42 deletions(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index 5133a1b..2cca2b7 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -1,3 +1,23 @@ +# CI/CD workflow for macOS systems to build bittorrent tracker editor app +# Uses GitHub Actions macOS runners to build the app for both Apple silicon (aarch64) and Intel Mac (x86_64) +# Then create a Universal binary using lipo tool. +# Finally create a dmg file for end user distribution. +# The build also codesign and notarize the dmg file if the required Apple developer certificate +# and notarization credentials are present in the GitHub secrets. +# The build is triggered on push, pull request, manual workflow dispatch and every 6 months cron job. +# +# macos-15-intel runner is used to build the x86_64 version. +# macos-latest runner is used to build the aarch64 version and also to create the Universal binary dmg file. +# The build uses Free Pascal Compiler (FPC) and Lazarus IDE to build the app. +# +# macos-15-intel runner is the last macOS runner that supports Intel architecture. +# Newer macOS runners only support Apple silicon (aarch64) architecture. +# Keep supporting Intel architecture build while there runners are still available. +# +# Must use macOS ditto tool to create zip files. +# Using zip command creates zip files that missing some metadata required for macOS apps. + + name: CI/CD on macOS systems. permissions: @@ -11,31 +31,28 @@ on: schedule: - cron: "0 0 1 1/6 *" +env: + MACOS_APP: enduser/trackereditor.app + PROGRAM_NAME_WITH_PATH: 'enduser/trackereditor' + BUILD_WITH_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }} + PROJECT_LPI: source/project/tracker_editor/trackereditor.lpi + RELEASE_DMG_FILE: trackereditor_macOS_notarized_universal_binary.dmg + # Copied the latest Lazarus source code from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/ + LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" + jobs: - build: + build_aarch64: # Build for Apple silicon Mac architecture runs-on: macos-latest timeout-minutes: 60 - env: - MACOS_APP: enduser/trackereditor.app - PROGRAM_NAME_WITH_PATH: 'enduser/trackereditor' - BUILD_WITH_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }} - PROJECT_LPI: source/project/tracker_editor/trackereditor.lpi - RELEASE_DMG_FILE: trackereditor_macOS_notarized_universal_binary.dmg - # Copied the latest Lazarus source code from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/ - LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" - steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true - name: Install Free Pascal Compiler (FPC) multi arch version for macOS x86_64 and aarch64 - run: brew install --cask fpc-laz + run: brew install fpc shell: bash - - name: Install Create dmg - run: brew install create-dmg - - name: Download Lazarus source code into temp folder run: | #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. @@ -59,25 +76,13 @@ jobs: - name: Build trackereditor app for Apple silicon (aarch64) run: | lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=aarch64 ${{ env.PROJECT_LPI }} - mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 shell: bash - - name: Build trackereditor app for Intel Mac version (x86_64) - run: | - lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=x86_64 ${{ env.PROJECT_LPI }} - mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 - shell: bash - - - name: Create a Universal macOS binary from aarch64 and x86_64 - run: | - # Create a new Universal macOS binary - lipo -create -output ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 - - # Remove these extra binary build. Not needed any more. - rm -f ${{ env.PROGRAM_NAME_WITH_PATH }}-* + - name: Test App SSL connection + run: open "${{ env.PROGRAM_NAME_WITH_PATH }}" --args -TEST_SSL shell: bash - - name: Extract latest program version from metainfo and update the Info.plist with it + - name: Set correct version number in macOS .app bundle Info.plist from metainfo xml file env: METAINFO_FILE: metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.metainfo.xml run: | @@ -86,17 +91,10 @@ jobs: plutil -replace CFBundleShortVersionString -string $TRACKER_EDITOR_VERSION ${{ env.MACOS_APP }}/Contents/Info.plist shell: bash - - name: Move program and icon into macOS .app + - name: Create and set app icon in macOS .app bundle env: ICON_FILE: 'metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.png' run: | - PROGRAM_NAME_ONLY=$(basename -- "${{ env.PROGRAM_NAME_WITH_PATH }}") - - # ------ Move program to app - # remove the previeus app version - rm -f "${{ env.MACOS_APP }}/Contents/MacOS/${PROGRAM_NAME_ONLY}" - # copy the program to the app version. - mv -f "${{ env.PROGRAM_NAME_WITH_PATH }}" "${{ env.MACOS_APP }}/Contents/MacOS" # ------ Create icon set and move it into the app iconset_folder="temp_folder.iconset" @@ -120,7 +118,139 @@ jobs: plutil -insert CFBundleIconFile -string "iconfile" "${{ env.MACOS_APP }}/Contents/Info.plist" shell: bash - - name: Check CPU type generated by Lazbuild + - name: Zip the macOS .app bundle for artifact upload + run: ditto -c -k enduser/trackereditor.app enduser/trackereditor_app.zip + shell: bash + + - name: Rename built -aarch64 binary for artifact upload + run: | + mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 + ditto -c -k ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64.zip + shell: bash + + - name: Upload Artifact. + uses: actions/upload-artifact@v4 + with: + name: artifact-aarch64 + # Include both the zipped universal app bundle and the aarch64 binary zip + path: enduser/*.zip + if-no-files-found: error + + build_x86_64: # Build for Intel Mac architecture + runs-on: macos-15-intel + timeout-minutes: 60 + steps: + - uses: actions/checkout@v5 + with: + submodules: true + + - name: Install Free Pascal Compiler (FPC) multi arch version for macOS x86_64 and aarch64 + run: brew install fpc + shell: bash + + - name: Download Lazarus source code into temp folder + run: | + #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. + cd ${RUNNER_TEMP} + curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }} + tar -xzf *.tar.gz + shell: bash + + - name: Build lazbuild from Lazarus source code + run: | + # make lazbuild and put the link with extra parameter in the temp folder. + LAZARUS_DIR=${RUNNER_TEMP}/lazarus + cd "$LAZARUS_DIR" + make lazbuild + echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild + chmod +x ${RUNNER_TEMP}/lazbuild + # Add lazbuild to the PATH variable. So it can be used in the next steps. + echo ${RUNNER_TEMP} >> $GITHUB_PATH + shell: bash + + - name: Build trackereditor app for Intel Mac version (x86_64) + run: | + lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=x86_64 ${{ env.PROJECT_LPI }} + shell: bash + + - name: Test App SSL connection + run: open "${{ env.PROGRAM_NAME_WITH_PATH }}" --args -TEST_SSL + shell: bash + + - name: Rename built -x86_64 binary for artifact upload + run: | + mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 + ditto -c -k ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64.zip + shell: bash + + - name: Upload Artifact. + uses: actions/upload-artifact@v4 + with: + name: artifact-x86_64 + path: enduser/*.zip + if-no-files-found: error + + + create_universal_macOS_binary: # Create Universal binary from aarch64 and x86_64 builds + runs-on: macos-latest + timeout-minutes: 60 + + needs: + - build_aarch64 + - build_x86_64 + + steps: + - name: Install create-dmg tool + run: brew install create-dmg + shell: bash + + - name: Download build artifacts from previous jobs + uses: actions/download-artifact@v5 + with: + path: enduser/ + merge-multiple: true + + - name: Display the downloaded artifact files + run: ls -R enduser/ + shell: bash + + - name: Unzip all the artifact files + run: | + ditto -xk enduser/trackereditor_app.zip enduser/trackereditor.app + ditto -xk ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64.zip enduser/ + ditto -xk ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64.zip enduser/ + # Remove the zip files after extraction + rm -f enduser/*.zip + shell: bash + + - name: Display the downloaded artifact files after unzip + run: ls -R enduser/ + shell: bash + + - name: Create a Universal macOS binary from aarch64 and x86_64 + run: | + # Create Universal binary using lipo tool + lipo -create -output ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 + + # Remove the previous architecture specific binaries + rm -f ${{ env.PROGRAM_NAME_WITH_PATH }}-* + shell: bash + + - name: Replace the macOS .app bundle binary with the Universal binary + run: | + PROGRAM_NAME_ONLY=$(basename -- "${{ env.PROGRAM_NAME_WITH_PATH }}") + # remove the previous app (symbolic link) + rm -f "${{ env.MACOS_APP }}/Contents/MacOS/${PROGRAM_NAME_ONLY}" + # copy the program to the app version. + mv -f "${{ env.PROGRAM_NAME_WITH_PATH }}" "${{ env.MACOS_APP }}/Contents/MacOS" + ls -l "${{ env.MACOS_APP }}/Contents/MacOS/" + shell: bash + + - name: Display the enduser/ folder contents + run: ls -R enduser/ + shell: bash + + - name: Verify the Universal binary architectures run: | lipo -archs "${{ env.MACOS_APP }}"/Contents/MacOS/trackereditor lipo -archs "${{ env.MACOS_APP }}"/Contents/MacOS/trackereditor | grep -Fq x86_64 @@ -160,11 +290,12 @@ jobs: /usr/bin/codesign --timestamp --force --options runtime --sign "$MACOS_CERTIFICATE_NAME" "${{ env.MACOS_APP }}" shell: bash + - name: Display the enduser/ folder contents + run: ls -R enduser/ + shell: bash + - name: Create dmg file from the enduser/ folder run: | - # Remove all txt file. There are not needed. - rm -f enduser/*.txt - # Build dmg image. https://github.com/create-dmg/create-dmg create-dmg \ --volname "bittorrent-tracker-editor" \ From 838ababff271f2c5dc85b3a972a2aea87deb0492 Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Sat, 25 Oct 2025 19:55:25 +0200 Subject: [PATCH 07/19] chore: add dependabot configuration for GitHub Actions updates [skip ci] --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7a5f2a3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# Enable version updates for GitHub Actions with daily checks +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "chore" + include: "scope" + open-pull-requests-limit: 5 From 3043ca4ed096df1b1d40d765005001adb9ba13c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 20:28:06 +0200 Subject: [PATCH 08/19] chore(deps): bump actions/checkout from 4 to 5 (#55) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd_ubuntu.yaml | 2 +- .github/workflows/cicd_windows.yaml | 2 +- .github/workflows/snap.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd_ubuntu.yaml b/.github/workflows/cicd_ubuntu.yaml index 4d1b826..02a1997 100644 --- a/.github/workflows/cicd_ubuntu.yaml +++ b/.github/workflows/cicd_ubuntu.yaml @@ -60,7 +60,7 @@ jobs: runs-on: ${{ matrix.RUNS_ON }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true diff --git a/.github/workflows/cicd_windows.yaml b/.github/workflows/cicd_windows.yaml index 425b96e..d246f72 100644 --- a/.github/workflows/cicd_windows.yaml +++ b/.github/workflows/cicd_windows.yaml @@ -21,7 +21,7 @@ jobs: LAZ_OPT: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 005920a..8e38937 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true From 4f17c0273eb4b36a532ee0143dda3af18336912d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 20:28:25 +0200 Subject: [PATCH 09/19] chore(deps): bump actions/upload-artifact from 4 to 5 (#54) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd_macos.yaml | 6 +++--- .github/workflows/cicd_ubuntu.yaml | 2 +- .github/workflows/cicd_windows.yaml | 2 +- .github/workflows/snap.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index 2cca2b7..2a3ff70 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -129,7 +129,7 @@ jobs: shell: bash - name: Upload Artifact. - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: artifact-aarch64 # Include both the zipped universal app bundle and the aarch64 binary zip @@ -184,7 +184,7 @@ jobs: shell: bash - name: Upload Artifact. - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: artifact-x86_64 path: enduser/*.zip @@ -355,7 +355,7 @@ jobs: shell: bash - name: Upload Artifact. Signed/Notarize is optional. - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: artifact-${{ runner.os }} path: "*.dmg" diff --git a/.github/workflows/cicd_ubuntu.yaml b/.github/workflows/cicd_ubuntu.yaml index 02a1997..b8ce958 100644 --- a/.github/workflows/cicd_ubuntu.yaml +++ b/.github/workflows/cicd_ubuntu.yaml @@ -181,7 +181,7 @@ jobs: shell: bash - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: artifact-${{ matrix.RELEASE_FILE_NAME }} path: ${{ matrix.RELEASE_FILE_NAME }} diff --git a/.github/workflows/cicd_windows.yaml b/.github/workflows/cicd_windows.yaml index d246f72..475e926 100644 --- a/.github/workflows/cicd_windows.yaml +++ b/.github/workflows/cicd_windows.yaml @@ -67,7 +67,7 @@ jobs: shell: pwsh - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: artifact-${{ runner.os }} path: ${{ env.RELEASE_ZIP_FILE }} diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 8e38937..5fc51a3 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -20,7 +20,7 @@ jobs: - uses: snapcore/action-build@v1 - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: artifact-snap path: "*.snap" From 53fdaf90a7d1e7224c62ed0031cedaec20edf21a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 20:28:43 +0200 Subject: [PATCH 10/19] chore(deps): bump actions/download-artifact from 5 to 6 (#53) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd_macos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index 2a3ff70..f5cd72f 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -205,7 +205,7 @@ jobs: shell: bash - name: Download build artifacts from previous jobs - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: path: enduser/ merge-multiple: true From e55f7b00620b01542d62b6c211f9f0a58c3abf81 Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Sat, 25 Oct 2025 22:30:09 +0200 Subject: [PATCH 11/19] chore: update dependabot to use cron schedule every 6 months Use the same cron schedule time as the other Github Action [skip ci] --- .github/dependabot.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7a5f2a3..5b52009 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,10 +1,13 @@ -# Enable version updates for GitHub Actions with daily checks +# Enable version updates for GitHub Actions at cron schedule every 6 months +# Can be manually triggered via menu: Insights > Dependency graph > "Recent update jobs" -> "Check for updates" + version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" + interval: "cron" + cronjob: "0 0 1 1/6 *" commit-message: prefix: "chore" include: "scope" From d21c2f8ea94aada1fc0a20dc014a8d379b068d22 Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Fri, 7 Nov 2025 19:55:10 +0100 Subject: [PATCH 12/19] snap: add armhf and riscv64 build [skip ci] --- snap/snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 23803bc..a5a0572 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -8,9 +8,9 @@ confinement: strict platforms: amd64: - build-on: [amd64] arm64: - build-on: [arm64] + armhf: + riscv64: apps: bittorrent-tracker-editor: From bbb9ed0f68440efd8e430befb058c34bebcc7116 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 19:41:54 +0100 Subject: [PATCH 13/19] chore(deps): bump actions/checkout from 5 to 6 (#56) Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd_macos.yaml | 4 ++-- .github/workflows/cicd_ubuntu.yaml | 2 +- .github/workflows/cicd_windows.yaml | 2 +- .github/workflows/snap.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index f5cd72f..33d4c71 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -45,7 +45,7 @@ jobs: runs-on: macos-latest timeout-minutes: 60 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true @@ -140,7 +140,7 @@ jobs: runs-on: macos-15-intel timeout-minutes: 60 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true diff --git a/.github/workflows/cicd_ubuntu.yaml b/.github/workflows/cicd_ubuntu.yaml index b8ce958..6218991 100644 --- a/.github/workflows/cicd_ubuntu.yaml +++ b/.github/workflows/cicd_ubuntu.yaml @@ -60,7 +60,7 @@ jobs: runs-on: ${{ matrix.RUNS_ON }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true diff --git a/.github/workflows/cicd_windows.yaml b/.github/workflows/cicd_windows.yaml index 475e926..65032fb 100644 --- a/.github/workflows/cicd_windows.yaml +++ b/.github/workflows/cicd_windows.yaml @@ -21,7 +21,7 @@ jobs: LAZ_OPT: steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 5fc51a3..7a916dc 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true From 79a8a232f6003619bec59532ba4d9ca7046bcc97 Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Tue, 16 Dec 2025 13:55:14 +0100 Subject: [PATCH 14/19] Add missing libxkbcommon-dev - New build/linker suddenly failed due to missing libxkbcommon.so.0 - Remove broken targets: armhf and riscv64 --- snap/snapcraft.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a5a0572..bc6fe21 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -9,8 +9,6 @@ confinement: strict platforms: amd64: arm64: - armhf: - riscv64: apps: bittorrent-tracker-editor: @@ -31,6 +29,7 @@ parts: - curl - build-essential - fpc + - libxkbcommon-dev build-environment: - LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" From b07a2fad38d30bc63d513bfa0452b5d2d423ddfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 23:04:50 +0100 Subject: [PATCH 15/19] chore(deps): bump actions/upload-artifact from 5 to 6 (#57) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd_macos.yaml | 6 +++--- .github/workflows/cicd_ubuntu.yaml | 2 +- .github/workflows/cicd_windows.yaml | 2 +- .github/workflows/snap.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index 33d4c71..5008f45 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -129,7 +129,7 @@ jobs: shell: bash - name: Upload Artifact. - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: artifact-aarch64 # Include both the zipped universal app bundle and the aarch64 binary zip @@ -184,7 +184,7 @@ jobs: shell: bash - name: Upload Artifact. - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: artifact-x86_64 path: enduser/*.zip @@ -355,7 +355,7 @@ jobs: shell: bash - name: Upload Artifact. Signed/Notarize is optional. - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: artifact-${{ runner.os }} path: "*.dmg" diff --git a/.github/workflows/cicd_ubuntu.yaml b/.github/workflows/cicd_ubuntu.yaml index 6218991..56fc41c 100644 --- a/.github/workflows/cicd_ubuntu.yaml +++ b/.github/workflows/cicd_ubuntu.yaml @@ -181,7 +181,7 @@ jobs: shell: bash - name: Upload Artifact - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: artifact-${{ matrix.RELEASE_FILE_NAME }} path: ${{ matrix.RELEASE_FILE_NAME }} diff --git a/.github/workflows/cicd_windows.yaml b/.github/workflows/cicd_windows.yaml index 65032fb..09763b4 100644 --- a/.github/workflows/cicd_windows.yaml +++ b/.github/workflows/cicd_windows.yaml @@ -67,7 +67,7 @@ jobs: shell: pwsh - name: Upload Artifact - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: artifact-${{ runner.os }} path: ${{ env.RELEASE_ZIP_FILE }} diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 7a916dc..2a77953 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -20,7 +20,7 @@ jobs: - uses: snapcore/action-build@v1 - name: Upload Artifact - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: artifact-snap path: "*.snap" From 41eed2caf1695822f2bb1226e899e2eddc961099 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 23:05:29 +0100 Subject: [PATCH 16/19] chore(deps): bump actions/download-artifact from 6 to 7 (#58) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd_macos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index 5008f45..6d06386 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -205,7 +205,7 @@ jobs: shell: bash - name: Download build artifacts from previous jobs - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v7 with: path: enduser/ merge-multiple: true From 771550bc3bf8076c77b8ca950ff7b0bee04d44be Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Sat, 27 Dec 2025 17:04:37 +0100 Subject: [PATCH 17/19] feat: add composite action to install Lazarus IDE with dependencies for Windows, Linux, and macOS --- .github/actions/install_lazarus/action.yaml | 93 +++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .github/actions/install_lazarus/action.yaml diff --git a/.github/actions/install_lazarus/action.yaml b/.github/actions/install_lazarus/action.yaml new file mode 100644 index 0000000..6063a9b --- /dev/null +++ b/.github/actions/install_lazarus/action.yaml @@ -0,0 +1,93 @@ +# include this file in the cicd_windows.yaml, cicd_ubuntu.yaml, and cicd_macos.yaml like this: +# - name: Install Lazarus IDE +# uses: ./.github/actions/install_lazarus +# with: +# qt_version_ci: 6 # optional, only needed when building with qt5 or qt6 + + +# https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action +name: 'Install Lazaurus IDE' +description: 'download and build lazbuild' + +inputs: + qt_version_ci: # id of input + description: 'QT version' + required: false + +runs: + using: "composite" + steps: + - name: Install Lazarus IDE (Windows) + if: runner.os == 'Windows' + run: winget install lazarus --disable-interactivity --accept-source-agreements --silent + shell: powershell + + - name: Install fpc (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y fpc + shell: bash + + - name: Install dependency for gtk2 + if: runner.os == 'Linux' && inputs.qt_version_ci == '' + run: sudo apt-get install -y libgtk2.0-dev + shell: bash + + - name: Install dependency for qt5 + if: runner.os == 'Linux' && inputs.qt_version_ci == '5' + run: sudo apt-get install -y libqt5x11extras5-dev + shell: bash + + - name: Install dependency for qt6 + if: runner.os == 'Linux' && inputs.qt_version_ci == '6' + run: sudo apt-get install -y qt6-base-dev + shell: bash + + - name: Install Free Pascal Compiler (FPC) multi arch version for macOS x86_64 and aarch64 (macOS) + if: runner.os == 'macOS' + run: brew install fpc + shell: bash + + - name: Download Lazarus source code into temp folder (Linux and macOS) + if: runner.os != 'Windows' + env: + # Linux and macOS need to build lazbuild from Lazarus source code. + # Copied the latest Lazarus source code from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/ + LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" + RUNNER_TEMP: ${{ runner.temp }} + run: | + #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. + echo ${RUNNER_TEMP} + cd ${RUNNER_TEMP} + curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }} + tar -xzf *.tar.gz + shell: bash + + - name: Build lazbuild from Lazarus source code (Linux and macOS) + if: runner.os != 'Windows' + env: + RUNNER_TEMP: ${{ runner.temp }} + run: | + # make lazbuild and put the link with extra parameter in the temp folder. + LAZARUS_DIR=${RUNNER_TEMP}/lazarus + cd "$LAZARUS_DIR" + make lazbuild + echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild + chmod +x ${RUNNER_TEMP}/lazbuild + # Add lazbuild to the PATH variable. + echo ${RUNNER_TEMP} >> $GITHUB_PATH + shell: bash + + - name: Build libQTpas.so (qt5 or qt6) + if: runner.os == 'Linux' && inputs.qt_version_ci != '' + env: + RUNNER_TEMP: ${{ runner.temp }} + run: | + cd "${RUNNER_TEMP}/lazarus/lcl/interfaces/qt${{ inputs.qt_version_ci }}/cbindings/" + /usr/lib/qt${{ inputs.qt_version_ci }}/bin/qmake + make -j$(nproc) + sudo make install + shell: bash + + From 982629eef9deeafa0604bc066988391021978a3a Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Sat, 27 Dec 2025 17:07:35 +0100 Subject: [PATCH 18/19] feat: refactor CI/CD workflows To use the composite action to install Lazarus --- .github/workflows/cicd_macos.yaml | 196 ++++++++++------------------ .github/workflows/cicd_ubuntu.yaml | 54 +------- .github/workflows/cicd_windows.yaml | 4 +- 3 files changed, 77 insertions(+), 177 deletions(-) diff --git a/.github/workflows/cicd_macos.yaml b/.github/workflows/cicd_macos.yaml index 6d06386..92b4ed2 100644 --- a/.github/workflows/cicd_macos.yaml +++ b/.github/workflows/cicd_macos.yaml @@ -37,169 +37,75 @@ env: BUILD_WITH_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }} PROJECT_LPI: source/project/tracker_editor/trackereditor.lpi RELEASE_DMG_FILE: trackereditor_macOS_notarized_universal_binary.dmg - # Copied the latest Lazarus source code from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/ - LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" jobs: - build_aarch64: # Build for Apple silicon Mac architecture - runs-on: macos-latest + build: timeout-minutes: 60 + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. + fail-fast: false + + # Set up an include to perform the following build configurations. + matrix: + include: + - BUILD_TARGET: build_aarch64 + ARCH: aarch64 + RUNS_ON: macos-latest + + - BUILD_TARGET: build_x86_64 + ARCH: x86_64 + RUNS_ON: macos-15-intel + + name: ${{ matrix.BUILD_TARGET }} + runs-on: ${{ matrix.RUNS_ON }} + steps: - uses: actions/checkout@v6 with: submodules: true - - name: Install Free Pascal Compiler (FPC) multi arch version for macOS x86_64 and aarch64 - run: brew install fpc - shell: bash + - name: Install Lazarus IDE + uses: ./.github/actions/install_lazarus - - name: Download Lazarus source code into temp folder + - name: Build trackereditor app for Apple (${{ matrix.ARCH }}) run: | - #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. - cd ${RUNNER_TEMP} - curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }} - tar -xzf *.tar.gz - shell: bash - - - name: Build lazbuild from Lazarus source code - run: | - # make lazbuild and put the link with extra parameter in the temp folder. - LAZARUS_DIR=${RUNNER_TEMP}/lazarus - cd "$LAZARUS_DIR" - make lazbuild - echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild - chmod +x ${RUNNER_TEMP}/lazbuild - # Add lazbuild to the PATH variable. So it can be used in the next steps. - echo ${RUNNER_TEMP} >> $GITHUB_PATH - shell: bash - - - name: Build trackereditor app for Apple silicon (aarch64) - run: | - lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=aarch64 ${{ env.PROJECT_LPI }} + lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=${{ matrix.ARCH }} ${{ env.PROJECT_LPI }} shell: bash - name: Test App SSL connection run: open "${{ env.PROGRAM_NAME_WITH_PATH }}" --args -TEST_SSL shell: bash - - name: Set correct version number in macOS .app bundle Info.plist from metainfo xml file - env: - METAINFO_FILE: metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.metainfo.xml - run: | - TRACKER_EDITOR_VERSION=$(xmllint --xpath "string(/component/releases/release[1]/@version)" $METAINFO_FILE) - echo Program version: $TRACKER_EDITOR_VERSION - plutil -replace CFBundleShortVersionString -string $TRACKER_EDITOR_VERSION ${{ env.MACOS_APP }}/Contents/Info.plist - shell: bash - - - name: Create and set app icon in macOS .app bundle - env: - ICON_FILE: 'metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.png' - run: | - - # ------ Create icon set and move it into the app - iconset_folder="temp_folder.iconset" - rm -rf "${iconset_folder}" - mkdir -p "${iconset_folder}" - - for s in 16 32 128 256 512; do - d=$(($s*2)) - sips -Z $s $ICON_FILE --out "${iconset_folder}/icon_${s}x$s.png" - sips -Z $d $ICON_FILE --out "${iconset_folder}/icon_${s}x$s@2x.png" - done - - # create .icns icon file - iconutil -c icns "${iconset_folder}" -o "iconfile.icns" - rm -r "${iconset_folder}" - - # move icon file to the app - mv -f "iconfile.icns" "${{ env.MACOS_APP }}/Contents/Resources" - - # add icon to plist xml file CFBundleIconFile = "iconfile" - plutil -insert CFBundleIconFile -string "iconfile" "${{ env.MACOS_APP }}/Contents/Info.plist" - shell: bash - - name: Zip the macOS .app bundle for artifact upload + if: matrix.ARCH == 'aarch64' run: ditto -c -k enduser/trackereditor.app enduser/trackereditor_app.zip shell: bash - name: Rename built -aarch64 binary for artifact upload run: | - mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 - ditto -c -k ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64 ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64.zip + mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-${{ matrix.ARCH }} + ditto -c -k ${{ env.PROGRAM_NAME_WITH_PATH }}-${{ matrix.ARCH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-${{ matrix.ARCH }}.zip shell: bash - name: Upload Artifact. uses: actions/upload-artifact@v6 with: - name: artifact-aarch64 + name: artifact-${{ matrix.ARCH }} # Include both the zipped universal app bundle and the aarch64 binary zip path: enduser/*.zip if-no-files-found: error - build_x86_64: # Build for Intel Mac architecture - runs-on: macos-15-intel - timeout-minutes: 60 - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install Free Pascal Compiler (FPC) multi arch version for macOS x86_64 and aarch64 - run: brew install fpc - shell: bash - - - name: Download Lazarus source code into temp folder - run: | - #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. - cd ${RUNNER_TEMP} - curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }} - tar -xzf *.tar.gz - shell: bash - - - name: Build lazbuild from Lazarus source code - run: | - # make lazbuild and put the link with extra parameter in the temp folder. - LAZARUS_DIR=${RUNNER_TEMP}/lazarus - cd "$LAZARUS_DIR" - make lazbuild - echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild - chmod +x ${RUNNER_TEMP}/lazbuild - # Add lazbuild to the PATH variable. So it can be used in the next steps. - echo ${RUNNER_TEMP} >> $GITHUB_PATH - shell: bash - - - name: Build trackereditor app for Intel Mac version (x86_64) - run: | - lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=x86_64 ${{ env.PROJECT_LPI }} - shell: bash - - - name: Test App SSL connection - run: open "${{ env.PROGRAM_NAME_WITH_PATH }}" --args -TEST_SSL - shell: bash - - - name: Rename built -x86_64 binary for artifact upload - run: | - mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 - ditto -c -k ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64 ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64.zip - shell: bash - - - name: Upload Artifact. - uses: actions/upload-artifact@v6 - with: - name: artifact-x86_64 - path: enduser/*.zip - if-no-files-found: error - - create_universal_macOS_binary: # Create Universal binary from aarch64 and x86_64 builds + needs: build runs-on: macos-latest timeout-minutes: 60 - needs: - - build_aarch64 - - build_x86_64 - steps: + - uses: actions/checkout@v6 + with: + sparse-checkout: metainfo + - name: Install create-dmg tool run: brew install create-dmg shell: bash @@ -227,6 +133,42 @@ jobs: run: ls -R enduser/ shell: bash + - name: Set correct version number in macOS .app bundle Info.plist from metainfo xml file + env: + METAINFO_FILE: metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.metainfo.xml + run: | + TRACKER_EDITOR_VERSION=$(xmllint --xpath "string(/component/releases/release[1]/@version)" $METAINFO_FILE) + echo Program version: $TRACKER_EDITOR_VERSION + plutil -replace CFBundleShortVersionString -string $TRACKER_EDITOR_VERSION ${{ env.MACOS_APP }}/Contents/Info.plist + shell: bash + + - name: Create and set app icon in macOS .app bundle + env: + ICON_FILE: 'metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.png' + run: | + + # ------ Create icon set and move it into the app + iconset_folder="temp_folder.iconset" + rm -rf "${iconset_folder}" + mkdir -p "${iconset_folder}" + + for s in 16 32 128 256 512; do + d=$(($s*2)) + sips -Z $s $ICON_FILE --out "${iconset_folder}/icon_${s}x$s.png" + sips -Z $d $ICON_FILE --out "${iconset_folder}/icon_${s}x$s@2x.png" + done + + # create .icns icon file + iconutil -c icns "${iconset_folder}" -o "iconfile.icns" + rm -r "${iconset_folder}" + + # move icon file to the app + mv -f "iconfile.icns" "${{ env.MACOS_APP }}/Contents/Resources" + + # add icon to plist xml file CFBundleIconFile = "iconfile" + plutil -insert CFBundleIconFile -string "iconfile" "${{ env.MACOS_APP }}/Contents/Info.plist" + shell: bash + - name: Create a Universal macOS binary from aarch64 and x86_64 run: | # Create Universal binary using lipo tool diff --git a/.github/workflows/cicd_ubuntu.yaml b/.github/workflows/cicd_ubuntu.yaml index 56fc41c..82de8e1 100644 --- a/.github/workflows/cicd_ubuntu.yaml +++ b/.github/workflows/cicd_ubuntu.yaml @@ -15,9 +15,6 @@ jobs: build: timeout-minutes: 60 - env: # Use the latest Lazarus source code. Copied from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/ - LAZARUS_URL_TAR_GZ: "https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz" - strategy: # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. fail-fast: false @@ -64,25 +61,15 @@ jobs: with: submodules: true + - name: Install Lazarus IDE + uses: ./.github/actions/install_lazarus + with: + qt_version_ci: ${{ matrix.QT_VERSION_CI }} + - name: Install dependency for all build run: | sudo apt-get update - sudo apt-get install -y fpc xvfb - shell: bash - - - name: Install dependency for gtk2 - if: matrix.QT_VERSION_CI == '' - run: sudo apt-get install -y libgtk2.0-dev - shell: bash - - - name: Install dependency for qt5 - if: matrix.QT_VERSION_CI == '5' - run: sudo apt-get install -y libqt5x11extras5-dev - shell: bash - - - name: Install dependency for qt6 - if: matrix.QT_VERSION_CI == '6' - run: sudo apt-get install -y qt6-base-dev + sudo apt-get install -y xvfb shell: bash - name: Install dependency for AppImage @@ -97,35 +84,6 @@ jobs: chmod +x linuxdeploy-*.AppImage shell: bash - - name: Download Lazarus source code into temp folder - run: | - #Download lazarus source code. Directory 'lazarus' will be created in the temp folder. - cd ${RUNNER_TEMP} - curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }} - tar -xzf *.tar.gz - shell: bash - - - name: Build libQTpas.so - if: matrix.QT_VERSION_CI != '' - run: | - cd "${RUNNER_TEMP}/lazarus/lcl/interfaces/qt${{ matrix.QT_VERSION_CI }}/cbindings/" - /usr/lib/qt${{ matrix.QT_VERSION_CI }}/bin/qmake - make -j$(nproc) - sudo make install - shell: bash - - - name: Build lazbuild from Lazarus source code - run: | - # make lazbuild and put the link with extra parameter in the temp folder. - LAZARUS_DIR=${RUNNER_TEMP}/lazarus - cd "$LAZARUS_DIR" - make lazbuild - echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild - chmod +x ${RUNNER_TEMP}/lazbuild - # Add lazbuild to the PATH variable. So it can be used in the next steps. - echo ${RUNNER_TEMP} >> $GITHUB_PATH - shell: bash - - name: Build trackereditor # Build trackereditor project (Release mode) run: lazbuild --build-all --build-mode=Release ${{ matrix.LAZ_OPT }} source/project/tracker_editor/trackereditor.lpi diff --git a/.github/workflows/cicd_windows.yaml b/.github/workflows/cicd_windows.yaml index 09763b4..8de17cd 100644 --- a/.github/workflows/cicd_windows.yaml +++ b/.github/workflows/cicd_windows.yaml @@ -13,7 +13,7 @@ on: jobs: build: - runs-on: windows-2025 + runs-on: windows-latest timeout-minutes: 60 env: LAZBUILD_WITH_PATH: c:/lazarus/lazbuild @@ -26,7 +26,7 @@ jobs: submodules: true - name: Install Lazarus IDE - run: winget install lazarus --disable-interactivity --accept-source-agreements --silent + uses: ./.github/actions/install_lazarus - name: Download OpenSSL *.dll run: | From 2901803d6901600ddff5f5d2964859d2ad1848d7 Mon Sep 17 00:00:00 2001 From: Gerry Ferdinandus Date: Sat, 27 Dec 2025 22:18:30 +0100 Subject: [PATCH 19/19] add lazbuild in windows PATH lazbuild is already in PATH for Linux and macOS --- .github/actions/install_lazarus/action.yaml | 12 ++++++++++-- .github/workflows/cicd_windows.yaml | 5 ++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/actions/install_lazarus/action.yaml b/.github/actions/install_lazarus/action.yaml index 6063a9b..f62e0c5 100644 --- a/.github/actions/install_lazarus/action.yaml +++ b/.github/actions/install_lazarus/action.yaml @@ -19,8 +19,16 @@ runs: steps: - name: Install Lazarus IDE (Windows) if: runner.os == 'Windows' - run: winget install lazarus --disable-interactivity --accept-source-agreements --silent - shell: powershell + run: | + winget install lazarus --disable-interactivity --accept-source-agreements --silent + echo 'c:/lazarus' >> $GITHUB_PATH + shell: pwsh + + - name: Make PATH also in bash available (Windows) + if: runner.os == 'Windows' + run: | + echo 'c:/lazarus' >> $GITHUB_PATH + shell: bash - name: Install fpc (Linux) if: runner.os == 'Linux' diff --git a/.github/workflows/cicd_windows.yaml b/.github/workflows/cicd_windows.yaml index 8de17cd..05a2fba 100644 --- a/.github/workflows/cicd_windows.yaml +++ b/.github/workflows/cicd_windows.yaml @@ -16,7 +16,6 @@ jobs: runs-on: windows-latest timeout-minutes: 60 env: - LAZBUILD_WITH_PATH: c:/lazarus/lazbuild RELEASE_ZIP_FILE: trackereditor_windows_amd64.zip LAZ_OPT: @@ -38,12 +37,12 @@ jobs: - name: Build Release version # Build trackereditor project (Release mode) - run: ${{ env.LAZBUILD_WITH_PATH }} --build-all --build-mode=Release ${{ env.LAZ_OPT }} source/project/tracker_editor/trackereditor.lpi + run: lazbuild --build-all --build-mode=Release ${{ env.LAZ_OPT }} source/project/tracker_editor/trackereditor.lpi shell: bash - name: Build Unit Test on Windows # Build unit test project (Debug mode) - run: ${{ env.LAZBUILD_WITH_PATH }} --build-all --build-mode=Debug ${{ env.LAZ_OPT }} source/project/unit_test/tracker_editor_test.lpi + run: lazbuild --build-all --build-mode=Debug ${{ env.LAZ_OPT }} source/project/unit_test/tracker_editor_test.lpi shell: bash - name: Run Unit Test on Windows