Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Sanitize branch name for artifact naming
id: sanitize
run: echo "ref_name=$(echo '${{ github.ref_name }}' | sed 's/\//-/g')" >> $GITHUB_OUTPUT

- name: Cache SDL
uses: actions/cache@v4
with:
Expand All @@ -21,6 +25,9 @@ jobs:
brew install cmake pkg-config nasm

- name: Build macOS (x86_64 + arm64)
env:
VERSION: ${{ steps.sanitize.outputs.ref_name }}
COMMIT_HASH: ${{ github.sha }}
run: |
cd MacOS
make clean
Expand All @@ -29,7 +36,7 @@ jobs:
- name: Upload macOS build artifact
uses: actions/upload-artifact@v4
with:
name: Kiwi8-${{ github.ref_name }}-macOS
name: Kiwi8-${{ steps.sanitize.outputs.ref_name }}-macOS
path: MacOS/release/
retention-days: 7

Expand All @@ -38,6 +45,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Sanitize branch name for artifact naming
id: sanitize
shell: pwsh
run: echo "ref_name=$('${{ github.ref_name }}'.Replace('/', '-'))" >> $env:GITHUB_OUTPUT

- name: Cache SDL
uses: actions/cache@v4
with:
Expand All @@ -50,6 +62,9 @@ jobs:
arch: amd64

- name: Build Windows (x64)
env:
VERSION: ${{ steps.sanitize.outputs.ref_name }}
COMMIT_HASH: ${{ github.sha }}
shell: cmd
run: |
cd Windows
Expand All @@ -59,6 +74,6 @@ jobs:
- name: Upload Windows build artifact
uses: actions/upload-artifact@v4
with:
name: Kiwi8-${{ github.ref_name }}-Windows
name: Kiwi8-${{ steps.sanitize.outputs.ref_name }}-Windows
path: Windows\release\
retention-days: 7
16 changes: 9 additions & 7 deletions macos/makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
APP_NAME = Kiwi8

# Use GITHUB_REF_NAME from GitHub Actions, or default values for local builds
# Use VERSION if set, otherwise fall back to GITHUB_REF_NAME, then default to unknown
VERSION ?= $(GITHUB_REF_NAME)
ifeq ($(VERSION),)
VERSION = unknown
VERSION = develop
endif

COMMIT_HASH := $(if $(GITHUB_SHA),$(GITHUB_SHA),unknown)
COMMIT_HASH ?= $(GITHUB_SHA)
ifeq ($(COMMIT_HASH),)
COMMIT_HASH = unknown
endif

APP_MANIFEST = src/Info.plist
APP_BUNDLE = $(APP_NAME).app
Expand All @@ -27,11 +30,10 @@ BOOTROM_HEADER = ../shared/bootrom.h
BOOTROM_SOURCE = ../roms/Kiwi8_logo_2.ch8

# Source files
CORE_SRCS = ../shared/Audio.cc ../shared/Chip8.cc ../shared/Display.cc ../shared/Gui.cc \
../shared/imgui_impl_sdl.cc ../shared/Input.cc ../shared/main.cc \
CORE_SRCS = ../shared/audio.cc ../shared/chip8.cc ../shared/display.cc ../shared/gui.cc \
../shared/imgui_impl_sdl.cc ../shared/input.cc ../shared/main.cc \
../shared/opcodes.cc ../shared/open_file_dialog.cc
IMGUI_SRCS = ../external/imgui/imgui.cpp ../external/imgui/imgui_demo.cpp \
../external/imgui/imgui_draw.cpp
IMGUI_SRCS = ../external/imgui/imgui.cpp ../external/imgui/imgui_draw.cpp
MACOS_SRCS = src/file_dialog.mm

# Object files (convert source paths to .o in current directory)
Expand Down
2 changes: 1 addition & 1 deletion macos/src/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundleShortVersionString</key>
<string>@VERSION@</string>
<key>CFBundleVersion</key>
<string>@SUB_VERSION@</string>
<string>@COMMIT_HASH@</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHighResolutionCapable</key>
Expand Down
58 changes: 0 additions & 58 deletions shared/Audio.cc

This file was deleted.

31 changes: 0 additions & 31 deletions shared/Audio.h

This file was deleted.

190 changes: 0 additions & 190 deletions shared/Chip8.h

This file was deleted.

Loading
Loading