-
Notifications
You must be signed in to change notification settings - Fork 39
85 lines (72 loc) · 1.91 KB
/
CI.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
Test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- windows-2019
- macos-11
d:
- "ldc-1.27.1"
- "dmd-2.097.2"
meson:
- 0.59.1
ninja:
- 1.10.2
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# Cache
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.dub
~/AppData/Local/dub
~/.cache/pip
~/AppData/Local/pip/cache
key: "containers-cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-${{ matrix.meson }}-${{ matrix.ninja }}-deps:${{ hashFiles('./meson.build') }}-${{ hashFiles('./dub.sdl') }}"
# Setup compilers and tools
- name: Setup D
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.d }}
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Setup Meson
run: pip install meson==${{ matrix.meson }}
- name: Setup Ninja
uses: aminya/install-cmake@new-versions-and-arch
with:
cmake: false
ninja: ${{ matrix.ninja }}
# Build and Test
- name: Build documentation
run: |
dub build --build=ddox
dub build --build=docs
- name: Build
run: |
meson setup ./build
meson compile -C ./build
- name: Install gcc-multilib
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get install -y gcc-multilib
- name: Make Test
run: |
make -B -C test/
# TODO it fails to run the UnrolledList test on ldc
- name: Dub Test
run: |
dub test