Skip to content

Commit

Permalink
Use prebuilt synapse image for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Nov 1, 2023
1 parent bfae2e3 commit bed7a62
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
68 changes: 37 additions & 31 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,40 +43,46 @@ jobs:
(cd js-sdk && yarn install --frozen-lockfile && yarn build)
cp -r ./js-sdk/dist/. ./tests/dist
# Build homeserver image, honouring branch names
- name: "Checkout corresponding Synapse branch"
# Temporary: as it takes 3m to build the complement synapse image >:(
- name: Pull synapse service v1.94.0
shell: bash
run: |
mkdir -p homeserver
# Attempt to use the version of the homeserver which best matches the
# current build.
#
# 1. If we are not on complement's default branch, check if there's a
# similarly named branch (GITHUB_HEAD_REF for pull requests,
# otherwise GITHUB_REF).
# 2. otherwise, use the default homeserver branch ("HEAD")
docker pull ghcr.io/matrix-org/synapse-service:v1.94.0
docker tag ghcr.io/matrix-org/synapse-service:v1.94.0 homeserver:latest
for BRANCH_NAME in "$GITHUB_HEAD_REF" "${GITHUB_REF#refs/heads/}" "HEAD"; do
# Skip empty branch names, merge commits, and our default branch.
# (If we are on complement's default branch, we want to fall through to the HS's default branch
# rather than using the HS's 'master'/'main').
case "$BRANCH_NAME" in
"" | refs/pull/* | main | master)
continue
;;
esac
(wget -O - "https://github.com/matrix-org/synapse/archive/$BRANCH_NAME.tar.gz" | tar -xz --strip-components=1 -C homeserver) && break
done
# Build the base Synapse dockerfile and then build a Complement-specific image from that base.
- run: |
docker build -t matrixdotorg/synapse:latest -f docker/Dockerfile .
docker build -t matrixdotorg/synapse-workers:latest -f docker/Dockerfile-workers .
docker build -t homeserver -f docker/complement/Dockerfile docker/complement
working-directory: homeserver
env:
DOCKER_BUILDKIT: 1
# Build homeserver image, honouring branch names
#- name: "Checkout corresponding Synapse branch"
#shell: bash
#run: |
#mkdir -p homeserver
#
## Attempt to use the version of the homeserver which best matches the
## current build.
##
## 1. If we are not on complement's default branch, check if there's a
## similarly named branch (GITHUB_HEAD_REF for pull requests,
## otherwise GITHUB_REF).
## 2. otherwise, use the default homeserver branch ("HEAD")
#
#for BRANCH_NAME in "$GITHUB_HEAD_REF" "${GITHUB_REF#refs/heads/}" "HEAD"; do
## Skip empty branch names, merge commits, and our default branch.
## (If we are on complement's default branch, we want to fall through to the HS's default branch
## rather than using the HS's 'master'/'main').
#case "$BRANCH_NAME" in
#"" | refs/pull/* | main | master)
#continue
#;;
#esac
#(wget -O - "https://github.com/matrix-org/synapse/archive/$BRANCH_NAME.tar.gz" | tar -xz --strip-components=1 -C homeserver) && break
#done
## Build the base Synapse dockerfile and then build a Complement-specific image from that base.
#- run: |
#docker build -t matrixdotorg/synapse:latest -f docker/Dockerfile .
#docker build -t matrixdotorg/synapse-workers:latest -f docker/Dockerfile-workers .
#docker build -t homeserver -f docker/complement/Dockerfile docker/complement
#working-directory: homeserver
#env:
#DOCKER_BUILDKIT: 1

- run: |
set -o pipefail &&
Expand Down
2 changes: 1 addition & 1 deletion deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (d *SlidingSyncDeployment) Teardown() {

func RunNewDeployment(t *testing.T) *SlidingSyncDeployment {
// allow 30s for everything to deploy
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()

// Deploy the homeserver using Complement
Expand Down

0 comments on commit bed7a62

Please sign in to comment.