Rationalize CI

This commit is contained in:
Francois Beutin
2023-11-09 14:34:08 +01:00
parent 71f7fc44e3
commit 480e40ae28
6 changed files with 75 additions and 86 deletions

View File

@@ -1,39 +1,19 @@
---
name: Tests
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
- develop
workflow_dispatch:
pull_request:
jobs:
scan-build:
name: Clang Static Analyzer
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
steps:
- uses: actions/checkout@v3
- 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@v3
if: failure()
with:
name: scan-build
path: scan-build
# =====================================================
# ZEMU TESTS
# =====================================================
# =====================================================
# ZEMU TESTS
# =====================================================
building_for_e2e_zemu_tests:
name: Building binaries for E2E Zemu tests
@@ -97,9 +77,9 @@ jobs:
- name: Run zemu tests
run: cd tests/zemu/ && yarn test
# =====================================================
# SPECULOS TESTS
# =====================================================
# =====================================================
# SPECULOS TESTS
# =====================================================
building_for_e2e_speculos_tests:
@@ -162,9 +142,9 @@ jobs:
pytest --model ${{ matrix.model }} --path ./elfs/${{ matrix.model }}.elf --display headless
# =====================================================
# RAGGER TESTS
# =====================================================
# =====================================================
# RAGGER TESTS
# =====================================================
build_ragger_elfs:
name: Build app for Ragger tests
@@ -180,3 +160,43 @@ jobs:
with:
download_app_binaries_artifact: "ragger_elfs"
test_dir: tests/ragger
# =====================================================
# STATIC ANALYSIS
# =====================================================
# Static analysis on the main ETH chain is covered by the guidelines enforcer
scan-build:
name: Clang Static Analyzer on altcoin
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
strategy:
fail-fast: false
matrix:
device: ["nanos", "nanos2", "nanox", "stax"]
steps:
- name: Clone
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build with Clang Static Analyzer
run: |
eval "BOLOS_SDK=\$$(echo ${{ matrix.device }} | tr [:lower:] [:upper:])_SDK" && \
echo "BOLOS_SDK value will be: ${BOLOS_SDK}" && \
make -j ENABLE_SDK_WERROR=1 BOLOS_SDK=${BOLOS_SDK} CHAIN=polygon scan-build
- uses: actions/upload-artifact@v3
if: failure()
with:
name: scan-build
path: scan-build
- name: Upload scan result
if: failure()
uses: actions/upload-artifact@v3
with:
name: scan-build
path: scan-build