58
58
matrix :
59
59
os : [ ubuntu-latest ]
60
60
dc :
61
- - dmd-latest
62
- - ldc-latest
61
+ - dmd-2.100.0
62
+ - ldc-1.29.0
63
63
openssl :
64
64
- version : 1.0.2u
65
65
lib-dir : lib
@@ -74,13 +74,43 @@ jobs:
74
74
timeout-minutes : 60
75
75
76
76
steps :
77
- - uses : actions/checkout@v2
77
+ - uses : actions/checkout@v3
78
+ with :
79
+ path : deimos-openssl
78
80
79
81
- name : Prepare compiler
80
82
uses : dlang-community/setup-dlang@v1
81
83
with :
82
84
compiler : ${{ matrix.dc }}
83
85
86
+ # Checkout Vibe.d and its dependencies
87
+ #
88
+ # Do this before we remove the system OpenSSL, as `git clone` depends on it
89
+ # We fetch all dependencies but openssl early so we can use `--skip-registry=all`
90
+ # while building/testing, preventing dub from ever fetching the actual `openssl`
91
+ # package from the registry, which would make this job always succeed.
92
+ - name : ' Clone Vibe.d'
93
+ uses : actions/checkout@v3
94
+ with :
95
+ repository : ' vibe-d/vibe.d'
96
+ # Use a fixed ref to avoid random breakage due to upstream
97
+ # The first release compatible with this CI is v0.9.5-beta.2,
98
+ # feel free to update on new releases (commits can also be used).
99
+ ref : ' f9f122e71e679ca41130330a66b589e643fe23be'
100
+ path : ' vibe.d'
101
+ - name : ' Fetch Vibe.d dependencies'
102
+ run : |
103
+ # Versions are pinned to avoid upstream change breaking the CI
104
+ # When updating the Vibe.d version used, make sure to update this as well.
105
+ dub fetch 'vibe-core@~>1.22'
106
+ dub fetch 'memutils@~>1.0'
107
+ dub fetch 'taggedalgebraic@~>0.11'
108
+ dub fetch 'botan-math@~>1.0'
109
+ dub fetch 'stdx-allocator@~>2.77'
110
+ dub fetch 'botan@~>1.12'
111
+ dub fetch 'eventcore@~>0.9'
112
+ dub fetch 'libasync@~>0.8'
113
+
84
114
# Restore or install build openssl version
85
115
- name : ' Restore openssl from cache'
86
116
id : lookup-openssl
@@ -106,10 +136,22 @@ jobs:
106
136
echo "Expected version '${{ matrix.openssl.version }}' but got `pkg-config --modversion openssl`"
107
137
exit 1
108
138
fi
139
+
140
+ # We don't checkout in $GITHUB_WORKSPACE to avoid polluting the repository with artifacts,
141
+ # e.g. the C openssl library or Vibe.d
142
+ cd ${{ github.workspace }}/deimos-openssl/
109
143
dub test
110
144
cd examples/sslecho/
111
145
${{ github.workspace }}/openssl/install/bin/openssl req -batch -newkey rsa:4096 -x509 -sha256 -days 3650 -subj "/C=GB/CN=localhost" -nodes -out cert.pem -keyout key.pem
112
146
dub build
113
147
# TODO: FIXME: This currently does not work because certificate verification fails (works on my machine).
114
148
# But at least it links, which is a good starting point.
115
149
#$DC -run test.d
150
+
151
+ - name : ' Test with Vibe.d'
152
+ if : matrix.openssl.version != '1.0.2u'
153
+ run : |
154
+ dub add-local ${{ github.workspace }}/deimos-openssl/ 3.42.0
155
+
156
+ cd ${{ github.workspace }}/vibe.d/
157
+ dub test --skip-registry=all :tls
0 commit comments