Skip to content

Commit

Permalink
[flex] add flex on doc and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmer25 committed Jul 16, 2024
1 parent 26f9e30 commit 0aa45bb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Build application
strategy:
matrix:
device: [nanos, nanosp, nanox, stax]
device: [nanos, nanosp, nanox, stax, flex]
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: false
matrix:
device: [nanos, nanosp, nanox, stax]
device: [nanos, nanosp, nanox, stax, flex]
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest

Expand All @@ -82,9 +82,9 @@ jobs:

- name: Run test
run: |
if [ "${{ matrix.device }}" = "stax" ]; then
if [ "${{ matrix.device }}" = "stax" ] || [ "${{ matrix.device }}" = "flex" ]; then
./tests/integration/run_test_local.sh -F -m ${{ matrix.device }} \
./tests/integration/${{ matrix.device }}
./tests/integration/touch
else
apk add gmp-dev curl jq libsodium-dev git xxd procps
python3 -m venv tezos_test_env --system-site-package
Expand All @@ -99,14 +99,14 @@ jobs:
- name: Upload Stax results
uses: actions/upload-artifact@v4
if: always() && matrix.device == 'stax'
if: always() && (matrix.device == 'stax' || matrix.device == 'flex')
with:
name: integration_tests_${{ matrix.device }}.json
path: ./integration_tests.json

- name: Upload Nano results
uses: actions/upload-artifact@v4
if: always() && matrix.device != 'stax'
if: always() && (matrix.device != 'stax' && matrix.device != 'flex')
with:
name: integration_tests_log_${{ matrix.device }}
path: ./integration_tests_log
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Analyse
strategy:
matrix:
sdk: [ "$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK" ]
sdk: [ "$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK" ]
#'cpp' covers C and C++
language: [ 'cpp' ]
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Both of these commands take the following arguments:
-x
: executes the tests with shell tracing (-x)

Basic tests rely on gold-images, rather than OCR. They are stored under [nano/snapshots](./tests/integration/nano/snapshots) and [stax/snapshots](./tests/integration/stax/snapshots).
Basic tests rely on gold-images, rather than OCR. They are stored under [nano/snapshots](./tests/integration/nano/snapshots) and [touch/snapshots](./tests/integration/touch/snapshots).

To generate/reset the snapshots, you can do so for individual tests.

Expand Down Expand Up @@ -171,7 +171,7 @@ You will be requested to press enter to take snapshots in term.
**NB** make sure that the screen has updated to the screen you want to snapshot each time. It's also a good idea to
re-run the test normally afterwards, to ensure the snapshots have been set correctly.

### STAX
### STAX/FLEX

#### Preparation

Expand All @@ -196,15 +196,15 @@ $ docker exec -it ledger-app-tezos-integration-tests bash;
You can run an individual test from the test container. You should see the app progress on the display.

```sh
./tests/integration/stax/<test_name>.py
./tests/integration/touch/<test_name>.py
```

#### Setting goldimages

You can reset/set goldimages using the following:

```sh
GOLDEN=1 ./tests/integration/stax/<test_name>.py
GOLDEN=1 ./tests/integration/touch/<test_name>.py
```

If you are resetting goldimages for multiple tests, you can also use `export NOQUIT=1` to keep the app
Expand Down Expand Up @@ -264,4 +264,4 @@ with a new version
1. app/Makefile
2. tests/integration/app_vars.sh
3. tests/integration/nano/utils/app.py
4. the snapshots (nano and stax)
4. the snapshots (nano and touch)
2 changes: 1 addition & 1 deletion ledger_app.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[app]
build_directory = "./app"
sdk = "C"
devices = ["nanos", "nanox", "nanos+", "stax"]
devices = ["nanos", "nanox", "nanos+", "stax", "flex"]
4 changes: 2 additions & 2 deletions scripts/test_swap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -x
set -e

usage() {
echo "Usage: ./scripts/test_swap.sh {build_app_tezos|build_app_ethereum|build_app_exchange|run_tests|run_tests_all|update} {nanos|nanosp|nanox|stax}"
echo "Usage: ./scripts/test_swap.sh {build_app_tezos|build_app_ethereum|build_app_exchange|run_tests|run_tests_all|update} {nanos|nanosp|nanox|stax|flex}"
}

_assert_tezos_repo() {
Expand Down Expand Up @@ -72,7 +72,7 @@ _assert_app_exchange_repo() {
set -x
}

devices=("nanos" "nanosp" "nanox" "stax")
devices=("nanos" "nanosp" "nanox" "stax" "flex")

_assert_device() {
set +x
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ usage() {
echo " -F means that only failures are stored" >&2
echo " -d tgz specifies that tgz contains the debug app" >&2
echo " -l lim limits the number of tests run to lim" >&2
echo " -m arch is one of nanos, nanosp, nanox, or stax" >&2
echo " -m arch is one of nanos, nanosp, nanox, stax or flex" >&2
echo " -t tgz specifies that tgz contains the app" >&2
exit 1
}
Expand Down

0 comments on commit 0aa45bb

Please sign in to comment.