Skip to content

Commit c5aefa3

Browse files
committed
feat: complete Phase 5 packaging and release readiness for Core85 v1.0.0
- add CMake install rules for the GUI app, core library, headers, docs, and sample programs - add CPack packaging with release archive generation and SHA256 checksum output - add release notes and LGPL redistribution notices - refresh README and runbook to match the shipped v1.0 workflow - add CI matrix coverage for build, test, and package smoke checks on macOS, Ubuntu, and Windows - verify full test suite stays green with 411 passing tests
1 parent 33dfac6 commit c5aefa3

7 files changed

Lines changed: 543 additions & 246 deletions

File tree

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build-test-package:
11+
name: ${{ matrix.os }} / ${{ matrix.build_type }}
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: ubuntu-22.04
19+
build_type: Release
20+
- os: macos-13
21+
build_type: Release
22+
- os: windows-2022
23+
build_type: Release
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Install Linux system packages
30+
if: runner.os == 'Linux'
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y libgl1-mesa-dev
34+
35+
- name: Install Qt
36+
uses: jurplel/install-qt-action@v4
37+
with:
38+
version: '6.7.2'
39+
modules: 'qtbase'
40+
cache: true
41+
42+
- name: Configure
43+
run: >
44+
cmake -S . -B build -G Ninja
45+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
46+
-DCORE85_BUILD_GUI=ON
47+
48+
- name: Build
49+
run: cmake --build build --config ${{ matrix.build_type }}
50+
51+
- name: Test
52+
run: ctest --test-dir build --output-on-failure -C ${{ matrix.build_type }}
53+
54+
- name: Package Smoke Test
55+
run: cmake --build build --target package --config ${{ matrix.build_type }}
56+
57+
- name: Upload Package Artefacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: core85-${{ runner.os }}
61+
path: |
62+
build/*.dmg
63+
build/*.zip
64+
build/*.tar.gz

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ qrc_*.cpp
4242
/core85_tests
4343
/bin/
4444
/lib/
45+
/stage/
46+
/dist/
47+
48+
# Package artefacts
49+
*.dmg
50+
*.tar.gz
51+
*.zip
52+
*.sha256
4553

4654
# Ninja and Make artifacts
4755
.ninja_deps

CMakeLists.txt

Lines changed: 189 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
cmake_minimum_required(VERSION 3.25)
22

3-
project(Core85 VERSION 0.1.0 LANGUAGES CXX)
3+
project(Core85 VERSION 1.0.0 LANGUAGES CXX)
4+
5+
include(GNUInstallDirs)
46

57
set(CMAKE_CXX_STANDARD 17)
68
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -9,6 +11,34 @@ set(CMAKE_CXX_EXTENSIONS OFF)
911
option(CORE85_BUILD_GUI "Build the Qt GUI application" ON)
1012
option(CORE85_BUILD_TESTS "Build the GTest test suite" ON)
1113

14+
set(CORE85_QT_DEPLOY_OPTIONS "")
15+
if(APPLE)
16+
foreach(path
17+
/opt/homebrew/lib
18+
/opt/homebrew/Frameworks
19+
/usr/local/lib
20+
/usr/local/Frameworks)
21+
if(EXISTS "${path}")
22+
list(APPEND CORE85_QT_DEPLOY_OPTIONS "-libpath=${path}")
23+
endif()
24+
endforeach()
25+
endif()
26+
27+
set(CORE85_CORE_HEADERS
28+
src/core/assembler.h
29+
src/core/cpu.h
30+
src/core/io_bus.h
31+
src/core/memory.h
32+
src/core/span.h
33+
)
34+
35+
set(CORE85_DOC_FILES
36+
README.md
37+
runbook.md
38+
NOTICES.md
39+
RELEASE_NOTES_v1.0.md
40+
)
41+
1242
add_library(core85_lib STATIC
1343
src/core/assembler.cpp
1444
src/core/cpu.cpp
@@ -18,7 +48,8 @@ add_library(core85_lib STATIC
1848

1949
target_include_directories(core85_lib
2050
PUBLIC
21-
${CMAKE_CURRENT_SOURCE_DIR}/src
51+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
52+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
2253
)
2354

2455
if(MSVC)
@@ -27,7 +58,23 @@ else()
2758
target_compile_options(core85_lib PRIVATE -Wall -Wextra -Wpedantic)
2859
endif()
2960

61+
install(TARGETS core85_lib
62+
EXPORT Core85Targets
63+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
64+
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
65+
)
66+
67+
install(FILES ${CORE85_CORE_HEADERS}
68+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/core85/core
69+
)
70+
71+
set(CORE85_DEPLOY_SCRIPT "")
72+
3073
if(CORE85_BUILD_GUI)
74+
if(APPLE)
75+
set(QT_INTERNAL_SKIP_DEPLOYMENT ON)
76+
endif()
77+
3178
find_package(Qt6 COMPONENTS Widgets QUIET)
3279

3380
if(Qt6_FOUND)
@@ -51,6 +98,12 @@ if(CORE85_BUILD_GUI)
5198
AUTOMOC ON
5299
AUTOUIC ON
53100
AUTORCC ON
101+
MACOSX_BUNDLE ON
102+
MACOSX_BUNDLE_BUNDLE_NAME "Core85"
103+
MACOSX_BUNDLE_GUI_IDENTIFIER "org.core85.app"
104+
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
105+
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}
106+
WIN32_EXECUTABLE ON
54107
)
55108

56109
target_link_libraries(core85_gui
@@ -59,6 +112,79 @@ if(CORE85_BUILD_GUI)
59112
core85_lib
60113
)
61114

115+
if(APPLE)
116+
find_program(CORE85_MACDEPLOYQT_EXECUTABLE
117+
NAMES macdeployqt
118+
HINTS
119+
"${Qt6_DIR}/../../../bin"
120+
"${Qt6_DIR}/../../../../bin"
121+
)
122+
find_program(CORE85_QTPATHS_EXECUTABLE
123+
NAMES qtpaths6 qtpaths
124+
HINTS
125+
"${Qt6_DIR}/../../../bin"
126+
"${Qt6_DIR}/../../../../bin"
127+
)
128+
129+
set(CORE85_QT_PLUGIN_DIR "")
130+
if(CORE85_QTPATHS_EXECUTABLE)
131+
execute_process(
132+
COMMAND "${CORE85_QTPATHS_EXECUTABLE}" --plugin-dir
133+
OUTPUT_VARIABLE CORE85_QT_PLUGIN_DIR
134+
OUTPUT_STRIP_TRAILING_WHITESPACE
135+
)
136+
endif()
137+
138+
set(CORE85_QCOCOA_PLUGIN "")
139+
if(CORE85_QT_PLUGIN_DIR)
140+
find_file(CORE85_QCOCOA_PLUGIN
141+
NAMES libqcocoa.dylib
142+
PATHS "${CORE85_QT_PLUGIN_DIR}/platforms"
143+
NO_DEFAULT_PATH
144+
)
145+
endif()
146+
endif()
147+
148+
install(TARGETS core85_gui
149+
BUNDLE DESTINATION .
150+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
151+
)
152+
153+
if(APPLE)
154+
if(CORE85_MACDEPLOYQT_EXECUTABLE AND CORE85_QCOCOA_PLUGIN)
155+
set(CORE85_DEPLOY_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/core85_deploy.cmake")
156+
set(CORE85_DEPLOY_TOOL_COMMAND
157+
"execute_process(\n"
158+
" COMMAND \"${CORE85_MACDEPLOYQT_EXECUTABLE}\" \"core85_gui.app\" \"-no-plugins\" \"-always-overwrite\"")
159+
foreach(option IN LISTS CORE85_QT_DEPLOY_OPTIONS)
160+
string(APPEND CORE85_DEPLOY_TOOL_COMMAND " \"${option}\"")
161+
endforeach()
162+
string(APPEND CORE85_DEPLOY_TOOL_COMMAND
163+
"\n WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}\"\n"
164+
" COMMAND_ERROR_IS_FATAL ANY\n"
165+
")\n")
166+
167+
file(GENERATE OUTPUT "${CORE85_DEPLOY_SCRIPT}" CONTENT
168+
"${CORE85_DEPLOY_TOOL_COMMAND}
169+
file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/core85_gui.app/Contents/PlugIns/platforms\")
170+
file(COPY \"${CORE85_QCOCOA_PLUGIN}\"
171+
DESTINATION \"\${CMAKE_INSTALL_PREFIX}/core85_gui.app/Contents/PlugIns/platforms\")
172+
")
173+
else()
174+
qt_generate_deploy_app_script(
175+
TARGET core85_gui
176+
OUTPUT_SCRIPT CORE85_DEPLOY_SCRIPT
177+
NO_UNSUPPORTED_PLATFORM_ERROR
178+
)
179+
endif()
180+
else()
181+
qt_generate_deploy_app_script(
182+
TARGET core85_gui
183+
OUTPUT_SCRIPT CORE85_DEPLOY_SCRIPT
184+
NO_UNSUPPORTED_PLATFORM_ERROR
185+
)
186+
endif()
187+
62188
add_custom_target(run
63189
COMMAND $<TARGET_FILE:core85_gui>
64190
DEPENDS core85_gui
@@ -92,10 +218,10 @@ if(CORE85_BUILD_TESTS)
92218
tests/test_data_transfer.cpp
93219
tests/test_io.cpp
94220
tests/test_instruction_matrix.cpp
221+
tests/test_interrupts.cpp
95222
tests/test_logical.cpp
96223
tests/test_memory.cpp
97224
tests/test_stack.cpp
98-
tests/test_interrupts.cpp
99225
)
100226

101227
target_link_libraries(core85_tests
@@ -121,3 +247,63 @@ if(CORE85_BUILD_TESTS)
121247
COMMENT "Building and running the Core85 test suite"
122248
)
123249
endif()
250+
251+
install(FILES ${CORE85_DOC_FILES}
252+
DESTINATION ${CMAKE_INSTALL_DOCDIR}
253+
)
254+
255+
install(DIRECTORY docs/
256+
DESTINATION ${CMAKE_INSTALL_DOCDIR}/docs
257+
FILES_MATCHING
258+
PATTERN "*.docx"
259+
)
260+
261+
install(DIRECTORY tests/asm/
262+
DESTINATION ${CMAKE_INSTALL_DATADIR}/core85/examples
263+
FILES_MATCHING
264+
PATTERN "*.asm"
265+
)
266+
267+
install(EXPORT Core85Targets
268+
FILE Core85Targets.cmake
269+
NAMESPACE Core85::
270+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Core85
271+
)
272+
273+
if(CORE85_DEPLOY_SCRIPT)
274+
install(SCRIPT ${CORE85_DEPLOY_SCRIPT})
275+
endif()
276+
277+
set(CPACK_PACKAGE_NAME "Core85")
278+
set(CPACK_PACKAGE_VENDOR "Core85 Engineering Team")
279+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
280+
"Cross-platform Intel 8085 emulator and educational simulator")
281+
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
282+
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Core85")
283+
set(CPACK_PACKAGE_FILE_NAME
284+
"Core85-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
285+
set(CPACK_MONOLITHIC_INSTALL ON)
286+
set(CPACK_PACKAGE_CHECKSUM SHA256)
287+
set(CPACK_VERBATIM_VARIABLES YES)
288+
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
289+
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/NOTICES.md")
290+
291+
if(APPLE)
292+
set(CPACK_GENERATOR "ZIP")
293+
elseif(WIN32)
294+
set(CPACK_GENERATOR "ZIP")
295+
else()
296+
set(CPACK_GENERATOR "TGZ")
297+
endif()
298+
299+
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
300+
set(CPACK_SOURCE_IGNORE_FILES
301+
"/build/"
302+
"/build-gui/"
303+
"/\\.git/"
304+
"/\\.idea/"
305+
"/\\.vscode/"
306+
"\\.DS_Store"
307+
)
308+
309+
include(CPack)

NOTICES.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Core85 Notices
2+
3+
## Project Notice
4+
5+
Core85 is distributed as a C++17 application and library with a Qt 6 desktop frontend.
6+
7+
## Qt Notice
8+
9+
Core85 is intended to use the Qt LGPL edition with dynamic linking for redistribution scenarios that require LGPL compliance. When shipping binary packages, bundle only the Qt runtime pieces required by the application.
10+
11+
Redistributors are responsible for:
12+
13+
- complying with the applicable Qt license terms
14+
- preserving Qt copyright and license notices
15+
- making any required reverse-linking or relinking rights available when LGPL obligations apply
16+
17+
## Third-Party Components
18+
19+
### Qt 6
20+
21+
- usage: GUI framework and runtime deployment support
22+
- upstream: The Qt Company and contributors
23+
- expected license path: refer to the installed Qt distribution used to build the package
24+
25+
### GoogleTest
26+
27+
- usage: development and test-only dependency
28+
- upstream: GoogleTest contributors
29+
- note: not required for end-user runtime packages
30+
31+
## Packaging Guidance
32+
33+
- keep Qt runtime deployment minimal
34+
- do not bundle development-only tools into end-user packages
35+
- verify package contents and package size during release smoke tests

0 commit comments

Comments
 (0)