Skip to content

Build and Test with last nightly #590

Build and Test with last nightly

Build and Test with last nightly #590

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:
call_get_app_metadata:
# This job digests inputs and repository metadata provided by the `ledger_app.toml` manifest
# file, in order to output relevant directories, compatible devices, and other variables needed
# by following jobs.
name: Retrieve application metadata
uses: ./.github/workflows/_get_app_metadata.yml

Check failure on line 15 in .github/workflows/build_with_current_nightly.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_with_current_nightly.yml

Invalid workflow file

error parsing called workflow ".github/workflows/build_with_current_nightly.yml" -> "./.github/workflows/_get_app_metadata.yml" : failed to fetch workflow: workflow was not found.
with:
app_repository: LedgerHQ/app-boilerplate-rust
build_with_last_nightly:
needs: call_get_app_metadata
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
strategy:
matrix:
device: ${{ fromJSON(needs.call_get_app_metadata.outputs.compatible_devices) }}
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
path: app
- name: Patch Cargo.toml to use y333/nightly_support for ledger_device_sdk and include_gif crate
run: |
cd app/${{ needs.call_get_app_metadata.outputs.build_directory }}
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/${{ needs.call_get_app_metadata.outputs.build_directory }}
cargo update include_gif
cargo update ledger_secure_sdk_sys
cargo update ledger_device_sdk
cargo ledger build ${{ matrix.device }}
ELF_NAME=$(cargo metadata --manifest-path ./Cargo.toml --no-deps --format-version 1 | jq -r '.packages[] | select(.metadata.ledger != null) | .name')
echo "ELF_NAME=$ELF_NAME" >> $GITHUB_ENV
echo "Built ELF name is $ELF_NAME"
- name: Upload binary artifacts
uses: actions/upload-artifact@v4
with:
name: "app_binaries_${{ matrix.device }}"
path: app/${{ needs.call_get_app_metadata.outputs.build_directory }}/${{ matrix.device }}/release/${{ env.ELF_NAME }}
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"