Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lint CI #33

Merged
merged 4 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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