Skip to content

Commit c666ebd

Browse files
authored
Merge pull request #76 from Geod24/vibed-ci
Add a CI that test against vibe-d:tls
2 parents d7eda19 + ed35cc8 commit c666ebd

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
matrix:
5959
os: [ ubuntu-latest ]
6060
dc:
61-
- dmd-latest
62-
- ldc-latest
61+
- dmd-2.100.0
62+
- ldc-1.29.0
6363
openssl:
6464
- version: 1.0.2u
6565
lib-dir: lib
@@ -74,13 +74,43 @@ jobs:
7474
timeout-minutes: 60
7575

7676
steps:
77-
- uses: actions/checkout@v2
77+
- uses: actions/checkout@v3
78+
with:
79+
path: deimos-openssl
7880

7981
- name: Prepare compiler
8082
uses: dlang-community/setup-dlang@v1
8183
with:
8284
compiler: ${{ matrix.dc }}
8385

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+
84114
# Restore or install build openssl version
85115
- name: 'Restore openssl from cache'
86116
id: lookup-openssl
@@ -106,10 +136,22 @@ jobs:
106136
echo "Expected version '${{ matrix.openssl.version }}' but got `pkg-config --modversion openssl`"
107137
exit 1
108138
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/
109143
dub test
110144
cd examples/sslecho/
111145
${{ 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
112146
dub build
113147
# TODO: FIXME: This currently does not work because certificate verification fails (works on my machine).
114148
# But at least it links, which is a good starting point.
115149
#$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

Comments
 (0)