forked from atilaneves/reggae
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (86 loc) · 2.83 KB
/
d.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
name: CI
on: [push, pull_request]
jobs:
test:
name: Dub Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019]
# Remember to change the compiler versions further below as well as here
dc:
- dmd-2.106.1
- dmd-2.105.2
- ldc-1.36.0
- ldc-1.34.0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install D compiler
# Remember to change the version further below as well as here
uses: dlang-community/[email protected]
with:
compiler: ${{ matrix.dc }}
- name: "Posix: Run tests"
if: runner.os != 'Windows'
run: dub -q test -- ~@tup ~@travis_oops
- name: "Windows: Run tests"
if: runner.os == 'Windows'
shell: cmd
run: |
set
:: set up MSVC environment (x64)
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64 || exit /b
:: test
set RUNNER_ARGS=~@tup ~@make ~@posix ~@javascript ~@lua ~@python ~@ruby
if "%DC%" == "dmd" set RUNNER_ARGS=%RUNNER_ARGS% ~@fails-on-windows-with-dmd
dub -q test -- %RUNNER_ARGS%
if %ERRORLEVEL% NEQ 0 (
echo.
echo *** Retrying tests serially ***
echo.
dub -q test -- -s %RUNNER_ARGS% || exit /b
)
bootstrap:
name: Bootstrap
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
dc:
- dmd-2.106.1
- dmd-2.105.2
- ldc-1.36.0
- ldc-1.34.0
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: "Windows: Install ninja"
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install D compiler
uses: dlang-community/[email protected]
with:
compiler: ${{ matrix.dc }}
- name: Set OS-specific SCRIPT_CMD environment variable
run: |
if [[ '${{ runner.os }}' == 'Windows' ]]; then
if [[ '${{ matrix.dc }}' = ldc* ]]; then
# avoid out-of-memory kills by using a single ninja job
echo "SCRIPT_CMD=cmd.exe //c call bootstrap.bat -j1" >> $GITHUB_ENV
else
echo "SCRIPT_CMD=cmd.exe //c call bootstrap.bat" >> $GITHUB_ENV
fi
else
echo "SCRIPT_CMD=./bootstrap.sh" >> $GITHUB_ENV
fi
- name: Bootstrap with DC=${{ env.DC }}
run: ${{ env.SCRIPT_CMD }}
- name: "LDC: Bootstrap with DC=ldmd2"
if: startsWith(matrix.dc, 'ldc')
run: DC=ldmd2 ${{ env.SCRIPT_CMD }}