Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

build.yml 2.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. env:
  12. BUILD_TYPE: Release
  13. jobs:
  14. build_linux:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v3
  18. with:
  19. submodules: 'recursive'
  20. - name: Install dependencies
  21. # The user does not run as root
  22. run: sudo apt-get install cmake git gcc libsndfile-dev libpng-dev
  23. - name: Create Build Environment
  24. # Some projects don't allow in-source building, so create a separate build directory
  25. # We'll use this as our working directory for all subsequent commands
  26. run: cmake -E make_directory ${{runner.workspace}}/build
  27. - name: Configure CMake
  28. # Use a bash shell so we can use the same syntax for environment variable
  29. # access regardless of the host operating system
  30. shell: bash
  31. working-directory: ${{runner.workspace}}/build
  32. # Note the current convention is to use the -S and -B options here to specify source
  33. # and build directories, but this is only available with CMake 3.13 and higher.
  34. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
  35. run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
  36. - name: Build
  37. working-directory: ${{runner.workspace}}/build
  38. shell: bash
  39. # Execute the build. You can specify a specific target with "--target <NAME>"
  40. run: cmake --build . --config $BUILD_TYPE
  41. - name: Upload compilied binary
  42. uses: actions/upload-artifact@v2
  43. with:
  44. name: aptdec_lin64
  45. path: ${{runner.workspace}}/build/aptdec
  46. build_windows:
  47. runs-on: ubuntu-latest
  48. steps:
  49. - uses: actions/checkout@v2
  50. - name: Install dependencies
  51. # The user does not run as root
  52. run: sudo apt install wget cmake make mingw-w64 git unzip libsndfile-dev
  53. - name: Run build script
  54. shell: bash
  55. working-directory: ${{runner.workspace}}
  56. run: cd $GITHUB_WORKSPACE && ./build_windows.sh $BUILD_TYPE
  57. - name: Upload compilied binary
  58. uses: actions/upload-artifact@v2
  59. with:
  60. name: aptdec-win64.zip
  61. path: ${{runner.workspace}}/aptdec/winbuild/aptdec-1.7.0.zip