update Makefile for minizip #251
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build2 | |
| on: | |
| pull_request: | |
| push: | |
| paths-ignore: | |
| - QT/OBS/* | |
| - QT/docker/Dockerfile* | |
| - QT/freebsd/* | |
| - 3rdParty/*.cmd | |
| - 3rdParty/BuildInstructions/MacOSX/* | |
| - appveyor.yml | |
| # schedule: | |
| # - cron: '0 10 * * 0' | |
| jobs: | |
| prepare: | |
| # if: github.event_name == 'schedule' || ( github.event_name == 'push' && startsWith (github.ref, 'refs/tags/v') ) | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.tag.outputs.tag }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set tag name | |
| id: tag | |
| run: | | |
| if [[ "${{ github.event_name }}" = "schedule" ]]; then | |
| tag=v$(date +%Y-%m-%d.%H%M%S) | |
| elif [[ "${{ github.event_name }}" = "push" ]]; then | |
| if [[ $(basename "${{ github.ref }}" | cut -c1) = v ]] ; then | |
| tag=$(basename "${{ github.ref }}") | |
| fi | |
| fi | |
| echo "tag=$tag" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| if: steps.tag.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| ver=$(echo ${{ steps.tag.outputs.tag }} | cut -c2-) | |
| if [[ "${{ github.event_name }}" = "schedule" ]]; then | |
| git tag ${{ steps.tag.outputs.tag }} | |
| git push --tags | |
| date=$(echo ${{ steps.tag.outputs.tag }} | cut -c2-11) | |
| time=$(echo ${{ steps.tag.outputs.tag }} | cut -c13-) | |
| if (gh release list | cut -f3 | grep -q $date); then | |
| gh release create -p "${{ steps.tag.outputs.tag }}" -t "LDView Snapshot $date $time" | |
| else | |
| gh release create -p "${{ steps.tag.outputs.tag }}" -t "LDView Snapshot $date" | |
| fi | |
| elif [[ "${{ github.event_name }}" = "push" ]]; then | |
| if ( ! echo ${{ steps.tag.outputs.tag }} | grep -q -E 'v[0-9]{4}-[0-9]{2}-[0-9]{2}\.[0-9]{6}' ) ; then | |
| gh release create --draft "${{ steps.tag.outputs.tag }}" --title "LDView $ver" | |
| fi | |
| fi | |
| build-windows-32bit: | |
| if: needs.prepare.outputs.tag != '' | |
| needs: [prepare] | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: Install Visual Studio component WinXP | |
| if: needs.prepare.outputs.tag != '' | |
| shell: cmd | |
| run: | | |
| if exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" "c:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --norestart --add Microsoft.VisualStudio.Component.WinXP | |
| if exist "C:\Program Files\Microsoft Visual Studio\18\Enterprise" "c:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\18\Enterprise" --quiet --norestart --add Microsoft.VisualStudio.Component.WinXP --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 | |
| - name: Build LDView32 | |
| if: needs.prepare.outputs.tag != '' | |
| shell: cmd | |
| run: | | |
| msbuild LDView.vcxproj /p:SolutionDir=%CD%\ /p:Platform=win32 /p:Configuration=Release /p:PlatformToolset=v141_xp /t:build /m /p:XPDeprecationWarning=false | |
| msbuild Launcher\Launcher.vcxproj /p:SolutionDir=%CD%\ /p:Platform=win32 /p:Configuration=Release /p:PlatformToolset=v141_xp /m | |
| msbuild LDViewThumbs\LDViewThumbs.vcxproj /p:SolutionDir=%CD%\ /p:Platform=win32 /p:Configuration=Release /p:PlatformToolset=v143 /m | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: windows-32bit | |
| path: | | |
| Build\Release\LDView.exe | |
| Build\Release\LDView.com | |
| Build\Release\LDViewThumbs.dll | |
| if-no-files-found: error | |
| - name: Build Portable package | |
| if: needs.prepare.outputs.tag != '' | |
| shell: cmd | |
| run: | | |
| for /f "skip=2 tokens=2 delims=," %%i in ('find "ProductVersion" LDView.rc') do set VER=%%i | |
| set VER=%VER:"=% | |
| set VER=%VER: =% | |
| copy LDExporter\LGEO.xml . | |
| copy Build\Release\LDView.exe . | |
| "%PROGRAMFILES%"\7-zip\7z a -bb1 Setup\LDView-portable-%VER%.zip license.txt Readme.txt Help.html ChangeHistory.html m6459.ldr 8464.mpd LGEO.xml "LDView Home Page.url" LDView.exe | |
| del LGEO.xml | |
| del LDView.exe | |
| - name: Upload Portable package | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" Setup\LDView*.zip | |
| build-windows-installer: | |
| if: needs.prepare.outputs.tag != '' | |
| needs: | |
| - prepare | |
| - build-windows | |
| - build-windows-32bit | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: . | |
| - name: Build LDView | |
| shell: cmd | |
| run: | | |
| mkdir Build | |
| mkdir Build\Release | |
| mkdir Build\Release64 | |
| copy windows-32bit\*.* Build\Release\ | |
| copy windows-64bit\*.* Build\Release64\ | |
| "c:\Program Files (x86)\Inno Setup 6\ISCC.exe" LDView64.iss | |
| "c:\Program Files (x86)\Inno Setup 6\ISCC.exe" LDView.iss | |
| - name: Upload Setup | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" Setup\LDView*.exe | |
| build-windows: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: Build LDView | |
| shell: cmd | |
| run: | | |
| if exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" set TOOLSET=v143 | |
| if exist "C:\Program Files\Microsoft Visual Studio\18\Enterprise" set TOOLSET=v145 | |
| msbuild LDView.vcxproj /p:SolutionDir=%CD%\ /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=%TOOLSET% /m | |
| msbuild LDViewThumbs\LDViewThumbs.vcxproj /p:SolutionDir=%CD%\ /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=%TOOLSET% /m | |
| - name: Translation | |
| shell: cmd | |
| run: | | |
| msbuild Translations\Hungarian\Hungarian.vcxproj /p:Platform=x64 /p:Configuration=Release /m | |
| msbuild Translations\German\German.vcxproj /p:Platform=x64 /p:Configuration=Release /m | |
| msbuild Translations\Italian\Italian.vcxproj /p:Platform=x64 /p:Configuration=Release /m | |
| msbuild Translations\Czech\Czech.vcxproj /p:Platform=x64 /p:Configuration=Release /m | |
| - name: Build Portable package | |
| if: needs.prepare.outputs.tag != '' | |
| shell: cmd | |
| run: | | |
| for /f "skip=2 tokens=2 delims=," %%i in ('find "ProductVersion" LDView.rc') do set VER=%%i | |
| set VER=%VER:"=% | |
| set VER=%VER: =% | |
| copy LDExporter\LGEO.xml . | |
| copy Build\Release64\LDView64.exe . | |
| "%PROGRAMFILES%"\7-zip\7z a -bb1 Setup\LDView64-portable-%VER%.zip license.txt Readme.txt Help.html ChangeHistory.html m6459.ldr 8464.mpd LGEO.xml "LDView Home Page.url" LDView64.exe | |
| del LDView64.exe | |
| - name: Upload build artifacts | |
| if: needs.prepare.outputs.tag != '' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: windows-64bit | |
| path: | | |
| Build\Release64\LDView64.exe | |
| Build\Release64\LDViewThumbs64.dll | |
| if-no-files-found: error | |
| - name: Upload Portable package | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" Setup\LDView*.zip | |
| - name: Build BuildPartsCatalog | |
| shell: cmd | |
| run: | | |
| if exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" set TOOLSET=v143 | |
| if exist "C:\Program Files\Microsoft Visual Studio\18\Enterprise" set TOOLSET=v145 | |
| msbuild BuildPartsCatalog\BuildPartsCatalog.vcxproj /p:SolutionDir=%CD%\ /p:Platform=x64 /p:PlatformToolset=%TOOLSET% /p:Configuration=Release /m | |
| - name: Build LGEOTables | |
| shell: cmd | |
| run: | | |
| if exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" set TOOLSET=v143 | |
| if exist "C:\Program Files\Microsoft Visual Studio\18\Enterprise" set TOOLSET=v145 | |
| msbuild LGEOTables\LGEOTables.vcxproj /p:SolutionDir=%CD%\ /p:Platform=x64 /p:PlatformToolset=%TOOLSET% /p:Configuration=Release /m | |
| - name: Build UnMirrorStuds | |
| shell: cmd | |
| run: | | |
| if exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" set TOOLSET=v143 | |
| if exist "C:\Program Files\Microsoft Visual Studio\18\Enterprise" set TOOLSET=v145 | |
| msbuild UnMirrorStuds\UnMirrorStuds.vcxproj /p:SolutionDir=%CD%\ /p:Platform=x64 /p:PlatformToolset=%TOOLSET% /p:Configuration=Release /m | |
| build-ubuntu: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install developement packages | |
| run: sudo ./QT/docker/install-devel-packages.sh | |
| - name: Cache | |
| if: endsWith(github.ref, '/master') | |
| uses: actions/cache@v6 | |
| with: | |
| path: /home/runner/.cache/ccache | |
| key: ubuntu | |
| - name: Build LDView | |
| run: | | |
| cd QT | |
| ./makedeb | |
| - name: CCache Statistics | |
| run: ccache -sv | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" QT/ldview*.deb | |
| build-fedora: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: fedora:latest | |
| steps: | |
| - name: Install Gitea prerequisites | |
| if: github.server_url != 'https://github.com' | |
| run: sudo dnf install -y nodejs | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install developement packages | |
| run: sudo ./QT/docker/install-devel-packages.sh | |
| - name: Install gh package | |
| run: sudo dnf install -y gh | |
| - name: Cache | |
| if: endsWith(github.ref, '/master') | |
| uses: actions/cache@v6 | |
| with: | |
| path: /github/home/.cache/ccache | |
| key: fedora | |
| - name: Build LDView | |
| run: | | |
| export PATH="/usr/lib64/ccache:$PATH" | |
| mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | |
| echo '%_smp_mflags -j4' >> ~/.rpmmacros | |
| rpmbuild -bb --build-in-place --nodebuginfo QT/LDView.spec | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" /github/home/rpmbuild/RPMS/*/ldview*.rpm | |
| - name: Install Qt4 | |
| run: dnf install -y qt-devel | |
| - name: Qt4 build | |
| run: | | |
| cd QT | |
| lrelease-qt4 LDView.pro | |
| qmake-qt4 | |
| make clean | |
| make all -j 4 | |
| - name: Install kio dependency | |
| run: | | |
| dnf install -y cmake extra-cmake-modules kf6-kio-devel | |
| - name: Build kio | |
| run: | | |
| cd QT/kde6 | |
| ./build.sh | |
| - name: Build BuildPartsCatalog | |
| run: | | |
| make -j 4 -C BuildPartsCatalog | |
| - name: Build UnMirrorStuds | |
| run: | | |
| make -j 4 -C UnMirrorStuds | |
| - name: Build LGEOTables | |
| run: | | |
| make -j 4 -C LGEOTables | |
| - name: CCache Statistics | |
| run: ccache -sv | |
| build-opensuse-leap: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: opensuse/leap:latest | |
| steps: | |
| - name: Install prerequisite packages | |
| run: zypper --non-interactive install -y gh tar ccache | |
| - name: Install Gitea prerequisites | |
| if: github.server_url != 'https://github.com' | |
| run: zypper --non-interactive install -y nodejs | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install developement packages | |
| run: ./QT/docker/install-devel-packages.sh | |
| - name: Cache | |
| if: endsWith(github.ref, '/master') | |
| uses: actions/cache@v6 | |
| with: | |
| path: /github/home/.cache/ccache | |
| key: opensuse-leap | |
| - name: Build LDView | |
| run: | | |
| export PATH="/usr/lib64/ccache:$PATH" | |
| mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | |
| echo '%_smp_mflags -j4' >> ~/.rpmmacros | |
| rpmbuild -bb --build-in-place QT/LDView.spec | |
| - name: CCache Statistics | |
| run: ccache -sv | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| rm -f /usr/src/packages/RPMS/*/ldview*debug*.rpm | |
| gh release upload "${{ needs.prepare.outputs.tag }}" /usr/src/packages/RPMS/*/ldview*.rpm | |
| build-appimage: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: opensuse/leap:15.4 | |
| steps: | |
| - name: Install Gitea prerequisites | |
| if: github.server_url != 'https://github.com' | |
| run: zypper --non-interactive install -y nodejs | |
| - name: Install developement packages | |
| run: zypper --non-interactive install git rpm-build rpmlint libqt5-qtbase-devel libqt5-linguist zlib-devel libpng16-compat-devel libjpeg8-devel wget glu-devel gl2ps-devel tinyxml2-devel minizip-devel hostname | |
| - name: Install gh package | |
| run: | | |
| zypper ar https://cli.github.com/packages/rpm/gh-cli.repo | |
| zypper in -y gh ccache || true | |
| - name: Cache | |
| if: endsWith(github.ref, '/master') | |
| uses: actions/cache@v6 | |
| with: | |
| path: /github/home/.ccache | |
| key: appimage | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Build LDView | |
| run: | | |
| cd QT | |
| export PATH=/usr/lib64/ccache:$PATH | |
| qmake-qt5 -spec linux-g++-64 | |
| make -j4 | |
| export APPIMAGE_EXTRACT_AND_RUN=1 | |
| ./appimage.sh | |
| - name: CCache Statistics | |
| run: ccache -s | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" QT/LDView*.AppImage | |
| build-debian: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: debian:latest | |
| steps: | |
| - name: Install Gitea prerequisites | |
| if: github.server_url != 'https://github.com' | |
| run: | | |
| apt-get update | |
| apt-get install -y nodejs | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install developement packages | |
| run: ./QT/docker/install-devel-packages.sh | |
| - name: Install gh package | |
| run: apt-get install -y gh | |
| - name: Cache | |
| if: endsWith(github.ref, '/master') | |
| uses: actions/cache@v6 | |
| with: | |
| path: /github/home/.cache/ccache | |
| key: debian | |
| - name: Build LDView | |
| run: | | |
| cd QT | |
| ./makedeb | |
| - name: CCache Statistics | |
| run: ccache -sv | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" QT/ldview*.deb | |
| build-arch: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: archlinux:latest | |
| steps: | |
| - name: Install Gitea prerequisites | |
| if: github.server_url != 'https://github.com' | |
| run: pacman -Sy --noconfirm nodejs | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install developement packages | |
| run: ./QT/docker/install-devel-packages.sh | |
| - name: Install gh package | |
| run: pacman -Sy --noconfirm github-cli ccache | |
| - name: Cache | |
| if: endsWith(github.ref, '/master') | |
| uses: actions/cache@v6 | |
| with: | |
| path: /.cache/ccache | |
| key: arch | |
| - name: Build LDView | |
| run: | | |
| test -d /.cache || mkdir /.cache | |
| chmod -R og+w /.cache | |
| sed -ibak '/BUILDENV/s/!ccache/ccache/g' /etc/makepkg.conf | |
| echo 'MAKEFLAGS="-j4"' >>/etc/makepkg.conf | |
| cd QT | |
| chmod o+w -R .. | |
| sudo -u nobody makepkg -ef | |
| ls -l ldview*pkg.tar.* | |
| rm -f ldview*debug*pkg.tar.* | |
| - name: CCache Statistics | |
| run: sudo -u nobody ccache -sv | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" QT/ldview*pkg.tar.* | |
| build-alpine: | |
| if: always() | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine:latest | |
| steps: | |
| - name: Install Gitea prerequisites | |
| if: github.server_url != 'https://github.com' | |
| run: apk add nodejs | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install developement packages | |
| run: ./QT/docker/install-devel-packages.sh | |
| - name: Install gh package | |
| run: apk add github-cli ccache tar | |
| - name: Cache | |
| if: endsWith(github.ref, '/master') | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.ccache | |
| key: alpine | |
| - name: Build LDView | |
| run: | | |
| cd .. | |
| mkdir -p /tmp/ldview | |
| cp -f ldview/QT/APKBUILD /tmp/ldview | |
| cp -rf ldview /tmp/ldview/ldview-git | |
| cd /tmp/ldview | |
| tar cfz ldview-git.tar.gz ldview-git | |
| rm -rf ldview-git | |
| export PATH="/usr/lib/ccache/bin:$PATH" | |
| export USE_CCACHE=true | |
| sed -ibak "/#source/s/#//g" APKBUILD | |
| echo "" >>APKBUILD | |
| rm -f APKBUILDbak | |
| abuild -F checksum | |
| abuild-keygen -a -n -i | |
| abuild -F | |
| - name: CCache Statistics | |
| run: ccache -sv | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" /github/home/packages/tmp/*/ldview*.apk | |
| build-mac: | |
| if: always() | |
| runs-on: macos-26 | |
| needs: [prepare] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Build LDView | |
| run: | | |
| cd MacOSX/LDView | |
| xcodebuild | |
| ./builddmg.sh build/Release/LDView.app | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" MacOSX/LDView/distrib/LDView*.dmg | |
| - name: Build LGEOTables | |
| run: | | |
| cd MacOSX/LGEOTables | |
| xcodebuild | |
| - name: Build BuildPartsCatalog | |
| run: | | |
| cd MacOSX/BuildPartsCatalog | |
| xcodebuild -scheme BuildPartsCatalog | |
| build-freebsd: | |
| if: needs.prepare.outputs.tag != '' | |
| runs-on: ubuntu-latest | |
| needs: [prepare] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Build FreeBSD | |
| uses: vmactions/freebsd-vm@v1 | |
| with: | |
| release: "15.1" | |
| run: | | |
| pkg install -y git wget gmake gl2ps tinyxml2 mesa-libs freeglut libglvnd minizip desktop-file-utils shared-mime-info ccache qt6-base qt6-tools | |
| git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports | |
| cd QT/freebsd | |
| make GH_TAGNAME=$GITHUB_SHA WITH_CCACHE_BUILD=yes fetch | |
| make GH_TAGNAME=$GITHUB_SHA WITH_CCACHE_BUILD=yes makesum | |
| make GH_TAGNAME=$GITHUB_SHA WITH_CCACHE_BUILD=yes extract | |
| make GH_TAGNAME=$GITHUB_SHA WITH_CCACHE_BUILD=yes | |
| make GH_TAGNAME=$GITHUB_SHA WITH_CCACHE_BUILD=yes package | |
| ccache -s | |
| mv -f work/pkg/ldview*.pkg $(echo work/pkg/ldview*.pkg| sed 's/\.pkg$/\.freebsd'$(freebsd-version | cut -f1 -d-)'\.pkg/g') | |
| - name: Upload packages | |
| if: needs.prepare.outputs.tag != '' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh release upload "${{ needs.prepare.outputs.tag }}" QT/freebsd/work/pkg/ldview*.pkg | |
| cleanup: | |
| if: github.event_name == 'schedule' | |
| needs: | |
| - prepare | |
| - build-windows-installer | |
| - build-ubuntu | |
| - build-fedora | |
| - build-opensuse-leap | |
| - build-alpine | |
| - build-debian | |
| - build-appimage | |
| - build-arch | |
| - build-mac | |
| - build-freebsd | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate download table | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| BASE="https://github.com/${{ github.repository }}/releases/download/${{ needs.prepare.outputs.tag }}" | |
| gh release view "${{ needs.prepare.outputs.tag }}" |grep asset: | cut -f2 >/tmp/assets | |
| cat >/tmp/Downloads.md <<EOF | |
| | Platform | Package | | |
| |---|---| | |
| | Windows 10/11 x64| [installer64](${BASE}/$(grep -E 'LDView64.*exe' /tmp/assets)),[portable64](${BASE}/$(grep -E 'LDView64-portable.*zip' /tmp/assets)) | | |
| | Windows XP | [installerXP](${BASE}/$(grep -E 'LDView-.*exe' /tmp/assets)),[portableXP](${BASE}/$(grep -E 'LDView-portable.*zip' /tmp/assets)) | | |
| | MacOS | [dmg](${BASE}/$(grep -E 'LDView.*dmg' /tmp/assets)) | | |
| | Appimage | [appimage](${BASE}/LDView-x86_64.AppImage) | | |
| | AlpineLinux | [qt6](${BASE}/$(grep -E 'ldview-[0-9].*\.apk' /tmp/assets)) , [qt5](${BASE}/$(grep -E 'ldview-qt5.*\.apk' /tmp/assets)) , [osmesa](${BASE}/$(grep -E 'ldview-osmesa.*\.apk' /tmp/assets))| | |
| | Arch | [qt6](${BASE}/$(grep -E 'ldview-[0-9].*pkg\.tar\.zst' /tmp/assets)) , [qt5](${BASE}/$(grep -E 'ldview-qt5.*pkg\.tar\.zst' /tmp/assets)) , [osmesa](${BASE}/$(grep -E 'ldview-osmesa.*pkg.tar.zst' /tmp/assets)) | | |
| | Debian $(grep -E 'ldview_[0-9].*debian.*deb' /tmp/assets|grep -Eo 'debian-[a-z]*' | sed 's/debian-//g' ) | [qt6](${BASE}/$(grep -E 'ldview_[0-9].*debian.*deb' /tmp/assets)) , [qt5](${BASE}/$(grep -E 'ldview-qt5.*debian.*deb' /tmp/assets)) , [osmesa](${BASE}/$(grep -E 'ldview-osmesa.*debian.*deb' /tmp/assets)) | | |
| | Fedora $(grep -E 'ldview-[0-9].*fc.*rpm' /tmp/assets|grep -Eo 'fc[0-9]*\.' |grep -Eo '[0-9]*') | [qt6](${BASE}/$(grep -E 'ldview-[0-9].*fc.*rpm' /tmp/assets)) , [qt5](${BASE}/$(grep -E 'ldview-qt5.*fc.*rpm' /tmp/assets)) , [osmesa](${BASE}/$(grep -E 'ldview-osmesa.*fc.*rpm' /tmp/assets)) | | |
| | openSUSE $(grep -E 'ldview-[0-9].*openSUSE.*rpm' /tmp/assets|grep -Eo 'openSUSE[0-9]*'|sed 's/openSUSE//' |sed -E 's/([0-9]{2})([0-9])/\1\.\2/g' ) | [qt6](${BASE}/$(grep -E 'ldview-[0-9].*openSUSE.*rpm' /tmp/assets)) , [qt5](${BASE}/$(grep -E 'ldview-qt5.*openSUSE.*rpm' /tmp/assets)) , [osmesa](${BASE}/$(grep -E 'ldview-osmesa.*openSUSE.*rpm' /tmp/assets)) | | |
| | Ubuntu $(grep -E 'ldview_[0-9].*ubuntu.*deb' /tmp/assets|grep -Eo 'ubuntu-[0-9]*\.[0-9]*' | sed 's/ubuntu-//g' ) | [qt6](${BASE}/$(grep -E 'ldview_[0-9].*ubuntu.*deb' /tmp/assets)) , [qt5](${BASE}/$(grep -E 'ldview-qt5.*ubuntu.*deb' /tmp/assets)) , [osmesa](${BASE}/$(grep -E 'ldview-osmesa.*ubuntu.*deb' /tmp/assets)) | | |
| | FreeBSD $(grep -Eo 'freebsd[0-9]*\.[0-9]*' /tmp/assets | sed 's/freebsd//') | [pkg](${BASE}/$(grep -E 'ldview.*freebsd.*pkg' /tmp/assets)) | | |
| EOF | |
| gh release edit "${{ needs.prepare.outputs.tag }}" -F /tmp/Downloads.md | |
| - name: Remove old releases | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| gh release list |cut -f3|grep -v "${{ needs.prepare.outputs.tag }}"| grep -E 'v[0-9]{4}-[0-9]{2}-[0-9]{2}\.[0-9]{6}'|sort -nr|tail -n+2|\ | |
| (while read tag ; do | |
| echo Remove release for tag: $tag | |
| gh release delete -y $tag | |
| git tag -d $tag | |
| git push --delete origin $tag | |
| done) |