-
Notifications
You must be signed in to change notification settings - Fork 59
70 lines (58 loc) · 1.65 KB
/
default.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
66
67
68
69
70
name: run-tests
on:
pull_request:
push:
branches:
- master
jobs:
main:
name: Run all tests
strategy:
fail-fast: false
matrix:
include:
- compiler: dmd-latest
dmd: dmd
- compiler: ldc-latest
dmd: ldmd2
- compiler: gdc-latest
dmd: gdmd
runs-on: ubuntu-latest
steps:
# Clone repo + submodules
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: 'recursive'
# Update packages and install test dependencies
- name: Install required dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-utils -y
# Install the host compiler (DMD or LDC)
- name: Install ${{ matrix.compiler }}
if: ${{ matrix.compiler != 'gdc-latest' }}
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.compiler }}
# GDC not yet supported by setup-dlang
- name: Install GDC
if: ${{ matrix.compiler == 'gdc-latest' }}
run: |
sudo apt-get install gdc-12 gdmd -y
# hack:
sudo rm /usr/bin/gdc
sudo ln -s /usr/bin/gdc-12 /usr/bin/gdc
gdc --version
# Execute all other tests (parsing, XPath, ...)
- name: Run run_tests.sh
env:
DMD: ${{ matrix.dmd }}
shell: bash
working-directory: test
run: source run_tests.sh
# Upload coverage reports to CodeCov
- uses: codecov/codecov-action@v2
if: ${{ matrix.compiler == 'ldc-latest' }}
with:
directory: test/coverage