Skip to content

Commit f678daa

Browse files
authored
Merge pull request #2 from turnaroundfactor/main
Update dev
2 parents adf5bc9 + 930269e commit f678daa

680 files changed

Lines changed: 60629 additions & 12187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ci/build-nightly.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
hashtime restore /ci/cache/filetime.json || true
2424
hashtime save /ci/cache/filetime.json
2525

26-
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev c60400e213f7eb0296581183140ec147dd7a848b
26+
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 786e8e05ef2de5fc1421a4fcd50e79c5dd2d3e4d
2727

2828
./ci-nightly.sh
2929

.github/ci/build-xtensa.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export PATH=$CARGO_HOME/bin:$PATH
1414
export CARGO_NET_GIT_FETCH_WITH_CLI=true
1515

1616
cargo install espup --locked
17-
espup install --toolchain-version 1.90.0.0
17+
espup install --toolchain-version 1.92.0.0
1818

1919
# Restore lockfiles
2020
if [ -f /ci/cache/lockfiles.tar ]; then
@@ -25,7 +25,7 @@ fi
2525
hashtime restore /ci/cache/filetime.json || true
2626
hashtime save /ci/cache/filetime.json
2727

28-
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev c60400e213f7eb0296581183140ec147dd7a848b
28+
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 786e8e05ef2de5fc1421a4fcd50e79c5dd2d3e4d
2929

3030
./ci-xtensa.sh
3131

.github/ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fi
2828
hashtime restore /ci/cache/filetime.json || true
2929
hashtime save /ci/cache/filetime.json
3030

31-
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev c60400e213f7eb0296581183140ec147dd7a848b
31+
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 786e8e05ef2de5fc1421a4fcd50e79c5dd2d3e4d
3232

3333
./ci.sh
3434

.github/ci/doc.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export CARGO_TARGET_DIR=/ci/cache/target
1212
export PATH=$CARGO_HOME/bin:$PATH
1313
mv rust-toolchain-nightly.toml rust-toolchain.toml
1414

15-
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev c60400e213f7eb0296581183140ec147dd7a848b
15+
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 786e8e05ef2de5fc1421a4fcd50e79c5dd2d3e4d
16+
cargo install --git https://github.com/embassy-rs/docserver --locked --rev 92a9d9e63c539df0b8d84107f9155473e48e723f
1617

1718
cargo embassy-devtool doc -o webroot
1819

.github/ci/janitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export CARGO_HOME=/ci/cache/cargo
99
export CARGO_TARGET_DIR=/ci/cache/target
1010
export PATH=$CARGO_HOME/bin:$PATH
1111

12-
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev c60400e213f7eb0296581183140ec147dd7a848b
12+
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 786e8e05ef2de5fc1421a4fcd50e79c5dd2d3e4d
1313

1414
cargo embassy-devtool check-crlf
1515
cargo embassy-devtool check-manifest

