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

Commit 475fcb0

Browse files
committed
Merge branch 'master' into develop
2 parents e938f69 + 519ec82 commit 475fcb0

File tree

5 files changed

+133
-9
lines changed

5 files changed

+133
-9
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# GitHub actions workflow which builds the release artifacts.
2+
3+
name: Build release artifacts
4+
5+
on:
6+
push:
7+
# we build on develop and release branches to (hopefully) get early warning
8+
# of things breaking
9+
branches: ["develop", "release-*"]
10+
11+
# we also rebuild on tags, so that we can be sure of picking the artifacts
12+
# from the right tag.
13+
tags: ["v*"]
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
# first get the list of distros to build for.
20+
get-distros:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/setup-python@v2
25+
- id: set-distros
26+
run: |
27+
echo "::set-output name=distros::$(scripts-dev/build_debian_packages --show-dists-json)"
28+
# map the step outputs to job outputs
29+
outputs:
30+
distros: ${{ steps.set-distros.outputs.distros }}
31+
32+
# now build the packages with a matrix build.
33+
build-debs:
34+
needs: get-distros
35+
name: "Build .deb packages"
36+
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
distro: ${{ fromJson(needs.get-distros.outputs.distros) }}
40+
41+
steps:
42+
- uses: actions/checkout@v2
43+
with:
44+
path: src
45+
- uses: actions/setup-python@v2
46+
- run: ./src/scripts-dev/build_debian_packages "${{ matrix.distro }}"
47+
- uses: actions/upload-artifact@v2
48+
with:
49+
name: debs
50+
path: debs/*
51+
52+
build-sdist:
53+
name: "Build pypi distribution files"
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v2
57+
- uses: actions/setup-python@v2
58+
- run: pip install wheel
59+
- run: |
60+
python setup.py sdist bdist_wheel
61+
- uses: actions/upload-artifact@v2
62+
with:
63+
name: python-dist
64+
path: dist/*
65+
66+
# if it's a tag, create a release and attach the artifacts to it
67+
attach-assets:
68+
name: "Attach assets to release"
69+
if: startsWith(github.ref, 'refs/tags/')
70+
needs:
71+
- build-debs
72+
- build-sdist
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Download all workflow run artifacts
76+
uses: actions/download-artifact@v2
77+
- name: Build a tarball for the debs
78+
run: tar -cvJf debs.tar.xz debs
79+
- name: Attach to release
80+
uses: softprops/action-gh-release@a929a66f232c1b11af63782948aa2210f981808a # PR#109
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
files: |
85+
python-dist/*
86+
debs.tar.xz
87+
# if it's not already published, keep the release as a draft.
88+
draft: true
89+
# mark it as a prerelease if the tag contains 'rc'.
90+
prerelease: ${{ contains(github.ref, 'rc') }}

CHANGES.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
Synapse 1.38.0 (2021-07-13)
2+
===========================
3+
4+
This release includes a database schema update which could result in elevated disk usage. See the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1380) for more information.
5+
6+
No significant changes since 1.38.0rc3.
7+
8+
9+
Synapse 1.38.0rc3 (2021-07-13)
10+
==============================
11+
12+
Internal Changes
13+
----------------
14+
15+
- Build the Debian packages in CI. ([\#10247](https://github.com/matrix-org/synapse/issues/10247), [\#10379](https://github.com/matrix-org/synapse/issues/10379))
16+
17+
118
Synapse 1.38.0rc2 (2021-07-09)
219
==============================
320

@@ -17,8 +34,6 @@ Improved Documentation
1734
Synapse 1.38.0rc1 (2021-07-06)
1835
==============================
1936

20-
This release includes a database schema update which could result in elevated disk usage. See the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1380) for more information.
21-
2237
Features
2338
--------
2439

debian/changelog

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
matrix-synapse-py3 (1.37.1ubuntu1) UNRELEASED; urgency=medium
1+
matrix-synapse-py3 (1.38.0) stable; urgency=medium
22

3+
* New synapse release 1.38.0.
4+
5+
-- Synapse Packaging team <[email protected]> Tue, 13 Jul 2021 13:20:56 +0100
6+
7+
matrix-synapse-py3 (1.38.0rc3) prerelease; urgency=medium
8+
9+
[ Erik Johnston ]
310
* Add synapse_review_recent_signups script
411

5-
-- Erik Johnston <[email protected]> Thu, 01 Jul 2021 15:55:03 +0100
12+
[ Synapse Packaging team ]
13+
* New synapse release 1.38.0rc3.
14+
15+
-- Synapse Packaging team <[email protected]> Tue, 13 Jul 2021 11:53:56 +0100
616

717
matrix-synapse-py3 (1.37.1) stable; urgency=medium
818

scripts-dev/build_debian_packages

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# can be passed on the commandline for debugging.
1111

1212
import argparse
13+
import json
1314
import os
1415
import signal
1516
import subprocess
@@ -34,6 +35,8 @@ By default, builds for all known distributions, but a list of distributions
3435
can be passed on the commandline for debugging.
3536
"""
3637

38+
projdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
39+
3740

3841
class Builder(object):
3942
def __init__(self, redirect_stdout=False):
@@ -57,9 +60,6 @@ class Builder(object):
5760
raise
5861

5962
def _inner_build(self, dist, skip_tests=False):
60-
projdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
61-
os.chdir(projdir)
62-
6363
tag = dist.split(":", 1)[1]
6464

6565
# Make the dir where the debs will live.
@@ -93,6 +93,7 @@ class Builder(object):
9393
],
9494
stdout=stdout,
9595
stderr=subprocess.STDOUT,
96+
cwd=projdir,
9697
)
9798

9899
container_name = "synapse_build_" + tag
@@ -179,11 +180,19 @@ if __name__ == "__main__":
179180
action="store_true",
180181
help="skip running tests after building",
181182
)
183+
parser.add_argument(
184+
"--show-dists-json",
185+
action="store_true",
186+
help="instead of building the packages, just list the dists to build for, as a json array",
187+
)
182188
parser.add_argument(
183189
"dist",
184190
nargs="*",
185191
default=DISTS,
186192
help="a list of distributions to build for. Default: %(default)s",
187193
)
188194
args = parser.parse_args()
189-
run_builds(dists=args.dist, jobs=args.jobs, skip_tests=args.no_check)
195+
if args.show_dists_json:
196+
print(json.dumps(DISTS))
197+
else:
198+
run_builds(dists=args.dist, jobs=args.jobs, skip_tests=args.no_check)

synapse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
except ImportError:
4848
pass
4949

50-
__version__ = "1.38.0rc2"
50+
__version__ = "1.38.0"
5151

5252
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5353
# We import here so that we don't have to install a bunch of deps when

0 commit comments

Comments
 (0)