|
27 | 27 | required: false
|
28 | 28 | default: 'None'
|
29 | 29 | type: string
|
| 30 | + flags: |
| 31 | + description: "Additional compilation flags (default to none)" |
| 32 | + required: false |
| 33 | + default: '' |
| 34 | + type: string |
| 35 | + use_case: |
| 36 | + description: "The use case to build the application for" |
| 37 | + required: false |
| 38 | + default: '' |
| 39 | + type: string |
30 | 40 | outputs:
|
31 | 41 | is_rust:
|
32 | 42 | description: Returns "true" if the app is using Rust SDK, else returns "false"
|
|
40 | 50 | description:
|
41 | 51 | The list of device(s) supported by the application.
|
42 | 52 | value: ${{ jobs.fetch_metadata.outputs.compatible_devices }}
|
| 53 | + flags: |
| 54 | + description: | |
| 55 | + The additional compilation flags to use when building the application. |
| 56 | + value: ${{ jobs.fetch_metadata.outputs.flags }} |
43 | 57 |
|
44 | 58 | env:
|
45 | 59 | APP_MANIFEST: "ledger_app.toml"
|
@@ -112,10 +126,23 @@ jobs:
|
112 | 126 | echo "is_rust=false" >> "$GITHUB_OUTPUT"
|
113 | 127 | fi
|
114 | 128 |
|
| 129 | + # Compilation flags |
| 130 | + if [ -n "${{ inputs.flags }}" ]; then |
| 131 | + echo "flags=${{ inputs.flags }}" >> "$GITHUB_OUTPUT" |
| 132 | + elif [ -n "${{ inputs.use_case }}" ]; then |
| 133 | + # if a use case is provided, we use the one from the manifest |
| 134 | + use_case=${{ inputs.use_case }} |
| 135 | + echo "use_case is set to '${use_case}'" |
| 136 | + echo "flags=$(ledger-manifest "$APP_MANIFEST" --output-use-cases ${use_case})" >> "$GITHUB_OUTPUT" |
| 137 | + else |
| 138 | + echo "flags=" >> "$GITHUB_OUTPUT" |
| 139 | + fi |
| 140 | +
|
115 | 141 | echo "Inferred metadata:"
|
116 | 142 | cat "$GITHUB_OUTPUT"
|
117 | 143 |
|
118 | 144 | outputs:
|
119 | 145 | is_rust: ${{ steps.fetch_metadata.outputs.is_rust }}
|
120 | 146 | compatible_devices: ${{ steps.fetch_metadata.outputs.compatible_devices }}
|
121 | 147 | build_directory: ${{ steps.fetch_metadata.outputs.build_directory }}
|
| 148 | + flags: ${{ steps.fetch_metadata.outputs.flags }} |
0 commit comments