-
Notifications
You must be signed in to change notification settings - Fork 9
87 lines (69 loc) · 2.51 KB
/
latest-matrix-sdk-crypto.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build against latest matrix-sdk-crypto
on:
workflow_dispatch:
schedule:
- cron: '22 1 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
issues: write
jobs:
test-against-latest-matrix-sdk-crypto:
name: test-against-latest-matrix-sdk-crypto
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Load cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Update to the latest matrix-sdk-crypto version
run: cargo update matrix-sdk-crypto
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20.0
- name: Install yarn
run: npm install --global yarn
- name: Install dependencies
run: yarn install
- name: Build the WebAssembly + JavaScript binding
run: yarn build
- name: Test the JavaScript binding
run: yarn test
- name: Open an issue on failure
if: failure()
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
update_existing: true
filename: .github/latest_matrix_sdk_failed_issue_template.md
id: create-issue
- run: 'echo Created/updated ${{ steps.create-issue.outputs.url }}'
if: failure()
- name: Comment on the issue
if: failure()
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Building matrix-rust-sdk-crypto-wasm against the latest matrix-sdk Rust is failing.
See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
pr-number: "${{ steps.create-issue.outputs.number }}"
- name: Ping matrix room on failure
if: failure()
uses: fjogeleit/http-request-action@v1
with:
url: 'https://element.ems.host/hookshot/webhook/4bbf3b21-e94a-4a97-8a09-c0e03a6de173'
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 }}"}'