Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 114e5d5

Browse files
chore: migrate to reusable workflows
1 parent a802ec0 commit 114e5d5

4 files changed

Lines changed: 44 additions & 70 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,16 @@
1-
name: "CodeQL"
1+
name: CodeQL
22

33
on:
44
workflow_dispatch:
55
push:
6-
pull_request:
76
branches:
87
- main
8+
- master
99
- develop
10-
- master # for safety reasons
11-
- dev # for safety reasons
10+
pull_request:
1211

1312
jobs:
1413
analyse:
15-
name: Analyse
16-
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
17-
if: github.event.repository.private == false
18-
strategy:
19-
matrix:
20-
sdk: ["$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK"]
21-
container:
22-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest
23-
24-
steps:
25-
- name: Clone
26-
uses: actions/checkout@v4
27-
with:
28-
submodules: recursive
29-
30-
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v3
32-
with:
33-
languages: cpp
34-
queries: security-and-quality
35-
36-
- name: Build
37-
run: |
38-
make -j BOLOS_SDK=${{ matrix.sdk }}
39-
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v3
14+
name: Call Ledger CodeQL analysis
15+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_codeql_checks.yml@v1
16+
secrets: inherit

.github/workflows/lint.yml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,16 @@
1-
name: Lint and format 💅
1+
name: Lint
22

33
on:
44
workflow_dispatch:
55
push:
6-
pull_request:
76
branches:
87
- main
8+
- master
99
- develop
10-
- master # for safety reasons
11-
- dev # for safety reasons
10+
pull_request:
1211

1312
jobs:
1413
lint:
15-
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
16-
container: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
with:
20-
submodules: recursive
21-
- name: Add missing deps
22-
env:
23-
DEBIAN_FRONTEND: noninteractive
24-
run: |
25-
apt-get update
26-
apt-get install -y bear sudo
27-
- name: Generate compilation database
28-
run: bear -- make -j BOLOS_SDK="$NANOSP_SDK"
29-
- name: Setup python
30-
uses: actions/setup-python@v5
31-
with:
32-
python-version: "3.11"
33-
- name: Lint and format 💅
34-
uses: cpp-linter/cpp-linter-action@v2
35-
id: linter
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
with:
39-
file-annotations: true
40-
files-changed-only: false
41-
ignore: "app/build|cmake|deps|fuzz|tests"
42-
step-summary: true
43-
style: file # uses .clang-format
44-
thread-comments: true
45-
tidy-checks: "" # use only .clang-tidy checks
46-
- name: Fail if errors
47-
if: steps.linter.outputs.checks-failed > 0
48-
run: |
49-
echo "Linter or formatter failed!"
50-
exit 1
14+
name: Lint Checks
15+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_lint.yml@v1
16+
secrets: inherit

.github/workflows/ragger-tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Ragger Tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- develop
10+
pull_request:
11+
12+
jobs:
13+
ragger_tests:
14+
name: Ragger Tests
15+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
16+
secrets: inherit

.github/workflows/unit-tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Unit Tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- develop
10+
pull_request:
11+
12+
jobs:
13+
unit_tests:
14+
name: Unit Tests
15+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_unit_tests.yml@v1
16+
secrets: inherit

0 commit comments

Comments
 (0)