diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b92bc78ee..6eaa6182e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: matrix: compiler: [ g++, clang++ ] configuration: [ Debug, Release ] - system: [ ubuntu-20.04, ubuntu-22.04 ] + system: [ ubuntu-20.04, ubuntu-22.04, macos-14 ] steps: - uses: actions/checkout@v3 - run: ./script/setup-${{ matrix.system }}.sh --all diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c38085a3..2eb1dfa3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,13 +169,16 @@ install( # /usr/share/meevax/meevax-config-version.cmake # ---- Target package ---------------------------------------------------------- -set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tatsuya Yamasaki") -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) -set(CPACK_GENERATOR DEB) -set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE) -set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md) -set(CPACK_THREADS 0) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tatsuya Yamasaki") + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + set(CPACK_GENERATOR DEB) + set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE) + set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md) +else() + set(CPACK_GENERATOR productbuild) +endif() include(CPack) @@ -183,7 +186,7 @@ include(CPack) enable_testing() -if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") find_program(${PROJECT_NAME}_MEMORY_CHECK_COMMAND valgrind) set(${PROJECT_NAME}_MEMORY_CHECK_OPTIONS --error-exitcode=1 --leak-check=full --quiet --show-leak-kinds=all) else() @@ -231,10 +234,18 @@ endforeach() # ---- Additional Targets ------------------------------------------------------ -execute_process(COMMAND nproc OUTPUT_VARIABLE ${PROJECT_NAME}_NPROC) - -add_custom_target(develop - COMMAND ${CMAKE_MAKE_PROGRAM} -j${${PROJECT_NAME}_NPROC} - COMMAND ${CMAKE_MAKE_PROGRAM} test ARGS=-j${${PROJECT_NAME}_NPROC} - COMMAND ${CMAKE_MAKE_PROGRAM} package - COMMAND sudo dpkg -i ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION}_amd64.deb) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + execute_process(COMMAND nproc OUTPUT_VARIABLE ${PROJECT_NAME}_NPROC) + add_custom_target(develop + COMMAND ${CMAKE_MAKE_PROGRAM} -j${${PROJECT_NAME}_NPROC} + COMMAND ${CMAKE_MAKE_PROGRAM} test ARGS=-j${${PROJECT_NAME}_NPROC} + COMMAND ${CMAKE_MAKE_PROGRAM} package + COMMAND sudo dpkg -i ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION}_amd64.deb) +else() + execute_process(COMMAND sysctl -n hw.ncpu OUTPUT_VARIABLE ${PROJECT_NAME}_NCPU) + add_custom_target(develop + COMMAND ${CMAKE_MAKE_PROGRAM} -j${${PROJECT_NAME}_NCPU} + COMMAND ${CMAKE_MAKE_PROGRAM} test ARGS=-j${${PROJECT_NAME}_NCPU} + COMMAND ${CMAKE_MAKE_PROGRAM} package + COMMAND sudo installer -pkg ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-${PROJECT_VERSION}-Darwin.pkg -target $ENV{HOME}) +endif() diff --git a/README.md b/README.md index dd6f554b2..d5e4fecf7 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Procedures for each standard are provided by the following R7RS-style libraries: cmake -B build -DCMAKE_BUILD_TYPE=Release cd build make package -sudo apt install build/meevax_0.5.234_amd64.deb +sudo apt install build/meevax_0.5.235_amd64.deb ``` or @@ -122,9 +122,9 @@ sudo rm -rf /usr/local/share/meevax | Target Name | Description |-------------|------------- -| `all` | Build shared-library `libmeevax.0.5.234.so` and executable `meevax` +| `all` | Build shared-library `libmeevax.0.5.235.so` and executable `meevax` | `test` | Test executable `meevax` -| `package` | Generate debian package `meevax_0.5.234_amd64.deb` +| `package` | Generate debian package `meevax_0.5.235_amd64.deb` | `install` | Copy files into `/usr/local` directly ## Usage diff --git a/VERSION b/VERSION index 0445208a8..4c3b86c1f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.234 +0.5.235