Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 646292c

Browse files
committed
see if we can do a build!
1 parent a175e60 commit 646292c

File tree

2 files changed

+84
-1
lines changed

2 files changed

+84
-1
lines changed

.buildkite/pipeline.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ steps:
4747

4848
- wait
4949

50-
5150
- command:
5251
- "python -m pip install tox"
5352
- "tox -e py35-old,codecov"
5453
label: ":python: 3.5 / SQLite / Old Deps"
54+
branches: "!shhs !shhs-*"
5555
env:
5656
TRIAL_FLAGS: "-j 2"
5757
plugins:
@@ -69,6 +69,7 @@ steps:
6969
- "python -m pip install tox"
7070
- "tox -e py35,codecov"
7171
label: ":python: 3.5 / SQLite"
72+
branches: "!shhs !shhs-*"
7273
env:
7374
TRIAL_FLAGS: "-j 2"
7475
plugins:
@@ -86,6 +87,7 @@ steps:
8687
- "python -m pip install tox"
8788
- "tox -e py36,codecov"
8889
label: ":python: 3.6 / SQLite"
90+
branches: "!shhs !shhs-*"
8991
env:
9092
TRIAL_FLAGS: "-j 2"
9193
plugins:
@@ -117,6 +119,7 @@ steps:
117119
limit: 2
118120

119121
- label: ":python: 3.5 / :postgres: 9.5"
122+
branches: "!shhs !shhs-*"
120123
env:
121124
TRIAL_FLAGS: "-j 4"
122125
command:
@@ -169,6 +172,7 @@ steps:
169172

170173

171174
- label: "SyTest - :python: 3.5 / SQLite / Monolith"
175+
branches: "!shhs !shhs-*"
172176
agents:
173177
queue: "medium"
174178
command:
@@ -207,6 +211,7 @@ steps:
207211
limit: 2
208212

209213
- label: "SyTest - :python: 3.5 / :postgres: 9.6 / Workers"
214+
branches: "!shhs !shhs-*"
210215
agents:
211216
queue: "medium"
212217
env:
@@ -227,3 +232,15 @@ steps:
227232
limit: 2
228233
- exit_status: 2
229234
limit: 2
235+
236+
- wait
237+
238+
- label: "Docker Build -- Optimised Skylake-AVX512"
239+
agents:
240+
queue: "release"
241+
branches: "shhs shhs-*"
242+
command:
243+
- "docker build -f docker/Dockerfile-optimised --build-arg PYTHON_VERSION=3.6 --build-arg MARCH=skylake-avx512 . -t matrixdotorg/synapse:${BUILDKITE_TAG}-skylake-avx512"
244+
- "docker docker save matrixdotorg/synapse:${BUILDKITE_TAG}-skylake-avx512 | gzip -9 > docker.tar.gz"
245+
artifact_paths:
246+
- "docker.tar.gz"

docker/Dockerfile-optimised

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Dockerfile to build the matrixdotorg/synapse docker images.
2+
#
3+
# To build the image, run `docker build` command from the root of the
4+
# synapse repository:
5+
#
6+
# docker build -f docker/Dockerfile .
7+
#
8+
# There is an optional PYTHON_VERSION build argument which sets the
9+
# version of python to build against: for example:
10+
#
11+
# docker build -f docker/Dockerfile --build-arg PYTHON_VERSION=3.6 .
12+
#
13+
14+
ARG PYTHON_VERSION=3.7.4
15+
ARG MARCH=skylake-avx512
16+
17+
###
18+
### Stage 0: builder
19+
###
20+
FROM matrixdotorg/optimised-python:${PYTHON_VERSION}-optimized-lto-${MARCH} as builder
21+
22+
# install the OS build deps
23+
24+
RUN apt-get install -y build-essential libpq5-dev libffi-dev libexpat1-dev libxml2-dev libxslt-dev
25+
26+
# build things which have slow build steps, before we copy synapse, so that
27+
# the layer can be cached.
28+
#
29+
# (we really just care about caching a wheel here, as the "pip install" below
30+
# will install them again.)
31+
32+
RUN pip install --prefix="/install" --no-warn-script-location \
33+
cryptography \
34+
msgpack-python \
35+
pillow \
36+
pynacl
37+
38+
# now install synapse and all of the python deps to /install.
39+
40+
COPY synapse /synapse/synapse/
41+
COPY scripts /synapse/scripts/
42+
COPY MANIFEST.in README.rst setup.py synctl /synapse/
43+
44+
RUN pip install --prefix="/install" --no-warn-script-location \
45+
/synapse[all]
46+
47+
RUN chown -R root:root /usr/local /install
48+
49+
###
50+
### Stage 1: runtime
51+
###
52+
53+
FROM matrixdotorg/optimised-python:${PYTHON_VERSION}-optimized-lto-${MARCH}
54+
55+
# xmlsec is required for saml support
56+
RUN apt install libpq5 xmlsec libxslt1
57+
58+
COPY --from=builder /install /usr/local
59+
COPY ./docker/start.py /start.py
60+
COPY ./docker/conf /conf
61+
62+
VOLUME ["/data"]
63+
64+
EXPOSE 8008/tcp 8009/tcp 8448/tcp
65+
66+
ENTRYPOINT ["/start.py"]

0 commit comments

Comments
 (0)