forked from dlang-community/setup-dlang
-
Notifications
You must be signed in to change notification settings - Fork 0
177 lines (167 loc) · 4.95 KB
/
test.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Test the action
on:
push:
branches:
- "v*"
pull_request:
branches:
- "*"
defaults:
run:
shell: bash
jobs:
verify-index-js-up-to-date:
name: Verify that `dist/index.js` is up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: diff-ing dist/index.js
run: |
set -euxo pipefail
npm ci
npm run build
# exclude dist/index.js.map (different on Windows)
git diff --stat --exit-code HEAD -- ':!dist/index.js.map'
verify-dmd:
needs: verify-index-js-up-to-date
strategy:
max-parallel: 5
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
dc: [
dmd,
dmd-2.099.1,
dmd-2.108.1-rc.1,
dmd-2.106,
dmd-2.106b,
dmd-latest,
dmd-beta,
dmd^3,
dmd-master,
]
include:
# Needs >=dmd-2.107.1 due to https://issues.dlang.org/show_bug.cgi?id=24137
- { os: macOS-latest, dc: dmd-2.108.1-rc.1 }
- { os: macOS-latest, dc: dmd-2.109 }
- { os: macOS-latest, dc: dmd-latest }
- { os: macOS-latest, dc: dmd-master }
- { os: macOS-13, dc: dmd-2.108.1-rc.1 }
- { os: macOS-13, dc: dmd-2.107 }
- { os: macOS-13, dc: dmd-latest }
- { os: macOS-13, dc: dmd-master }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/verify-d-compiler
with:
dc: ${{ matrix.dc }}
verify-ldc:
needs: verify-index-js-up-to-date
strategy:
max-parallel: 5
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest, macOS-13 ]
dc: [
ldc,
ldc-1.19.0,
ldc-1.37.0-beta1,
ldc-1.36,
ldc-1.38b,
ldc-latest,
ldc-beta,
ldc^3,
ldc-master,
]
exclude:
# arm64 binaries are available since ldc-1.25.0
- { os: macOS-latest, dc: ldc-1.19.0 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/verify-d-compiler
with:
dc: ${{ matrix.dc }}
verify-gdc:
needs: verify-index-js-up-to-date
strategy:
max-parallel: 5
fail-fast: false
matrix:
dc: [ gdc, gdc-12 ]
gdmd_sha: [ latest, 27c4c660f30d03e6cf467781bbbd3bbcc3db5758 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/verify-d-compiler
with:
dc: ${{ matrix.dc }}
gdmd_sha: ${{ matrix.gdmd_sha }}
verify-default:
needs: verify-index-js-up-to-date
name: Verify default compiler
strategy:
max-parallel: 5
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest, macOS-13 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/verify-d-compiler
dub:
name: Verify standalone DUB install
needs: verify-index-js-up-to-date
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest, macOS-13 ]
dc: [ ldc-latest, dmd-latest, gdc, gdc-12 ]
dub: [ 1.19.0, 1.23.0, latest ]
exclude:
# Excluded because those are actually Linux executables
- { os: windows-latest, dub: 1.19.0 }
# gdc only supports Linux
- { os: windows-latest, dc: gdc }
- { os: windows-latest, dc: gdc-12 }
- { os: macOS-13, dc: gdc }
- { os: macOS-13, dc: gdc-12 }
- { os: macOS-latest, dc: gdc }
- { os: macOS-latest, dc: gdc-12 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install D compiler
uses: ./
with:
compiler: ${{ matrix.dc }}
dub: ${{ matrix.dub }}
- name: Verify DUB version
run: |
if [[ ${{ matrix.dub }} == 'latest' ]]
then
curlCmd=(
curl -s
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
https://api.github.com/repos/dlang/dub/releases/latest
)
DUB_VERSION_FOR_TEST=$("${curlCmd[@]}" | jq -r '.tag_name | sub("v(?<v>.+)"; .v)')
else
DUB_VERSION_FOR_TEST=${{ matrix.dub }}
fi
echo "dub path is: `which dub`"
echo "dub version is: `dub --version`"
echo "We expect version: $DUB_VERSION_FOR_TEST"
if [[ "$(dub --version)" =~ "version $DUB_VERSION_FOR_TEST" ]]
then
echo "Match"
else
exit 1
fi
- name : Compile with dub
run: |
cd .github && dub run --single hello.d --compiler=${DC}