Skip to content

Commit 8df1a3a

Browse files
pamauryHU90m
authored andcommitted
[ot] Restructure the release tarball and update the ci
This commit restructure the archive to look like this: . ├── build │ ├── qemu-img │ └── qemu-system-riscv32 └── scripts └── opentitan ├── flashgen.py └── otpconv.py It also permutes the src and build arguments for the release script because it makes more sense. Co-authored-by: Hugo McNally <[email protected]> Signed-off-by: Amaury Pouly <[email protected]>
1 parent 1eecf14 commit 8df1a3a

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

.github/workflows/create_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
ninja qemu-img
4040
- name: Create binary archive
4141
run: |
42-
./scripts/opentitan/make_release.sh "$RELEASE_BIN_ARCHIVE" "$BUILD_DIR" .
42+
./scripts/opentitan/make_release.sh "$RELEASE_BIN_ARCHIVE" . "$BUILD_DIR"
4343
- name: Create release
4444
env:
4545
GH_TOKEN: ${{ github.token }}

scripts/opentitan/make_release.sh

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,15 @@
77
set -e
88

99
if [ $# -ne 3 ]; then
10-
echo "Usage: $0 /path/to/output/tarball /path/to/build/dir /path/to/src/dir" >&2
10+
echo "Usage: $0 /path/to/output/tarball /path/to/src/dir build_dirname" >&2
1111
exit 1
1212
fi
1313

1414
OUT_TARBALL="$1"
15-
QEMU_BUILD_DIR="$2"
16-
QEMU_SRC_DIR="$3"
17-
# Create a temporary directory that we will tar.
18-
TMP_DIR=$(mktemp -d)
19-
trap 'rm -rf "$TMP_DIR"' EXIT
20-
# Copy some binaries
21-
cp "$QEMU_BUILD_DIR/qemu-system-riscv32" "$TMP_DIR/"
22-
cp "$QEMU_BUILD_DIR/qemu-img" "$TMP_DIR/"
23-
cp "$QEMU_SRC_DIR/scripts/opentitan/otpconv.py" "$TMP_DIR/"
24-
cp "$QEMU_SRC_DIR/scripts/opentitan/flashgen.py" "$TMP_DIR/"
15+
QEMU_DIR="$2"
16+
QEMU_BUILD="$3"
2517
# Create archive.
26-
tar --create --auto-compress --verbose --file="$OUT_TARBALL" --directory "$TMP_DIR/" .
18+
tar --create --auto-compress --verbose --file="$OUT_TARBALL" \
19+
--directory="$QEMU_DIR" \
20+
"$QEMU_BUILD"/qemu-{system-riscv32,img} \
21+
scripts/opentitan/{otpconv,flashgen}.py

0 commit comments

Comments
 (0)