Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new workflow to test updated nightly #119

Merged
merged 6 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/build_with_current_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Test with last nightly everyday @12PM

on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 12 * * *'

jobs:
build_with_last_nightly:
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
strategy:
matrix:
device: ["nanos", "nanox", "nanosplus"]
steps:
- name: update nightly toolchain
run: |
rustup update nightly
rustup default nightly
rustup component add rust-src --toolchain nightly
cargo ledger setup

- name: Checkout Code
uses: actions/checkout@v4
with:
repository: LedgerHQ/app-boilerplate-rust
path: app-boilerplate

- name: Build
run: |
BUILD_DEVICE_NAME="$(echo ${{ matrix.device }})"
BIN_DIR_NAME="$(echo ${{ matrix.device }} | sed 's/nanosplus/nanos2/')"
cd app-boilerplate
cargo ledger build ${{ matrix.device }}
mkdir -p build/${BIN_DIR_NAME}/bin
mv ./target/${BUILD_DEVICE_NAME}/release/app-boilerplate-rust ./build/${BIN_DIR_NAME}/bin/app.elf

- name: Upload binary artifacts
uses: actions/upload-artifact@v3
with:
name: "app_elf_binaries"
path: app-boilerplate/build/*
if-no-files-found: error

ragger_tests:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to run this in the dev-tools image (not the regular app-builder, it doesn't have Ragger nor Speculos)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall be fixed in reusable_ragger_tests flow as it uses ubuntu-latest nowadays.

Copy link
Contributor

@agrojean-ledger agrojean-ledger Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird to use ubuntu-latest and then do

      - name: Install tests dependencies
        run: |
          sudo apt-get update && sudo apt-get install -y qemu-user-static tesseract-ocr libtesseract-dev
          pip install -U pip setuptools
          pip install -r "${{ needs.call_get_app_metadata.outputs.pytest_directory }}/requirements.txt"

in the reusable workflow... Maybe it's because we want to be closer to a real host environment ? 🤔

We wouldn't need the Install tests dependencies if we used the app-dev-tools

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see LedgerHQ/ledger-app-workflows#56, I do not know why an ubuntu env is used to run test (rather than our dev-tools container)...

name: Run ragger tests using the reusable workflow
needs: build_with_last_nightly
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
with:
app_repository: LedgerHQ/app-boilerplate-rust
app_branch_name: "main"
download_app_binaries_artifact: "app_elf_binaries"
Loading