-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (52 loc) · 1.55 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
name: build
on: [push]
jobs:
test:
name: Dub Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
dc: [dmd-latest, ldc-latest, dmd-2.107.1, ldc-1.37.0]
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 tests windows
if: runner.os != 'Linux'
run: |
dub -c=unittest-release
- uses: actions/upload-artifact@v4
if: ${{ failure() && runner.os == 'Linux' }}
with:
name: core-dump
path: |
./core-dump/*
./concurrency
- name: Build
run: dub build