.github/workflows/changelog.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
# - 'embassy-futures/**'
5252
# embassy-imxrt:
5353
# - 'embassy-imxrt/**'
54+
# embassy-microchip:
55+
# - 'embassy-microchip/**'
5456
# embassy-mspm0:
5557
# - 'embassy-mspm0/**'
5658
# embassy-net:
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Matrix bot for issues
2+
on:
3+
issues:
4+
types: [opened]
5+
6+
jobs:
7+
notify:
8+
if: github.repository == 'embassy-rs/embassy'
9+
runs-on: ubuntu-latest
10+
continue-on-error: true
11+
steps:
12+
- name: send message
13+
uses: actions/github-script@v8
14+
with:
15+
script: |
16+
const action = context.payload.action;
17+
const title = context.payload.issue.title;
18+
const issueBody = context.payload.issue.body;
19+
const url = context.payload.issue.html_url;
20+
21+
// Determine message prefix
22+
let prefix;
23+
let roomId;
24+
if (action === 'opened' && (title + ' ' + issueBody).toLowerCase().includes('esp32')) {
25+
// Nag danielb
26+
prefix = 'New Issue';
27+
roomId = '!oENPKPHeKwiPfIVHER:matrix.org';
28+
} else {
29+
return; // Unknown action, skip
30+
}
31+
32+
// HTML escape the title
33+
const titleEscaped = title
34+
.replace(/&/g, '&')
35+
.replace(/</g, '&lt;')
36+
.replace(/>/g, '&gt;')
37+
.replace(/"/g, '&quot;')
38+
.replace(/'/g, '&#39;');
39+
40+
const body = `${prefix}: ${title} - ${url}`;
41+
const formattedBody = `${prefix}: <a href="${url}">${titleEscaped}</a>`;
42+
43+
const accessToken = process.env.MATRIX_ACCESS_TOKEN;
44+
45+
const response = await fetch(
46+
`https://matrix.org/_matrix/client/r0/rooms/${roomId}/send/m.room.message`,
47+
{
48+
method: 'POST',
49+
headers: {
50+
'Content-Type': 'application/json',
51+
'Authorization': `Bearer ${accessToken}`
52+
},
53+
body: JSON.stringify({
54+
msgtype: 'm.text',
55+
format: 'org.matrix.custom.html',
56+
body: body,
57+
formatted_body: formattedBody
58+
})
59+
}
60+
);
61+
62+
if (!response.ok) {
63+
throw new Error(`Matrix API request failed: ${response.status} ${response.statusText}`);
64+
}
65+
env:
66+
MATRIX_ACCESS_TOKEN: ${{ secrets.MATRIX_ACCESS_TOKEN }}

.github/workflows/matrix-bot.yml

Lines changed: 57 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,65 @@ on:
44
types: [opened, closed]
55

66
jobs:
7-
new-pr:
8-
if: github.event.action == 'opened' && github.repository == 'embassy-rs/embassy'
7+
notify:
8+
if: github.repository == 'embassy-rs/embassy'
99
runs-on: ubuntu-latest
1010
continue-on-error: true
1111
steps:
12-
- name: send message
13-
uses: s3krit/matrix-message-action@v0.0.3
14-
with:
15-
room_id: ${{ secrets.MATRIX_ROOM_ID }}
16-
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
17-
message: "New PR: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
18-
server: "matrix.org"
12+
- name: send message
13+
uses: actions/github-script@v8
14+
with:
15+
script: |
16+
const action = context.payload.action;
17+
const merged = context.payload.pull_request.merged;
18+
const title = context.payload.pull_request.title;
19+
const url = context.payload.pull_request.html_url;
1920
20-
merged-pr:
21-
if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.repository == 'embassy-rs/embassy'
22-
runs-on: ubuntu-latest
23-
continue-on-error: true
24-
steps:
25-
- name: send message
26-
uses: s3krit/matrix-message-action@v0.0.3
27-
with:
28-
room_id: ${{ secrets.MATRIX_ROOM_ID }}
29-
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
30-
message: "PR merged: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
31-
server: "matrix.org"
21+
// Determine message prefix
22+
let prefix;
23+
if (action === 'opened') {
24+
prefix = 'New PR';
25+
} else if (action === 'closed' && merged) {
26+
prefix = 'PR merged';
27+
} else if (action === 'closed' && !merged) {
28+
prefix = 'PR closed without merging';
29+
} else {
30+
return; // Unknown action, skip
31+
}
3232
33-
abandoned-pr:
34-
if: github.event.action == 'closed' && github.event.pull_request.merged == false && github.repository == 'embassy-rs/embassy'
35-
runs-on: ubuntu-latest
36-
continue-on-error: true
37-
steps:
38-
- name: send message
39-
uses: s3krit/matrix-message-action@v0.0.3
40-
with:
41-
room_id: ${{ secrets.MATRIX_ROOM_ID }}
42-
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
43-
message: "PR closed without merging: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
44-
server: "matrix.org"
33+
// HTML escape the title
34+
const titleEscaped = title
35+
.replace(/&/g, '&amp;')
36+
.replace(/</g, '&lt;')
37+
.replace(/>/g, '&gt;')
38+
.replace(/"/g, '&quot;')
39+
.replace(/'/g, '&#39;');
40+
41+
const body = `${prefix}: ${title} - ${url}`;
42+
const formattedBody = `${prefix}: <a href="${url}">${titleEscaped}</a>`;
43+
44+
const roomId = '!YoLPkieCYHGzdjUhOK:matrix.org';
45+
const accessToken = process.env.MATRIX_ACCESS_TOKEN;
46+
47+
const response = await fetch(
48+
`https://matrix.org/_matrix/client/r0/rooms/${roomId}/send/m.room.message`,
49+
{
50+
method: 'POST',
51+
headers: {
52+
'Content-Type': 'application/json',
53+
'Authorization': `Bearer ${accessToken}`
54+
},
55+
body: JSON.stringify({
56+
msgtype: 'm.text',
57+
format: 'org.matrix.custom.html',
58+
body: body,
59+
formatted_body: formattedBody
60+
})
61+
}
62+
);
63+
64+
if (!response.ok) {
65+
throw new Error(`Matrix API request failed: ${response.status} ${response.statusText}`);
66+
}
67+
env:
68+
MATRIX_ACCESS_TOKEN: ${{ secrets.MATRIX_ACCESS_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ out/
99
.zed
1010
.neoconf.json
1111
*.vim
12-
**/.idea
12+
**/.idea
13+
**/.nvim.lua

cyw43-firmware/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.exe
2+
*.pdb

0 commit comments

Comments
 (0)