Skip to content

dscan.d: Build unittest docs alongside default docs #1337

dscan.d: Build unittest docs alongside default docs

dscan.d: Build unittest docs alongside default docs #1337

Workflow file for this run

name: D
on:
push:
branches-ignore:
- travis-*
- circleci-*
- appveyor-*
- dustmite-*
- gh-pages
pull_request:
branches-ignore:
- travis-*
- circleci-*
- appveyor-*
- dustmite-*
- gh-pages
jobs:
build:
name: 'Everything'
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
dc: [ dmd-latest, dmd-2.108.0, ldc-latest, ldc-1.38.0 ]
runs-on: ${{ matrix.os }}
continue-on-error: false
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: 'Install D compiler'
uses: dlang-community/setup-dlang@v2
with:
compiler: ${{ matrix.dc }}
- name: 'Run tests unless Windows'
if: matrix.os != 'windows-latest'
run: dub test
- name: 'Build tests if Windows'
if: matrix.os == 'windows-latest'
run: dub build -c unittest
- name: 'Build: dev (debug)'
run: dub build --nodeps -b debug -c dev
- name: 'Build: dev (release)'
run: dub build --nodeps -b release -c dev
- name: 'Build: application (debug)'
run: dub build --nodeps -b debug -c application
- name: 'Build: application (release)'
run: dub build --nodeps -b release -c application
- name: 'Run dscan'
if: matrix.dc == 'dmd-latest' && matrix.os == 'ubuntu-latest' && success()
run: dmd -run dscan.d
- name: 'Generate documentation'
if: matrix.dc == 'dmd-latest' && matrix.os == 'ubuntu-latest' && success()
run: |
git clone https://github.com/zorael/dialect.git
git clone https://github.com/zorael/lu.git
dub fetch adrdox
dub run adrdox -- -ip --header-title="kameloso IRC bot" source dialect/source lu/source
cp -rv .circleci generated-docs
- name: 'Deploy documentation to GitHub Pages'
if: matrix.dc == 'dmd-latest' && matrix.os == 'ubuntu-latest' && success()
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
keep_history: false
allow_empty_commit: true
build_dir: generated-docs