Skip to content

Commit f5f0b54

Browse files
committed
Update after PR review
1 parent 04f8dc0 commit f5f0b54

File tree

2 files changed

+19
-29
lines changed

2 files changed

+19
-29
lines changed

.github/workflows/get_rust_apps.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88
print("Usage: get_rust_apps.py <github_token>")
99
sys.exit(1)
1010

11-
ledger_devices = ["nanos+", "nanox", "stax", "flex"]
12-
filtered_apps = ["app-kadena-legacy", "app-pocket"]
11+
# Excluded Rust apps
12+
# app-kadena-legacy: has been replaced by app-kadena
13+
# app-pocket: does not build (Obsidians' Alamgu issue)
14+
excluded_apps = ["app-kadena-legacy", "app-pocket"]
1315

14-
# Retrieve all apps on LedgerHQ GitHub organization
16+
# Excluded devices
17+
excluded_devices = ["nanos"]
18+
19+
# Retrieve all public apps on LedgerHQ GitHub organization
1520
token = sys.argv[1]
1621
gh = GitHubLedgerHQ(token)
17-
apps=gh.apps.filter(archived=Condition.WITHOUT)
22+
apps=gh.apps.filter(private=Condition.WITHOUT, archived=Condition.WITHOUT)
1823

1924
rust_apps = []
2025
exclude_apps = []
@@ -29,20 +34,11 @@
2934
else:
3035
# Filter out apps that are Rust based
3136
if manifest.app.sdk == "rust":
32-
rust_apps.append(app.name)
33-
# filter out app for specific devices
34-
for d in ledger_devices:
35-
if d not in manifest.app.devices or app.name in filtered_apps:
36-
exclude_apps.append({"app-name": app.name, "device": d})
37+
if app.name not in excluded_apps:
38+
for d in manifest.app.devices:
39+
if d not in excluded_devices:
40+
rust_apps.append({"app-name": app.name, "device": d})
3741

38-
# save the list of Rust apps in a json format:
42+
# save the list of (apps, device) pairs to build in a json format:
3943
with open("rust_apps.json", "w") as f:
40-
f.write(json.dumps(rust_apps))
41-
42-
# save the list of Excluded apps in a json format:
43-
with open("exclude_apps.json", "w") as f:
44-
f.write(json.dumps(exclude_apps))
45-
46-
# save the list of Ledger devices in a json format:
47-
with open("ledger_devices.json", "w") as f:
48-
f.write(json.dumps(ledger_devices))
44+
f.write(json.dumps(rust_apps))

.github/workflows/reusable_build_all_apps.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
if [ -n "${{ inputs.c_sdk_branch }}" ]; then
2828
echo "repo=LedgerHQ/ledger-device-rust-sdk" >> $GITHUB_OUTPUT
29-
echo "branch=y333/update_ci" >> $GITHUB_OUTPUT
29+
echo "branch=master" >> $GITHUB_OUTPUT
3030
else
3131
echo "repo=${{ github.repository}}" >> $GITHUB_OUTPUT
3232
echo "branch=${{ github.ref }}" >> $GITHUB_OUTPUT
@@ -37,8 +37,6 @@ jobs:
3737
needs: how-workflow-is-called
3838
outputs:
3939
rust_apps: ${{ steps.get_rust_apps.outputs.rust_apps }}
40-
exclude_apps: ${{ steps.get_rust_apps.outputs.exclude_apps }}
41-
ledger_devices: ${{ steps.get_rust_apps.outputs.ledger_devices }}
4240
steps:
4341
- name: Checkout repository
4442
uses: actions/checkout@v4
@@ -56,8 +54,6 @@ jobs:
5654
run: |
5755
python .github/workflows/get_rust_apps.py ${{ secrets.GITHUB_TOKEN }}
5856
echo "rust_apps=$(cat rust_apps.json)" >> $GITHUB_OUTPUT
59-
echo "exclude_apps=$(cat exclude_apps.json)" >> $GITHUB_OUTPUT
60-
echo "ledger_devices=$(cat ledger_devices.json)" >> $GITHUB_OUTPUT
6157
6258
display-rust-apps:
6359
name: Display Rust Apps
@@ -67,18 +63,16 @@ jobs:
6763
- name: Display Rust Apps
6864
run: |
6965
echo "Rust apps: ${{ needs.retrieve-rust-apps.outputs.rust_apps }}"
70-
echo "Exclude apps: ${{ needs.retrieve-rust-apps.outputs.exclude_apps }}"
71-
echo "Ledger devices: ${{ needs.retrieve-rust-apps.outputs.ledger_devices }}"
7266
7367
test-build:
7468
name: Build for all targets
7569
needs: [retrieve-rust-apps, how-workflow-is-called]
7670
strategy:
7771
fail-fast: false
7872
matrix:
79-
app-name: ${{ fromJSON(needs.retrieve-rust-apps.outputs.rust_apps) }}
80-
device: ${{ fromJSON(needs.retrieve-rust-apps.outputs.ledger_devices) }}
81-
exclude: ${{ fromJSON(needs.retrieve-rust-apps.outputs.exclude_apps) }}
73+
app-name: ["app-boilerplate-rust"]
74+
device: ["nanos+", "nanox", "stax", "flex"]
75+
include: ${{ fromJSON(needs.retrieve-rust-apps.outputs.rust_apps) }}
8276
runs-on: ubuntu-latest
8377
container:
8478
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

0 commit comments

Comments
 (0)