Skip to content

Commit

Permalink
[ot] Restructure the release tarball and update the ci
Browse files Browse the repository at this point in the history
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 <hugo.mcnally@gmail.com>
Signed-off-by: Amaury Pouly <amaury.pouly@lowrisc.org>
  • Loading branch information
2 people authored and rivos-eblot committed Aug 23, 2023
1 parent 1eecf14 commit 8df1a3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
ninja qemu-img
- name: Create binary archive
run: |
./scripts/opentitan/make_release.sh "$RELEASE_BIN_ARCHIVE" "$BUILD_DIR" .
./scripts/opentitan/make_release.sh "$RELEASE_BIN_ARCHIVE" . "$BUILD_DIR"
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
Expand Down
19 changes: 7 additions & 12 deletions scripts/opentitan/make_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@
set -e

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

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

0 comments on commit 8df1a3a

Please sign in to comment.