Fix use of std.sumtype on older compilers #440
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Dub Tests | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
dc: [dmd-latest, ldc-latest, dmd-2.097.0, ldc-1.27.1] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install D compile | |
uses: dlang-community/[email protected] | |
with: | |
compiler: ${{ matrix.dc }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.dub | |
key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.selections.json') }} | |
restore-keys: | | |
${{ runner.os }}-dub- | |
- name: Install binutils | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt install -y binutils-gold | |
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20 | |
sudo update-alternatives --config ld | |
ld --version | |
- name: Run tests linux | |
if: runner.os == 'Linux' | |
run: | | |
ulimit -c unlimited | |
echo "$PWD/core-dump/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern | |
mkdir core-dump | |
sysctl kernel.core_pattern | |
ulimit -a | |
dub -c=unittest-release | |
- name: Run asan tests linux | |
if: runner.os == 'Linux' && startsWith(matrix.dc, 'ldc') | |
run: | | |
sudo apt install -y llvm # provides executable `llvm-symbolizer` | |
LSAN_OPTIONS=suppressions=lsan.supp dub -c=unittest-asan | |
- name: Run tests windows | |
if: runner.os != 'Linux' | |
run: | | |
dub -c=unittest-release | |
- uses: actions/upload-artifact@v2 | |
if: ${{ failure() && runner.os == 'Linux' }} | |
with: | |
name: core-dump | |
path: | | |
./core-dump/* | |
./concurrency | |
- name: Build | |
run: dub build |