Skip to content

Commit

Permalink
Merge pull request #33 from LedgerHQ/wip/fbeutin/improve_ci
Browse files Browse the repository at this point in the history
Add Lint CI
  • Loading branch information
fbeutin-ledger authored Aug 2, 2022
2 parents 5385d52 + 8eefc1b commit cbf86d9
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 20 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,31 @@ on:
- develop

jobs:
job_nanoS_build_debug:
name: Build debug app for NanoS
nano_build_debug:
name: Build Solana debug application for Nano S, X and S+
strategy:
matrix:
include:
- SDK: "$NANOS_SDK"
artifact: solana-app-debug-nanos
- SDK: "$NANOX_SDK"
artifact: solana-app-debug-nanox
- SDK: "$NANOSP_SDK"
artifact: solana-app-debug-nanosp
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
make DEBUG=1 BOLOS_SDK=${{ matrix.SDK }}
- name: Upload app binary
uses: actions/upload-artifact@v2
with:
name: app-nanoX-debug
name: ${{ matrix.artifact }}
path: bin

job_scan_build:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/lint-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Code style check

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

jobs:
job_lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Clone
uses: actions/checkout@v2

- name: Lint
uses: DoozyX/clang-format-lint-action@v0.13
with:
source: './src'
extensions: 'h,c'
clangFormatVersion: 12.0.0

misspell:
name: Check misspellings
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check misspellings
uses: codespell-project/actions-codespell@2391250ab05295bddd51e36a8c6295edb6343b0e
with:
# Use Config file when the github action supports it
builtin: clear,rare
check_filenames: true
skip: ./libsol

0 comments on commit cbf86d9

Please sign in to comment.