Skip to content

Commit

Permalink
Upload FuzzyOS raw image as ZIP to make use of sparse file
Browse files Browse the repository at this point in the history
  • Loading branch information
scopeInfinity committed Sep 19, 2021
1 parent 6c57958 commit f98919a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $< $@

Expand Down

0 comments on commit f98919a

Please sign in to comment.