From 17310a4eaf261822213f0d394ab48dbe3e95643d Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Fri, 29 Jul 2022 17:46:59 +0200 Subject: [PATCH 1/4] Add Lint CI --- .github/workflows/lint-workflow.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/lint-workflow.yml diff --git a/.github/workflows/lint-workflow.yml b/.github/workflows/lint-workflow.yml new file mode 100644 index 00000000..32f3b369 --- /dev/null +++ b/.github/workflows/lint-workflow.yml @@ -0,0 +1,42 @@ +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.11 + with: + source: './src' + extensions: 'h,c' + clangFormatVersion: 11 + + 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: + builtin: clear,rare + check_filenames: true From eb346e811bd7ad9fa59ba049d5abd74e23fbc340 Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Fri, 29 Jul 2022 17:53:50 +0200 Subject: [PATCH 2/4] Enable CI build debug for LNSP and use matrix to factorize build debug --- .github/workflows/ci-workflow.yml | 33 ++++++++++++------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 4893ad2e..bfcea2b0 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -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: From 23adc5914295db208f6964c41e21fb0686384620 Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Fri, 29 Jul 2022 18:58:11 +0200 Subject: [PATCH 3/4] Ignore test files for codespell CI --- .github/workflows/lint-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint-workflow.yml b/.github/workflows/lint-workflow.yml index 32f3b369..81a4c558 100644 --- a/.github/workflows/lint-workflow.yml +++ b/.github/workflows/lint-workflow.yml @@ -38,5 +38,7 @@ jobs: - 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 From 8eefc1bbea0c8ce4a6fad81ab2f11abbf3bf122a Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Mon, 1 Aug 2022 14:17:35 +0200 Subject: [PATCH 4/4] Update Lint and Clang format version --- .github/workflows/lint-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-workflow.yml b/.github/workflows/lint-workflow.yml index 81a4c558..87b3ef48 100644 --- a/.github/workflows/lint-workflow.yml +++ b/.github/workflows/lint-workflow.yml @@ -21,11 +21,11 @@ jobs: uses: actions/checkout@v2 - name: Lint - uses: DoozyX/clang-format-lint-action@v0.11 + uses: DoozyX/clang-format-lint-action@v0.13 with: source: './src' extensions: 'h,c' - clangFormatVersion: 11 + clangFormatVersion: 12.0.0 misspell: name: Check misspellings