Skip to content

Commit

Permalink
[add] Building the app + running the C tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lpascal-ledger committed Mar 25, 2022
1 parent 22d966c commit e66c75a
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
BasedOnStyle: Google
IndentWidth: 4
---
Language: Cpp
ColumnLimit: 100
PointerAlignment: Right
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AllowAllParametersOfDeclarationOnNextLine: false
SortIncludes: false
SpaceAfterCStyleCast: true
AllowShortCaseLabelsOnASingleLine: false
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
BinPackArguments: false
BinPackParameters: false
---
75 changes: 75 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Compilation & tests

on:
workflow_dispatch:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
job_nanoS_build_debug:
name: Build debug app for NanoS
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Build
run: |
make DEBUG=1
- name: Upload app binary
uses: actions/upload-artifact@v2
with:
name: app-nanoS-debug
path: bin

job_nanoX_build_debug:
name: Build debug app for NanoX
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Build
run: |
make DEBUG=1 BOLOS_SDK=$NANOX_SDK
- name: Upload app binary
uses: actions/upload-artifact@v2
with:
name: app-nanoX-debug
path: bin

job_scan_build:
name: Clang Static Analyzer
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- uses: actions/checkout@v2
- name: Build with Clang Static Analyzer
run: |
make clean
scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default
- uses: actions/upload-artifact@v2
if: failure()
with:
name: scan-build
path: scan-build

job_C_test:
name: C tests
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Build unit tests
run: make -C libsol

0 comments on commit e66c75a

Please sign in to comment.