Newer
Older
dub_jkp / .github / workflows / main.yml
@Jan Jurzitza Jan Jurzitza on 15 Feb 2023 3 KB reintroduce dmd-latest to CI runner
  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-11, ubuntu-20.04, windows-2019 ]
  32. dc:
  33. - dmd-latest
  34. - dmd-2.100.2
  35. - ldc-latest
  36. - dmd-master
  37. # - ldc-master
  38. # This is the bootstrap compiler used to compile the releases
  39. - ldc-1.23.0
  40. # Some intermediate compilers for good measure
  41. - dmd-2.095.1
  42. - dmd-2.098.1
  43. include:
  44. - { do_test: true }
  45. - { dc: dmd-2.095.1, do_test: false }
  46. - { dc: dmd-2.098.1, do_test: false }
  47. - { dc: ldc-1.23.0 , do_test: false }
  48.  
  49. runs-on: ${{ matrix.os }}
  50. steps:
  51.  
  52. # Install required dependencies
  53. - name: '[OSX] Install dependencies'
  54. if: runner.os == 'macOS'
  55. run: |
  56. brew install pkg-config coreutils
  57. echo "PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig/" >> $GITHUB_ENV
  58.  
  59. - name: '[Linux] Install dependencies'
  60. if: runner.os == 'Linux'
  61. run: |
  62. sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat
  63.  
  64. # Compiler to test with
  65. - name: Prepare compiler
  66. uses: dlang-community/setup-dlang@v1
  67. with:
  68. compiler: ${{ matrix.dc }}
  69.  
  70. # Checkout the repository
  71. - name: Checkout
  72. uses: actions/checkout@v3
  73.  
  74. - name: '[POSIX] Test'
  75. if: runner.os != 'Windows'
  76. env:
  77. COVERAGE: false
  78. # The value doesn't matter as long as it's > 2.087
  79. FRONTEND: 2.095.0
  80. run: |
  81. dub build --compiler=${{ env.DC }}
  82. if [[ ${{ matrix.do_test }} == 'true' ]]; then
  83. dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
  84. ./scripts/ci/travis.sh
  85. fi
  86.  
  87. - name: '[Windows] Test'
  88. if: runner.os == 'Windows'
  89. env:
  90. DUB: ${{ github.workspace }}\bin\dub.exe
  91. # Only run `dub test` to run unittests so far,
  92. # the test-suite needs to be overhauled to support Windows
  93. run: |
  94. dub build --compiler=${{ env.DC }}
  95. if [[ ${{ matrix.do_test }} == 'true' ]]; then
  96. dub test --compiler=${{ env.DC }}
  97. dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
  98. cd test
  99. dub --single run-unittest.d
  100. fi
  101. shell: bash