name: run-tests on: pull_request: push: branches: - master defaults: run: shell: bash jobs: main: name: Run all tests # Only run for the main repository - not forks if: ${{ github.repository == 'dlang-community/D-Scanner' }} # Run permutations of common os + host compilers strategy: fail-fast: false matrix: compiler: [ dmd-latest, ldc-latest, gdc-12, ] host: [ ubuntu-22.04, macos-latest, windows-latest, ] build: [ { type: make }, { type: dub, version: 'current' }, { type: dub, version: 'min libdparse' }, # Fail due to unresolvable dependencies # { type: dub, version: 'max libdparse' }, # { type: dub, version: 'min dsymbol' }, # { type: dub, version: 'max dsymbol' }, ] exclude: # Restrict GDC to Ubuntu - compiler: gdc-12 host: windows-latest - compiler: gdc-12 host: macos-latest include: - { do_report: 1, build: { type: dub, version: 'current' }, host: 'ubuntu-22.04', compiler: dmd-latest } runs-on: ${{ matrix.host }} steps: # Clone repo + submodules - name: Checkout repo uses: actions/checkout@v4 with: submodules: 'recursive' fetch-depth: 0 - name: Install Dlang tools (for gdc) if: ${{ startsWith(matrix.compiler, 'gdc') }} uses: dlang-community/setup-dlang@v2 # Install the host compiler - name: Install ${{ matrix.compiler }} uses: dlang-community/setup-dlang@v2 with: compiler: ${{ matrix.compiler }} - name: Setup DFLAGS for gdc if: ${{ startsWith(matrix.compiler, 'gdc') }} # Need to pass -allinst otherwise the build fails # We can't simply use `DFLAGS=-allinst dub` since that # disables unittests. run: | cat <