Newer
Older
dub_jkp / .github / workflows / main.yml
@drug007 drug007 on 23 Dec 2020 2 KB Renaming a file
  1. # Cross platform tests for DUB
  2.  
  3. name: Testsuite
  4.  
  5. # Only triggers on pushes to master & stable, as well as PR to master and stable
  6. # Sometimes reverts appear in the upstream repository (e.g. when the revert button
  7. # is clicked by a contributor with commit access), this should be tested as PR).
  8. #
  9. # Also note that Github actions does not retrigger on target branch changes,
  10. # hence the check on push.
  11. on:
  12. pull_request:
  13. branches:
  14. - master
  15. - stable
  16. push:
  17. branches:
  18. - master
  19. - stable
  20. # Use this branch name in your fork to test changes
  21. - github-actions
  22.  
  23. jobs:
  24. main:
  25. name: Run
  26. strategy:
  27. # Default, disable if you want to debug
  28. fail-fast: false
  29. matrix:
  30. # Latest stable version, update at will
  31. os: [ macOS-10.15, ubuntu-18.04, windows-2019 ]
  32. dc: [ dmd-2.093.1, ldc-1.23.0, dmd-master, ldc-master ]
  33.  
  34. runs-on: ${{ matrix.os }}
  35. steps:
  36.  
  37. # Install required dependencies
  38. - name: '[OSX] Install dependencies'
  39. if: runner.os == 'macOS'
  40. run: |
  41. brew install pkg-config coreutils
  42. echo "PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig/" >> $GITHUB_ENV
  43.  
  44. - name: '[Linux] Install dependencies'
  45. if: runner.os == 'Linux'
  46. run: |
  47. sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat
  48.  
  49. # Compiler to test with
  50. - name: Prepare compiler
  51. uses: mihails-strasuns/setup-dlang@v1
  52. with:
  53. compiler: ${{ matrix.dc }}
  54.  
  55. # Checkout the repository
  56. - name: Checkout
  57. uses: actions/checkout@v2
  58.  
  59. - name: '[POSIX] Test'
  60. if: runner.os != 'Windows'
  61. env:
  62. COVERAGE: false
  63. # The value doesn't matter as long as it's > 2.087
  64. FRONTEND: 2.093.0
  65. run: |
  66. dub build --compiler=${{ env.DC }}
  67. dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
  68. ./scripts/ci/travis.sh
  69.  
  70. - name: '[Windows] Test'
  71. if: runner.os == 'Windows'
  72. # Only run `dub test` to run unittests so far,
  73. # the test-suite needs to be overhauled to support Windows
  74. run: |
  75. dub build --compiler=${{ env.DC }}
  76. dub test --compiler=${{ env.DC }}
  77. dub run --compiler=${{ env.DC }} --single test\issue2051_running_unittests_from_dub_single_file_packages_fails.d