Skip to content

Commit

Permalink
Merge pull request #153 from matrix-org/andybalaam/create-issue-and-m…
Browse files Browse the repository at this point in the history
…atrix-ping-on-failure

Create issue and ping matrix room when latest matrix-sdk code breaks the build
  • Loading branch information
andybalaam authored Oct 25, 2024
2 parents 72d3896 + f5ec776 commit 4d8d9df
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/latest_matrix_sdk_failed_issue_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
title: Building matrix-rust-sdk-crypto-wasm against the latest matrix-sdk Rust is failing
---
See https://github.com/{{env.GITHUB_REPOSITORY}}/actions/runs/{{env.GITHUB_RUN_ID}}
Something changed in
[matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk)'s crypto crate
that will break the build of this repo (matrix-rust-sdk-crypto-wasm) when we
update to it.

Latest failure: {{ date | date('dddd, YYYY-MM-DD HH:mm Z') }}
See the crypto crate's
[CHANGELOG](https://github.com/matrix-org/matrix-rust-sdk/blob/main/crates/matrix-sdk-crypto/CHANGELOG.md)
for possible hints about what changed and how to fix it.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

# Keep this in sync with:
# .github/workflows/latest-matrix-sdk-crypto.yml
# .github/workflows/release.yml
- name: Install Node.js
uses: actions/setup-node@v3
with:
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/latest-matrix-sdk-crypto.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
name: Build against latest matrix-sdk-crypto

# Runs a nightly job that builds this project against the latest version of
# matrix-sdk-crypto to find out whether some changes there have modified
# interfaces we are relying on.
#
# It does this by effectively doing:
#
# cargo update matrix-sdk-crypto
# yarn build
#
# If the build fails, this action:
#
# * creates an issue in this project's repo (or updates an existing open issue)
# * adds a comment to the issue linking to the specific build failure
# * sends a message to the Crypto team's Matrix room

on:
workflow_dispatch:
schedule:
# Run this task every day at 01:22 UTC
- cron: '22 1 * * *'

concurrency:
Expand Down Expand Up @@ -41,6 +57,9 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
# Keep this in sync with:
# .github/workflows/ci.yml
# .github/workflows/release.yml
node-version: 20.0

- name: Install yarn
Expand Down Expand Up @@ -81,7 +100,7 @@ jobs:
if: failure()
uses: fjogeleit/http-request-action@v1
with:
url: 'https://element.ems.host/hookshot/webhook/4bbf3b21-e94a-4a97-8a09-c0e03a6de173'
url: ${{ secrets.CRYPTO_HOOK_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"text": "matrix-rust-sdk-crypto-wasm is failing to build against the latest matrix-sdk Rust code. See ${{ steps.create-issue.outputs.url }}"}'
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
with:
targets: wasm32-unknown-unknown

# Keep this in sync with:
# .github/workflows/ci.yml
# .github/workflows/latest-matrix-sdk-crypto.yml
- name: Install Node.js
uses: actions/setup-node@v3
with:
Expand Down

0 comments on commit 4d8d9df

Please sign in to comment.