Skip to content

Commit

Permalink
Update for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pashinov committed Oct 11, 2023
1 parent 2456e84 commit 3bb9c3c
Showing 1 changed file with 17 additions and 36 deletions.
53 changes: 17 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,37 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, develop, spec_tests ]
branches:
- master
pull_request:
branches: [ master, develop, spec_tests ]
# Allows you to run this workflow manually from the Actions tab
branches:
- master
- develop
workflow_dispatch:

jobs:
nano-build:
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
strategy:
matrix:
sdk:
- path: $NANOS_SDK
name: nanos
- path: $NANOX_SDK
name: nanox
- path: $NANOSP_SDK
name: nanosp
steps:
- uses: actions/checkout@v2
- name: Build application for SDK ${{ matrix.sdk.name }}
run: |
make clean
make BOLOS_SDK=${{ matrix.sdk.path }}
- name: Upload app binary
uses: actions/upload-artifact@v2
with:
name: app
path: bin

scan-build:
name: Clang Static Analyzer
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest

steps:
- uses: actions/checkout@v2
- 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@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: scan-build
path: scan-build


# =====================================================
# SPECULOS TESTS
# =====================================================
Expand All @@ -61,16 +41,17 @@ jobs:
name: Building binaries for E2E Speculos tests
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest

steps:
- uses: actions/checkout@v3

- name: Build testing binaries
run: |
mkdir tests/speculos/elfs
make clean && make -j DEBUG=1 NFT_STAGING_KEY=1 BOLOS_SDK=$NANOS_SDK && mv bin/app.elf tests/speculos/elfs/nanos.elf
make clean && make -j DEBUG=1 BOLOS_SDK=$NANOS_SDK && mv bin/app.elf tests/speculos/elfs/nanos.elf
make clean && make -j DEBUG=1 BOLOS_SDK=$NANOX_SDK && mv bin/app.elf tests/speculos/elfs/nanox.elf
make clean && make -j DEBUG=1 BOLOS_SDK=$NANOSP_SDK && mv bin/app.elf tests/speculos/elfs/nanosp.elf
- name: Upload app binaries
uses: actions/upload-artifact@v3
Expand All @@ -84,7 +65,7 @@ jobs:
strategy:
fail-fast: false
matrix:
model: ["nanos"]
model: ["nanos", "nanox", "nanosp"]

needs: [building_for_e2e_speculos_tests]
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3bb9c3c

Please sign in to comment.