main.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. name: build
  2. on:
  3. push:
  4. branches:
  5. - release
  6. jobs:
  7. # build-mac:
  8. # strategy:
  9. # matrix:
  10. # # windows builds may need to specify building 64bit target:
  11. # # if [[ "$OSTYPE" == "msys" ]]; then export WINEXTRA="-DCMAKE_GENERATOR_PLATFORM=x64"; else export WINEXTRA=""; fi
  12. # os: [macOS-latest]
  13. # qt: [5.15.2]
  14. # runs-on: ${{ matrix.os }}
  15. # steps:
  16. # - uses: actions/checkout@v2
  17. # - name: Install Qt ${{ matrix.qt }}
  18. # uses: jurplel/install-qt-action@v2
  19. # with:
  20. # version: ${{ matrix.qt }}
  21. # modules: "qtwebengine"
  22. # - name: Install dependencies
  23. # run: |
  24. # brew update
  25. # grep -v libx /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/cairo.rb | grep -v enable-x > _tmp
  26. # mv _tmp /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/cairo.rb
  27. # brew install cairo --build-from-source
  28. # brew install harfbuzz --build-from-source
  29. # brew install libass --build-from-source
  30. # sed 's/args = %W\[/& --enable-static --disable-shared/g' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ffmpeg.rb > _tmp
  31. # mv _tmp /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ffmpeg.rb
  32. # brew install ffmpeg --build-from-source
  33. # brew install ninja
  34. # grep -v enable-javascript /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mpv.rb | grep -v mujs > _tmp
  35. # mv _tmp /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mpv.rb
  36. # brew install mpv --build-from-source
  37. # - name: Debug build and test
  38. # run: |
  39. # ./download_webclient.sh
  40. # cd build
  41. # cmake -GNinja -DQTROOT=$Qt5_DIR -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
  42. # ninja install
  43. # - name: Archive production artifacts
  44. # uses: actions/upload-artifact@v2
  45. # with:
  46. # name: bundle.dmg
  47. # path: ${{ github.workspace }}/build/output/Jellyfin\ Media\ Player.dmg
  48. build-win:
  49. strategy:
  50. matrix:
  51. os: [windows-latest]
  52. qt: [5.15.2]
  53. runs-on: ${{ matrix.os }}
  54. steps:
  55. - uses: actions/checkout@v2
  56. - name: Install Qt ${{ matrix.qt }}
  57. uses: jurplel/install-qt-action@v2
  58. with:
  59. version: ${{ matrix.qt }}
  60. modules: "qtwebengine"
  61. arch: "win64_msvc2019_64"
  62. - name: Install dependencies
  63. run: |
  64. ./download_webclient.sh
  65. curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip
  66. unzip ninja.zip
  67. mv ninja.exe build/
  68. curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20210404-git-dd86f19.7z/download > mpv.7z
  69. 7z x mpv.7z
  70. mv include mpv
  71. mkdir include
  72. mv mpv include
  73. mkdir mpv
  74. mv include mpv
  75. mv mpv-1.dll mpv/mpv.dll
  76. mv mpv.def libmpv.dll.a mpv/
  77. mv mpv build/
  78. shell: bash
  79. - name: Build
  80. run: |
  81. cd build
  82. set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin
  83. cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=Qt/5.15.2/msvc2019_64 -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/mpv.dll -DCMAKE_INSTALL_PREFIX=output ..
  84. lib /def:mpv\mpv.def /out:mpv\mpv.dll.lib /MACHINE:X64
  85. ninja
  86. ninja windows_package
  87. - name: Archive production artifacts
  88. uses: actions/upload-artifact@v2
  89. with:
  90. name: installer.exe
  91. path: ${{ github.workspace }}/build/JellyfinMediaPlayer-*-windows-x64.exe