WebFreak001 / setup-dlang

Github action for dlang compiler setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setup-dlang

Automatically downloads and installs the D programming language compiler DMD or LDC and the package manager dub on Windows, Linux and OSX in a GitHub Action.

Usage

Basic usage:

steps:
    - uses: actions/checkout@v1
    - uses: mihails-strasuns/setup-dlang@v0.3.0
      with:
        compiler: dmd-2.088.0
    - name: Run tests
      run: dub test

Matrix testing: (newest DMD and LDC on current Ubuntu, Windows and MacOS versions)

name: Run all D Tests
on: [push, pull_request]

jobs:
    test:
        name: Dub Tests
        strategy:
            matrix:
                os: [ubuntu-latest, windows-latest, macOS-latest]
                dc: [dmd-latest, ldc-latest]
        runs-on: ${{ matrix.os }}
        steps:
            - uses: actions/checkout@v1

            - name: Install D compiler
              uses: mihails-strasuns/setup-dlang@v0.3.0
              with:
                  compiler: ${{ matrix.dc }}

            - name: Run tests
              run: dub -q test

Simply add the setup-dlang action to your GitHub Actions workflow to automatically download and install a D compiler and package manager bundled with the compiler or separately downloaded. The action will automatically add the D binaries to the PATH environment variable and set the DC environment variable to the selected compiler executable name.

All DMD versions of releases and pre-releases on http://downloads.dlang.org/releases/2.x/ and http://downloads.dlang.org/pre-releases/2.x/ are supported. For LDC all releases on https://github.com/ldc-developers/ldc/releases are available.

Additionally instead of a version for both DMD and LDC you can specify -latest to get the latest stable release of the compiler, use -beta to get the latest pre-release of the compiler and also use -master to get the newest nightly builds.

Valid version examples are:

  • dmd-latest
  • ldc-latest
  • dmd-beta
  • ldc-beta
  • dmd-2.088.0
  • dmd-2.088.0-beta.2
  • ldc-1.17.0
  • ldc-1.18.0-beta1
  • dmd-master
  • ldc-master

About

Github action for dlang compiler setup

License:MIT License


Languages

Language:JavaScript 58.8%Language:TypeScript 40.7%Language:D 0.5%