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.
 
 
 
 
 

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