From 8df1a3a87f4203266083ed5e5094ee0e70ca92c2 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 23 Aug 2023 13:47:52 +0100 Subject: [PATCH] [ot] Restructure the release tarball and update the ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Amaury Pouly --- .github/workflows/create_release.yml | 2 +- scripts/opentitan/make_release.sh | 19 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 489355b5b50c..73e599630892 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -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 }} diff --git a/scripts/opentitan/make_release.sh b/scripts/opentitan/make_release.sh index 5d7a0b502378..ef24b8b9d0ed 100755 --- a/scripts/opentitan/make_release.sh +++ b/scripts/opentitan/make_release.sh @@ -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