Merge pull request #93 from UltraStar-Deluxe/report_fix #214
Workflow file for this run
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: Build | |
| on: | |
| push: | |
| branches: "*" | |
| tags: | |
| - "[0-9].[0-9].[0-9]" | |
| pull_request: | |
| jobs: | |
| build_windows: | |
| name: Build for Windows | |
| runs-on: windows-2025 | |
| env: | |
| TAGLIB_VERSION: 2.1.1 | |
| ZENLIB_VERSION: 490e2426aa96f983c577a02861e2a9cf6f73082f | |
| ZLIB_VERSION: 9d0c46d9104e1e79fbd6665ca2854e5b0435e536 | |
| LIBMEDIAINFO_VERSION: 25.09 | |
| LIBEBUR128_VERSION: 1.2.6 | |
| steps: | |
| - name: Set up MSVC Environment | |
| uses: compnerd/gha-setup-vsdevenv@main | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: "6.5.*" | |
| modules: qtmultimedia | |
| - name: Install NSIS | |
| run: choco install nsis | |
| - name: Install Taglib | |
| run: | | |
| git clone --recurse-submodules https://github.com/taglib/taglib.git | |
| cd taglib | |
| git checkout tags/v${{env.TAGLIB_VERSION}} | |
| cmake -B build -G "Visual Studio 17 2022" -A x64 -DWITH_ZLIB=OFF -DBUILD_SHARED_LIBS=ON -DENABLE_STATIC_RUNTIME=OFF -DBUILD_TESTING=OFF | |
| msbuild build/install.vcxproj -p:Configuration=Release | |
| cp -r "C:/Program Files/taglib/include/taglib" ../include | |
| copy build/taglib/Release/tag.dll ../lib/win64 | |
| copy build/taglib/Release/tag.lib ../lib/win64 | |
| - name: Install libmediainfo | |
| run: | | |
| git clone https://github.com/MediaArea/ZenLib.git | |
| git -C ZenLib checkout ${{env.ZENLIB_VERSION}} | |
| git clone https://github.com/MediaArea/zlib.git | |
| git -C zlib checkout ${{env.ZLIB_VERSION}} | |
| git clone https://github.com/MediaArea/MediaInfoLib.git | |
| git -C MediaInfoLib checkout tags/v${{env.LIBMEDIAINFO_VERSION}} | |
| cd MediaInfoLib | |
| cmake -S Project/CMake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_BINDIR="${{ github.workspace }}/lib/win64" -DCMAKE_INSTALL_LIBDIR="${{ github.workspace }}/lib/win64" | |
| cmake --build build --config release --target install | |
| - name: Install libebur128 | |
| run: | | |
| git clone https://github.com/jiixyj/libebur128.git | |
| cd libebur128 | |
| git checkout tags/v${{env.LIBEBUR128_VERSION}} | |
| cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_INCLUDEDIR="${{ github.workspace }}/include" -DCMAKE_INSTALL_BINDIR="${{ github.workspace }}/lib/win64" -DCMAKE_INSTALL_LIBDIR="${{ github.workspace }}/lib/win64" | |
| cmake --build build --config release --target install | |
| - name: Install cld2 | |
| run: | | |
| cd include/cld2/internal | |
| cl /TP /GR /EHsc /c /MD cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc compact_lang_det_impl.cc debug.cc fixunicodevalue.cc generated_entities.cc generated_language.cc generated_ulscript.cc getonescriptspan.cc lang_script.cc offsetmap.cc scoreonescriptspan.cc tote.cc utf8statetable.cc cld_generated_cjk_uni_prop_80.cc cld2_generated_cjk_compatible.cc cld_generated_cjk_delta_bi_32.cc generated_distinct_bi_0.cc cld2_generated_quad0122.cc cld2_generated_deltaocta0122.cc cld2_generated_distinctocta0122.cc cld_generated_score_quad_octa_0122.cc | |
| lib /out:cld2.lib *.obj | |
| copy cld2.lib ../../../lib/win64 | |
| - name: Build UltraStar-Manager | |
| run: | | |
| mkdir bin/release | |
| cp "C:/Program Files/taglib/bin/tag.dll" bin/release/ | |
| cp lib/win64/ebur128.dll bin/release/ | |
| qmake6 -r -spec win32-msvc | |
| nmake | |
| - name: Upload Portable Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: WIN64-UltraStar-Manager-portable | |
| path: bin/release | |
| if-no-files-found: error | |
| - name: Upload Installer Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: WIN64-UltraStar-Manager-installer | |
| path: bin/UltraStar-Manager*-setup.exe | |
| if-no-files-found: error | |
| build_mac: | |
| name: Build for MacOS (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-15-intel, macos-14] | |
| fail-fast: false | |
| steps: | |
| - name: Get Number of CPU Cores | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| id: cpu-cores | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Determine Arch | |
| run: | | |
| if [ "${{ matrix.os }}" = "macos-15-intel" ]; then | |
| echo "arch=x86" >> $GITHUB_ENV | |
| echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV | |
| else | |
| echo "arch=ARM" >> $GITHUB_ENV | |
| fi | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: "6.8.3" | |
| modules: qtmultimedia | |
| - name: Install Other Dependencies | |
| run: | | |
| brew install taglib | |
| brew install libmediainfo | |
| brew install libebur128 | |
| brew install create-dmg | |
| - name: Install cld2 | |
| run: | | |
| mkdir lib/MacOS | |
| cd include | |
| patch cld2/internal/compile_libs.sh cld2-mac-compile.patch | |
| cd cld2/internal/ | |
| export CFLAGS="-Wno-narrowing -O3" | |
| ./compile_libs.sh | |
| cp libcld2.dylib ../../../lib/MacOS | |
| - name: Build plugins | |
| run: | | |
| cd src/plugins/audiotag/ | |
| qmake6 audiotag.pro | |
| make -j${{ steps.cpu-cores.outputs.count }} | |
| cd ../cleanup/ | |
| qmake6 cleanup.pro | |
| make -j${{ steps.cpu-cores.outputs.count }} | |
| cd ../lyric/ | |
| qmake6 lyric.pro | |
| make -j${{ steps.cpu-cores.outputs.count }} | |
| cd ../preparatory/ | |
| qmake6 preparatory.pro | |
| make -j${{ steps.cpu-cores.outputs.count }} | |
| cd ../rename/ | |
| qmake6 rename.pro | |
| make -j${{ steps.cpu-cores.outputs.count }} | |
| - name: Build UltraStar-Manager | |
| run: | | |
| cd src | |
| qmake6 UltraStar-Manager.pro | |
| make -j$${{ steps.cpu-cores.outputs.count }} | |
| cd ../bin/release | |
| mv UltraStar-Manager.dmg MAC-${{ env.arch }}-UltraStar-Manager.dmg | |
| - name: Set Executable Bit For Portable | |
| run: chmod +x bin/release/UltraStar-Manager.app/Contents/MacOS/UltraStar-Manager | |
| - name: Upload Portable Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MAC-${{ env.arch }}-UltraStar-Manager-portable | |
| path: | | |
| bin/release | |
| !bin/release/*.dmg | |
| if-no-files-found: error | |
| - name: Upload Image Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MAC-${{ env.arch }}-UltraStar-Manager-image | |
| path: bin/release/MAC-${{ env.arch }}-UltraStar-Manager.dmg | |
| if-no-files-found: error | |
| build_linux: | |
| name: Build for Linux | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Get Number of CPU Cores | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| id: cpu-cores | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: "6.5.*" | |
| modules: qtmultimedia | |
| - name: Remove libunwind # workaround for libunwind conflicts on Ubuntu 22.04, see https://github.com/actions/runner-images/issues/9546 | |
| run: sudo apt remove libunwind-* | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt update -qq | |
| sudo apt install -y libgl1-mesa-dev build-essential libpulse-mainloop-glib0 libgstreamer-plugins-base1.0-dev | |
| sudo apt install -y libtag1-dev libcld2-dev libmediainfo-dev libebur128-dev | |
| sudo apt install -y libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb-dev libxkbcommon-x11-0 libxcb-cursor0 libgtk2.0-dev libfuse2 | |
| - name: Build UltraStar-Manager | |
| run: | | |
| qmake6 | |
| make -j${{ steps.cpu-cores.outputs.count }} | |
| - name: Create AppImage | |
| run: | | |
| cd bin/release | |
| wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage | |
| chmod a+x linuxdeployqt*.AppImage | |
| cp ../../setup/unix/UltraStar-Manager.desktop . | |
| cp ../../setup/unix/UltraStar-Manager.png . | |
| sed -i "s/Name=UltraStar Manager/Name=LINUX-UltraStar-Manager/g" UltraStar-Manager.desktop | |
| ./linuxdeployqt*.AppImage UltraStar-Manager.desktop -bundle-non-qt-libs -appimage | |
| mv LINUX-UltraStar-Manager-*.AppImage LINUX-UltraStar-Manager.AppImage | |
| - name: Upload AppImage Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: LINUX-UltraStar-Manager-appimage | |
| path: bin/release/LINUX-UltraStar-Manager.AppImage | |
| if-no-files-found: error | |
| draft_release: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| name: Draft a Release | |
| needs: [build_windows, build_mac, build_linux] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download Artifacts from Build Jobs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: . | |
| pattern: "*" | |
| - name: Prepare Artifacts | |
| run: | | |
| zip -r MAC-x86-UltraStar-Manager-portable.zip MAC-x86-UltraStar-Manager-portable | |
| zip -r MAC-ARM-UltraStar-Manager-portable.zip MAC-ARM-UltraStar-Manager-portable | |
| zip -r WIN64-UltraStar-Manager-portable.zip WIN64-UltraStar-Manager-portable | |
| mv WIN64-UltraStar-Manager-installer/UltraStar-Manager* WIN64-UltraStar-Manager-installer/WIN64-UltraStar-Manager-setup.exe | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: "LINUX-UltraStar-Manager-appimage/*, MAC-x86-UltraStar-Manager-image/*, MAC-x86-UltraStar-Manager-portable.zip, MAC-ARM-UltraStar-Manager-image/*, MAC-ARM-UltraStar-Manager-portable.zip, WIN64-UltraStar-Manager-installer/*, WIN64-UltraStar-Manager-portable.zip" | |
| draft: true | |
| artifactErrorsFailBuild: true |