From f98919a42044d189be17e0b8e2174b90a7b0af50 Mon Sep 17 00:00:00 2001 From: Gagan Kumar Date: Sun, 19 Sep 2021 04:36:20 +0100 Subject: [PATCH] Upload FuzzyOS raw image as ZIP to make use of sparse file --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yml | 7 ++++--- Makefile | 6 +++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 44f8cfd..f46e81b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: - uses: actions/upload-artifact@v2 with: name: Raw Image - path: build/FuzzyOS.raw + path: build/FuzzyOS_raw.zip - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8711024..ab5e4de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,7 @@ jobs: utcOffset: "+00:00" - name: Create Release + id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -44,9 +45,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: build/FuzzyOS.raw - asset_name: FuzzyOS.raw - asset_content_type: application/octet-stream + asset_path: build/FuzzyOS_raw.zip + asset_name: FuzzyOS_raw.zip + asset_content_type: application/zip - name: Upload Virtual Box Image uses: actions/upload-release-asset@v1 diff --git a/Makefile b/Makefile index 6070b1f..4c7c435 100644 --- a/Makefile +++ b/Makefile @@ -47,9 +47,10 @@ rm_static = $(BUILD_REALMODE)/static_library # OS images image_raw = $(BUILD_DIR)/FuzzyOS.raw +image_raw_zip = $(BUILD_DIR)/FuzzyOS_raw.zip image_vmdk = $(BUILD_DIR)/FuzzyOS.vmdk image_vdi = $(BUILD_DIR)/FuzzyOS.vdi -ALL_IMAGES = $(image_raw) $(image_vmdk) $(image_vdi) +ALL_IMAGES = $(image_raw) $(image_raw_zip) $(image_vmdk) $(image_vdi) # Kernel kernel_core = $(BUILD_DIR)/kernel/core @@ -124,6 +125,9 @@ $(image_raw): $(bt_stage1) $(rm_static) $(bt_stage2) $(kernel_core) $(BUILD_DIR) truncate --size=128M $@ # sparse file @echo "Image Size : $$(stat -c %s $@) byte(s)" +$(image_raw_zip): $(image_raw) + zip $@ $< + $(image_vmdk): $(image_raw) qemu-img convert -O vmdk $< $@