You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

78 lines
2.3 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. 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@v3
  50. with:
  51. submodules: 'recursive'
  52. - name: Install dependencies
  53. # The user does not run as root
  54. run: sudo apt install wget cmake make mingw-w64 git unzip libsndfile-dev
  55. - name: Run build script
  56. shell: bash
  57. working-directory: ${{runner.workspace}}
  58. run: cd $GITHUB_WORKSPACE && ./build_windows.sh $BUILD_TYPE
  59. - name: Upload compilied binary
  60. uses: actions/upload-artifact@v2
  61. with:
  62. name: aptdec-win64.zip
  63. path: ${{runner.workspace}}/aptdec/winbuild/aptdec-1.7.0.zip