https://github.com/marketplace/actions/d-compiler-installation
https://github.com/mihails-strasuns/setup-dlang
Main difference from
https://forum.dlang.org/thread/lrbcmnblvfplkpfao...@forum.dlang.org is that this is written using Github Action Typescript API instead of a docker container and thus allows testing with all platforms supported by Github Actions.
Example yml:
```
name: Test My D Project
on: [push, pull_request]
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
dc: [dmd-2.088.0, ldc-1.17.0]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- name: Install D compiler
uses: mihails-strasuns/setup-dlang@v0
with:
compiler: ${{ matrix.dc }}
- name: Run tests
run: dub -q test
```
Example test run:
https://github.com/mihails-strasuns/d-simpleconfig/commit/5107baedcb5db11cf0076e5c74e3f68594fb495b/checks
Currently only supports DMD and LDC with exact version
specifiers. Supporting GDC and convenience bits like `latest` or
`nightly` is planned but not currently implemented.