Skip to content

Build and Test all Apps with last nightly #5

Build and Test all Apps with last nightly

Build and Test all Apps with last nightly #5

name: Build and Test all Apps with last nightly
permissions:
contents: read
on:
workflow_call:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 12 * * *'
jobs:
retrieve-rust-apps:
name: Retrieve Rust Apps
runs-on: ubuntu-latest
outputs:
rust_apps: ${{ steps.get_rust_apps.outputs.rust_apps }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: LedgerHQ/ledger-device-rust-sdk
ref: 'master'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install ledgered
run: pip install ledgered
- name: Get all rust apps
id: get_rust_apps
run: |
python .github/workflows/get_rust_app_branch.py ${{ secrets.GITHUB_TOKEN }}
echo "rust_apps=$(cat rust_app_branch.json)" >> $GITHUB_OUTPUT
display-rust-apps:
name: Display Rust Apps
runs-on: ubuntu-latest
needs: retrieve-rust-apps
steps:
- name: Display Rust Apps
run: |
echo "Rust apps: ${{ needs.retrieve-rust-apps.outputs.rust_apps }}"
build_and_test:
name: Build and test for all apps
needs: retrieve-rust-apps
strategy:
fail-fast: false
matrix:
app-name: ["app-boilerplate-rust"]
app-branch: ["main"]
include: ${{ fromJSON(needs.retrieve-rust-apps.outputs.rust_apps) }}
uses: ./.github/workflows/reusable_build_and_test_with_last_nightly.yml
with:
app_name: ${{ matrix.app-name }}
app_branch: ${{ matrix.app-branch }}