Skip to content

Build and Test with last nightly #587

Build and Test with last nightly

Build and Test with last nightly #587

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: ["nanox", "nanosplus", "stax", "flex", "apex_p"]
steps:
- name: install nightly toolchain
run: |
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly
export RUST_NIGHTLY=nightly
cargo ledger setup
- name: Checkout Code
uses: actions/checkout@v4
with:
repository: LedgerHQ/app-boilerplate-rust
ref: main
path: app-boilerplate-rust
- name: Patch Cargo.toml to use y333/nightly_support for ledger_device_sdk and include_gif crate
run: |
cd app-boilerplate-rust
sed -i 's|ledger_device_sdk = ".*"|ledger_device_sdk = { git = "https://github.com/LedgerHQ/ledger-device-rust-sdk.git", branch = "y333/nightly_support" }|' Cargo.toml
sed -i 's|include_gif = ".*"|include_gif = { git = "https://github.com/LedgerHQ/ledger-device-rust-sdk.git", branch = "y333/nightly_support" }|' Cargo.toml
echo "Display patched Cargo.toml:"
cat Cargo.toml
- name: Build
run: |
cd app-boilerplate-rust
cargo update include_gif
cargo update ledger_secure_sdk_sys
cargo update ledger_device_sdk
cargo ledger build ${{ matrix.device }}
- name: Upload binary artifacts
uses: actions/upload-artifact@v3
with:
name: "boilerplate_binaries_${{ matrix.device }}"
path: app-boilerplate/target/${{ matrix.device }}/release/
if-no-files-found: error
#ragger_tests:
# 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"