Skip to content

Commit 3d763ab

Browse files
committed
Upload target/ dir
1 parent 4e8bdf4 commit 3d763ab

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/build_with_current_nightly.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,26 @@ jobs:
5656
else
5757
DEVICE="${{ matrix.device }}"
5858
fi
59-
echo "DEVICE=$DEVICE" >> $GITHUB_ENV
59+
# echo "DEVICE=$DEVICE" >> $GITHUB_ENV
6060
echo "Building for device: $DEVICE"
6161
cargo ledger build $DEVICE
62-
ELF_NAME=$(cargo metadata --manifest-path ./Cargo.toml --no-deps --format-version 1 | jq -r '.packages[] | select(.metadata.ledger != null) | .name')
63-
echo "ELF_NAME=$ELF_NAME" >> $GITHUB_ENV
64-
echo "Built ELF name is $ELF_NAME"
62+
# ELF_NAME=$(cargo metadata --manifest-path ./Cargo.toml --no-deps --format-version 1 | jq -r '.packages[] | select(.metadata.ledger != null) | .name')
63+
# echo "ELF_NAME=$ELF_NAME" >> $GITHUB_ENV
64+
# echo "Built ELF name is $ELF_NAME"
65+
BINARY_PATH=$(cargo metadata --no-deps --format-version 1 | jq -r '.target_directory')/ && \
66+
echo "BINARY_PATH=$BINARY_PATH" >> $GITHUB_ENV
67+
echo "BINARY_PATH is: $BINARY_PATH"
68+
69+
- name: Remove useless artifacts from previous build
70+
run: |
71+
find ${{ env.BINARY_PATH }} -mindepth 3 -maxdepth 3 -type d -exec rm -rf {} + && \
72+
rm -rf ${{ env.BINARY_PATH }}/release
6573
6674
- name: Upload binary artifacts
6775
uses: actions/upload-artifact@v4
6876
with:
69-
name: "app_elf_${{ matrix.device }}"
70-
path: target/${{ env.DEVICE }}/release/${{ env.ELF_NAME }}
77+
name: "app_binaries-${{ matrix.device }}"
78+
path: ${{env.BINARY_PATH}}
7179
if-no-files-found: error
7280

7381
merge_artifacts:
@@ -78,9 +86,9 @@ jobs:
7886
- name: Merge artifacts
7987
uses: actions/upload-artifact/merge@v4
8088
with:
81-
pattern: "app_elf_*"
82-
separate-directories: true
83-
89+
name: "app_binaries"
90+
pattern: "app_binaries-*"
91+
delete-merged: true
8492

8593
#ragger_tests:
8694
# name: Run ragger tests using the reusable workflow

0 commit comments

Comments
 (0)