您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

82 行
1.7 KiB

  1. name: Build
  2. on:
  3. push:
  4. branches: [ master ]
  5. paths-ignore:
  6. - '**.md'
  7. pull_request:
  8. branches: [ master ]
  9. paths-ignore:
  10. - '**.md'
  11. jobs:
  12. build_linux:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v3
  16. with:
  17. submodules: 'recursive'
  18. fetch-depth: 0
  19. - name: Install dependencies
  20. run: sudo apt-get install cmake git gcc libsndfile-dev libpng-dev
  21. - name: Configure cmake
  22. run: cmake -B build -DCMAKE_BUILD_TYPE=Release
  23. - name: Build and package
  24. run: cmake --build build -j$(nproc) && cmake --build build --target package
  25. - name: Upload TGZ package
  26. uses: actions/upload-artifact@v3
  27. with:
  28. name: TGZ package
  29. path: build/aptdec_*.tar.gz
  30. - name: Upload DEB package
  31. uses: actions/upload-artifact@v3
  32. with:
  33. name: Debian package
  34. path: build/aptdec_*.deb
  35. build_windows:
  36. runs-on: ubuntu-latest
  37. steps:
  38. - uses: actions/checkout@v3
  39. with:
  40. submodules: 'recursive'
  41. fetch-depth: 0
  42. - name: Install dependencies
  43. run: sudo apt install cmake git mingw-w64 unzip
  44. - name: Run build script
  45. run: ./build_windows.sh $BUILD_TYPE
  46. - name: Upload ZIP package
  47. uses: actions/upload-artifact@v3
  48. with:
  49. name: ZIP package
  50. path: winbuild/aptdec_*.zip
  51. build_windows_msvc:
  52. runs-on: windows-latest
  53. steps:
  54. - uses: actions/checkout@v3
  55. with:
  56. submodules: 'recursive'
  57. fetch-depth: 0
  58. - name: Run build script
  59. run: vcvarsx86_amd64 & ./build_windows.bat
  60. - name: Upload ZIP package
  61. uses: actions/upload-artifact@v3
  62. with:
  63. name: ZIP package (MSVC)
  64. path: winbuild/aptdec_*.zip