-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include firmware and stack versions in filenames (#55)
* Include version strings in generated firmware names * Unconditionally write the GBL metadata JSON * Use the output name as the archive name * Fix quoting * Add a filename format to multi-PAN as well * Use the correct folder name
- Loading branch information
Showing
11 changed files
with
137 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,20 +109,6 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Parse firmware manifest | ||
id: read_manifest_yaml | ||
run: | | ||
yq -r ' | ||
to_entries | ||
| .[] | ||
| select(.value | type == "string") | ||
| .key + "=" + .value | ||
' "${{ matrix.manifest }}" >> $GITHUB_OUTPUT | ||
manifest_filename=$(basename "${{ matrix.manifest }}") | ||
manifest_base="${manifest_filename%%.*}" | ||
echo "manifest_base=$manifest_base" >> $GITHUB_OUTPUT | ||
- name: Install SDK extensions | ||
run: | | ||
# XXX: slc-cli does not actually work when the extensions aren't in the SDK! | ||
|
@@ -137,6 +123,7 @@ jobs: | |
done | ||
- name: Build firmware | ||
id: build-firmware | ||
run: | | ||
# Fix `fatal: detected dubious ownership in repository at` | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
|
@@ -154,18 +141,20 @@ jobs: | |
done | ||
# Build it | ||
mkdir outputs | ||
filename="${{ steps.read_manifest_yaml.outputs['manifest_base'] }}" | ||
python3 tools/build_project.py \ | ||
$sdk_args \ | ||
$toolchain_args \ | ||
--manifest "${{ matrix.manifest }}" \ | ||
--build-dir build \ | ||
--build-system makefile \ | ||
--output "gbl:outputs/$filename.gbl" \ | ||
--output "hex:outputs/$filename.hex" \ | ||
--output "out:outputs/$filename.out" | ||
--output-dir outputs \ | ||
--output gbl \ | ||
--output hex \ | ||
--output out | ||
# Get the basename of the GBL in `outputs` | ||
output_basename=$(basename -- $(basename -- $(ls -1 outputs/*.gbl | head -n 1)) .gbl) | ||
echo "output_basename=$output_basename" >> $GITHUB_OUTPUT | ||
- name: Install node within container (act) | ||
if: ${{ env.ACT }} | ||
|
@@ -176,7 +165,7 @@ jobs: | |
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ steps.read_manifest_yaml.outputs['manifest_base'] }} | ||
name: ${{ steps.build-firmware.outputs.output_basename }} | ||
path: outputs/* | ||
compression-level: 9 | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
name: SkyConnect Firmware Eraser | ||
device: EFR32MG21A020F512IM32 | ||
base_project: misc/firmware-eraser | ||
filename: "{manifest_name}_gsdk_{sdk_version}" | ||
|
||
gbl: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters