-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 2.11 KB
/
Copy pathci.yml
File metadata and controls
74 lines (64 loc) · 2.11 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Setup D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Build library
run: dub build -c library
- name: Build prohelp preview CLI
run: dub build -c executable --build=release
- name: Build help dispatcher
run: dub build -c help --build=release
- name: Smoke prohelp
shell: bash
run: |
if [ -f prohelp.exe ]; then BIN=./prohelp.exe; else BIN=./prohelp; fi
"$BIN" --help || "$BIN" ?
"$BIN" check --help
"$BIN" init --help
"$BIN" fill --help
- name: Check schemas
shell: bash
run: |
if [ -f prohelp.exe ]; then BIN=./prohelp.exe; else BIN=./prohelp; fi
"$BIN" check help.sdl --strict
"$BIN" check examples/tar.sdl --strict
tmp=$(mktemp -d)
"$BIN" init "$tmp/help.sdl" --name smoke
"$BIN" check "$tmp/help.sdl"
if "$BIN" check "$tmp/help.sdl" --strict; then
echo "expected init template to fail --strict" >&2
exit 1
fi
if "$BIN" check examples/incomplete.sdl --strict; then
echo "expected incomplete.sdl to fail --strict" >&2
exit 1
fi
"$BIN" fill "$tmp/help.sdl" --no-prompt \
--set summary="Smoke test" \
--set description="Init/fill/check smoke" \
--set homepage="https://example.com" \
--set docs="https://example.com/docs" \
--set issues="https://example.com/issues"
"$BIN" check "$tmp/help.sdl" --strict
- name: Smoke help
shell: bash
run: |
if [ -f help.exe ]; then BIN=./help.exe; else BIN=./help; fi
"$BIN" --help
"$BIN" --orient help || true