-
Notifications
You must be signed in to change notification settings - Fork 15
101 lines (99 loc) · 2.47 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: CI
on:
push:
branches:
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
dc:
- dmd-latest
- ldc-latest
- dmd-beta
- ldc-beta
profile:
- debug
runs-on: ${{ matrix.os }}
steps:
- name: Setup D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
- name: Checkout source
uses: actions/checkout@v2
- name: Build binary
run: dub build -b ${{ matrix.profile }}
build-release:
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build
strategy:
fail-fast: true
matrix:
include:
- name: linux-i686
os: ubuntu-latest
arch: x86
- name: linux-x86_64
os: ubuntu-latest
arch: x86_64
- name: macos-x86_64
os: macos-latest
arch: x86_64
- name: windows-i686
os: windows-latest
arch: x86
- name: windows-x86_64
os: windows-latest
arch: x86_64
runs-on: ${{ matrix.os }}
steps:
- if: matrix.name == 'linux-i686'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y gcc-multilib
- name: Setup D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Checkout source
uses: actions/checkout@v2
- name: Build binary release
run: dub build -a ${{ matrix.arch }} -b release
- name: Create dist
uses: papeloto/action-zip@v1
with:
files: build README.md
dest: adrdox_${{ matrix.name }}.zip
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: dist
path: adrdox_${{ matrix.name }}.zip
publish-release:
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build-release
runs-on: ubuntu-latest
steps:
- name: Download dists
uses: actions/download-artifact@v2
with:
name: dist
- name: Create release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: '*.zip'
#prerelease: true
draft: true