main.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. runs-on: ${{ matrix.os }}
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Install Qt 5.15.2
  17. uses: jurplel/install-qt-action@v2
  18. with:
  19. version: "5.15.2"
  20. modules: "qtwebengine"
  21. - name: Install dependencies
  22. run: |
  23. brew update
  24. grep -v libx /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/cairo.rb | grep -v enable-x > _tmp
  25. mv _tmp /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/cairo.rb
  26. brew install cairo --build-from-source
  27. brew install harfbuzz --build-from-source
  28. brew install libass --build-from-source
  29. sed 's/args = %W\[/& --enable-static --disable-shared/g' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ffmpeg.rb > _tmp
  30. mv _tmp /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ffmpeg.rb
  31. brew install ffmpeg --build-from-source
  32. brew install ninja
  33. grep -v enable-javascript /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mpv.rb | grep -v mujs > _tmp
  34. mv _tmp /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mpv.rb
  35. brew install mpv --build-from-source
  36. - name: Debug build and test
  37. run: |
  38. ./download_webclient.sh
  39. cd build
  40. cmake -GNinja -DQTROOT=$Qt5_DIR -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
  41. ninja install
  42. - name: Archive production artifacts
  43. uses: actions/upload-artifact@v2
  44. with:
  45. name: macos
  46. path: ${{ github.workspace }}/build/output/Jellyfin\ Media\ Player.dmg
  47. build-win:
  48. strategy:
  49. matrix:
  50. os: [windows-latest]
  51. runs-on: ${{ matrix.os }}
  52. steps:
  53. - uses: actions/checkout@v2
  54. - name: Install QT
  55. run: |
  56. python -m pip install aqtinstall==1.1.3
  57. python -m aqt install 5.15.2 windows desktop win64_msvc2019_64 -m qtwebengine -O D:\a\Qt
  58. shell: cmd
  59. - name: Install dependencies
  60. run: |
  61. ./download_webclient.sh
  62. sed -i 's#Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\#'"$(ls -d "/c/Program Files (x86)/Microsoft Visual Studio/2019/"*"/VC/Redist/MSVC/v"* | head -n 1 | sed 's#/c/##g' | tr '/' '\\' | sed 's/\\/\\\\/g')\\\\#g" bundle/win/Bundle.wxs
  63. curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip
  64. unzip ninja.zip
  65. mv ninja.exe build/
  66. curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20210404-git-dd86f19.7z/download > mpv.7z
  67. 7z x mpv.7z
  68. mv include mpv
  69. mkdir include
  70. mv mpv include
  71. mkdir mpv
  72. mv include mpv
  73. mv mpv-1.dll mpv/mpv.dll
  74. mv mpv.def libmpv.dll.a mpv/
  75. mv mpv build/
  76. shell: bash
  77. - name: Build
  78. run: |
  79. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  80. cd build
  81. set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
  82. cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=D:/a/Qt/5.15.2/msvc2019_64 -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/mpv.dll -DCMAKE_INSTALL_PREFIX=output ..
  83. lib /def:mpv\mpv.def /out:mpv\mpv.dll.lib /MACHINE:X64
  84. ninja
  85. ninja windows_package
  86. shell: cmd
  87. - name: Archive production artifacts
  88. uses: actions/upload-artifact@v2
  89. with:
  90. name: windows
  91. path: ${{ github.workspace }}/build/JellyfinMediaPlayer-*-windows-x64.exe
  92. build-ubuntu:
  93. strategy:
  94. matrix:
  95. os: [ubuntu-latest]
  96. tag: [focal, groovy]
  97. runs-on: ${{ matrix.os }}
  98. steps:
  99. - uses: actions/checkout@v2
  100. - name: Docker Build
  101. run: |
  102. docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} --build-arg IMG=ubuntu deployment
  103. docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} builddeb
  104. - name: Archive production artifacts
  105. uses: actions/upload-artifact@v2
  106. with:
  107. name: ubuntu-${{ matrix.tag }}
  108. path: ${{ github.workspace }}/deployment/dist/*
  109. build-debian:
  110. strategy:
  111. matrix:
  112. os: [ubuntu-latest]
  113. tag: [buster, bullseye]
  114. runs-on: ${{ matrix.os }}
  115. steps:
  116. - uses: actions/checkout@v2
  117. - name: Docker Build
  118. run: |
  119. docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} deployment
  120. docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} builddeb
  121. - name: Archive production artifacts
  122. uses: actions/upload-artifact@v2
  123. with:
  124. name: debian-${{ matrix.tag }}
  125. path: ${{ github.workspace }}/deployment/dist/*