diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 3061cd9b..1d731ca3 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -7,6 +7,11 @@ on: branches: - master + +defaults: + run: + shell: bash + jobs: main: name: Run all tests @@ -19,24 +24,14 @@ jobs: fail-fast: false matrix: compiler: [ - { - version: dmd-latest, - dmd: dmd - }, - { - version: ldc-latest, - dmd: ldmd2 - }, - { - # Install dmd for the associated tools (dub/rdmd) - version: dmd-latest, - dmd: gdc-12 - } + dmd-latest, + ldc-latest, + gdc-12, ] host: [ ubuntu-22.04, macos-latest, - windows-latest + windows-latest, ] build: [ { type: make }, @@ -50,32 +45,13 @@ jobs: exclude: # Restrict GDC to Ubuntu - - compiler: - dmd: gdc-12 + - compiler: gdc-12 host: windows-latest - - compiler: - dmd: gdc-12 - host: macos-latest - - # Restrict DMD to macOS latest - - compiler: - dmd: dmd + - compiler: gdc-12 host: macos-latest - # Omit dub builds for GDC because dub rejects the old fronted revision - - compiler: - dmd: gdc-12 - build: - type: dub include: - - { do_report: 1, build: { type: dub, version: 'current' }, host: 'ubuntu-22.04', compiler: { version: dmd-latest, dmd: dmd } } - - - compiler: - dmd: dmd - host: macos-13 - build: - type: 'dub' - version: 'current' + - { do_report: 1, build: { type: dub, version: 'current' }, host: 'ubuntu-22.04', compiler: dmd-latest } runs-on: ${{ matrix.host }} @@ -87,27 +63,30 @@ jobs: submodules: 'recursive' fetch-depth: 0 - # Install the host compiler (DMD or LDC) - # Also grabs DMD for GDC to include dub + rdmd - - name: Install ${{ matrix.compiler.version }} - if: ${{ matrix.compiler.dmd != 'gdc-12' || matrix.build.type == 'dub' }} # Fetch required tools for GDC - uses: dlang-community/setup-dlang@v1 + - 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.version }} + compiler: ${{ matrix.compiler }} - # GDC not yet supported by setup-dlang - - name: Install GDC via apt-get - if: ${{ matrix.compiler.dmd == 'gdc-12' }} + - 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: | - sudo apt-get install gdc-12 -y - gdc-12 --version + cat < cast() a).array(); + const(istring)[] params = sym is null ? [] : sym.functionParameters.map!(a => a.name).array(); const ArgMismatch[] mismatches = compareArgsToParams(params, args); if (mismatches.length == 0) matched = true;