ci.yml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. name: CI
  2. on:
  3. # on each push and manual trigger
  4. push:
  5. branches: [ master ]
  6. paths-ignore: [ "**/Readme.md" ]
  7. workflow_dispatch:
  8. jobs:
  9. build:
  10. runs-on: ${{ matrix.operating-system }}
  11. strategy:
  12. matrix:
  13. operating-system: [ubuntu-latest, windows-latest, macos-latest]
  14. # currently stable="Lazarus 2.2.0 / FPC 3.2.2" with [email protected]
  15. lazarus-versions: [stable]
  16. steps:
  17. - uses: actions/checkout@v2
  18. - name: Install Lazarus
  19. uses: gcarreno/[email protected]
  20. with:
  21. lazarus-version: ${{ matrix.lazarus-versions }}
  22. - name: Print Lazarus version
  23. run: lazbuild --version
  24. - name: Setup Linux
  25. if: runner.os == 'Linux'
  26. shell: bash
  27. run: |
  28. # needed for SDL and GL demos
  29. sudo apt install libsdl1.2-dev -y
  30. # to build LCL demos with Qt5 backend
  31. sudo apt install libqt5pas-dev -y
  32. - name: Build demos with FPC (Linux)
  33. if: runner.os == 'Linux'
  34. shell: bash
  35. run: |
  36. cd Scripts
  37. ./BuildDemosFPC.sh
  38. ./BuildExtDemosFPC.sh
  39. ./Clean.sh --clean-also-bin-dirs
  40. - name: Build demos with Lazarus
  41. shell: bash
  42. run: |
  43. cd Demos/ObjectPascal
  44. lazbuild --bm="Release" "Benchmark/Bench.lpi"
  45. lazbuild --bm="Release" "VampConvert/VampConvert.lpi"
  46. if [ "$RUNNER_OS" == "Linux" ]; then
  47. lazbuild --ws=qt5 --bm="Release" "LCLImager/lclimager.lpi"
  48. lazbuild --ws=qt5 --bm="Release" "ImageBrowser/ImgBrowser.lpi"
  49. fi
  50. if [ "$RUNNER_OS" != "macOS" ]; then
  51. lazbuild --bm="Release" "LCLImager/lclimager.lpi"
  52. lazbuild --bm="Release" "ImageBrowser/ImgBrowser.lpi"
  53. lazbuild --bm="Release" "OpenGLDemo/OpenGLDemo.lpi"
  54. lazbuild --bm="Release" "SDLDemo/SDLDemo.lpi"
  55. fi
  56. if [ "$RUNNER_OS" == "Windows" ]; then
  57. lazbuild --bm="Release" "D3DDemo/D3DDemo.lpi"
  58. fi
  59. if [ "$RUNNER_OS" == "macOS" ]; then
  60. lazbuild --ws=cocoa --bm="Release" "LCLImager/lclimager.lpi"
  61. lazbuild --ws=cocoa --bm="Release" "ImageBrowser/ImgBrowser.lpi"
  62. fi
  63. - name: List Demos Bin directory
  64. shell: bash
  65. run: ls Demos/Bin
  66. - name: Run demos
  67. shell: bash
  68. run: |
  69. cd Demos/Bin
  70. ./Bench
  71. ./VampConvert -h
  72. - name: Compile Lazarus Packages
  73. shell: bash
  74. run: |
  75. lazbuild "Packages/VampyreImagingPackage.lpk"
  76. lazbuild "Packages/VampyreImagingPackageExt.lpk"
  77. - uses: actions/upload-artifact@v2
  78. with:
  79. name: ci-artifacts-${{ matrix.operating-system }}-laz-${{ matrix.lazarus-versions }}
  80. # exclude compiled units etc.
  81. path: |
  82. Demos/Bin
  83. !Demos/Bin/Dcu
  84. if-no-files-found: error