Skip to content

Commit

Permalink
Merge pull request #7 from LedgerHQ/apr/ci/fix_ethereum_build_branch
Browse files Browse the repository at this point in the history
Update plugin SDK (v5) + CI improvements
  • Loading branch information
apaillier-ledger authored Apr 22, 2022
2 parents 16a93dd + 5f7cd90 commit 41d48da
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 24,099 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: LedgerHQ/app-ethereum
ref: 'master'
ref: ${{ ((github.base_ref || github.ref_name) == 'main' && 'master') || (github.base_ref || github.ref_name) }}
submodules: recursive
- name: Build ethereum
run: |
Expand All @@ -120,7 +120,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: LedgerHQ/app-ethereum
ref: 'master'
ref: ${{ ((github.base_ref || github.ref_name) == 'main' && 'master') || (github.base_ref || github.ref_name) }}
submodules: recursive
- name: Build ethereum
run: |
Expand All @@ -147,7 +147,7 @@ jobs:
# uses: actions/checkout@v2
# with:
# repository: LedgerHQ/app-ethereum
# ref: 'master'
# ref: ${{ ((github.base_ref || github.ref_name) == 'main' && 'master') || (github.base_ref || github.ref_name) }}
# submodules: recursive
# - name: Build ethereum
# run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
job_lint:
Expand All @@ -18,8 +20,8 @@ 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: "./"
extensions: "h,c"
clangFormatVersion: 10
clangFormatVersion: 12.0.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bin/
debug/
dep/
obj/
tests/elfs/

# Editors
.idea/
Expand Down
2 changes: 1 addition & 1 deletion ethereum-plugin-sdk
17 changes: 7 additions & 10 deletions src/dbg/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ static size_t _etoa(out_fct_type out,
exp2 = (int) (expval * 3.321928094887362 + 0.5);
const double z = expval * 2.302585092994046 - exp2 * 0.6931471805599453;
const double z2 = z * z;
conv.U = (uint64_t)(exp2 + 1023) << 52U;
conv.U = (uint64_t) (exp2 + 1023) << 52U;
// compute exp(z) using continued fractions, see
// https://en.wikipedia.org/wiki/Exponential_function#Continued_fractions_for_ex
conv.F *= 1 + 2 * z / (2 - z + (z2 / (6 + (z2 / (10 + z2 / 14)))));
Expand Down Expand Up @@ -834,10 +834,9 @@ static int _vsnprintf(out_fct_type out,
width,
flags);
} else {
const int value = (flags & FLAGS_CHAR)
? (char) va_arg(va, int)
: (flags & FLAGS_SHORT) ? (short int) va_arg(va, int)
: va_arg(va, int);
const int value = (flags & FLAGS_CHAR) ? (char) va_arg(va, int)
: (flags & FLAGS_SHORT) ? (short int) va_arg(va, int)
: va_arg(va, int);
idx = _ntoa_long(out,
buffer,
idx,
Expand Down Expand Up @@ -877,11 +876,9 @@ static int _vsnprintf(out_fct_type out,
flags);
} else {
const unsigned int value =
(flags & FLAGS_CHAR)
? (unsigned char) va_arg(va, unsigned int)
: (flags & FLAGS_SHORT)
? (unsigned short int) va_arg(va, unsigned int)
: va_arg(va, unsigned int);
(flags & FLAGS_CHAR) ? (unsigned char) va_arg(va, unsigned int)
: (flags & FLAGS_SHORT) ? (unsigned short int) va_arg(va, unsigned int)
: va_arg(va, unsigned int);
idx = _ntoa_long(out,
buffer,
idx,
Expand Down
Loading

0 comments on commit 41d48da

Please sign in to comment.