| 1 |
name: CI |
| 2 |
on: |
| 3 |
pull_request: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
|
| 8 |
jobs: |
| 9 |
Test: |
| 10 |
if: "!contains(github.event.head_commit.message, '[skip ci]')" |
| 11 |
runs-on: ${{ matrix.os }} |
| 12 |
strategy: |
| 13 |
fail-fast: false |
| 14 |
matrix: |
| 15 |
os: |
| 16 |
- ubuntu-20.04 |
| 17 |
- windows-2019 |
| 18 |
- macos-10.15 |
| 19 |
d: |
| 20 |
- "ldc-1.27.1" |
| 21 |
- "dmd-2.097.2" |
| 22 |
meson: |
| 23 |
- 0.59.1 |
| 24 |
ninja: |
| 25 |
- 1.10.2 |
| 26 |
steps: |
| 27 |
- uses: actions/checkout@v2 |
| 28 |
with: |
| 29 |
submodules: recursive |
| 30 |
|
| 31 |
|
| 32 |
- name: Cache |
| 33 |
uses: actions/cache@v2 |
| 34 |
with: |
| 35 |
path: | |
| 36 |
~/.dub |
| 37 |
~/AppData/Local/dub |
| 38 |
~/.cache/pip |
| 39 |
~/AppData/Local/pip/cache |
| 40 |
key: "containers-cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-${{ matrix.meson }}-${{ matrix.ninja }}-deps:${{ hashFiles('./meson.build') }}-${{ hashFiles('./dub.sdl') }}" |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
- name: Setup D |
| 45 |
uses: dlang-community/setup-dlang@v1 |
| 46 |
with: |
| 47 |
compiler: ${{ matrix.d }} |
| 48 |
|
| 49 |
- uses: actions/setup-python@v2 |
| 50 |
with: |
| 51 |
python-version: '3.x' |
| 52 |
|
| 53 |
- name: Setup Meson |
| 54 |
run: pip install meson==${{ matrix.meson }} |
| 55 |
|
| 56 |
- name: Setup Ninja |
| 57 |
uses: aminya/install-cmake@new-versions-and-arch |
| 58 |
with: |
| 59 |
cmake: false |
| 60 |
ninja: ${{ matrix.ninja }} |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
- name: Build |
| 65 |
run: | |
| 66 |
meson setup ./build |
| 67 |
meson compile -C ./build |
| 68 |
|
| 69 |
- name: Install gcc-multilib |
| 70 |
if: contains(matrix.os, 'ubuntu') |
| 71 |
run: sudo apt-get install -y gcc-multilib |
| 72 |
|
| 73 |
- name: Make Test |
| 74 |
run: | |
| 75 |
make -B -C test/ |
| 76 |
|
| 77 |
|
| 78 |
- name: Dub Test |
| 79 |
run: | |
| 80 |
dub test |