-
Notifications
You must be signed in to change notification settings - Fork 9
65 lines (56 loc) · 1.8 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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.098.1, ldc-1.28.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