Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add release on macos-14 #2950

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ jobs:

macOS:
name: 'Build macOS Release'
runs-on: macos-latest
runs-on: ${{ matrix.runner.os }}
strategy:
fail-fast: false
matrix:
runner:
- { os: macos-12, arch: x64 }
- { os: macos-14, arch: arm64 }
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -86,7 +92,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: exiv2-macos
name: exiv2-${{ matrix.runner.os }}-${{ matrix.runner.arch }}
path: ./build/exiv2-*.tar.gz
if-no-files-found: error
retention-days: 1
Expand Down Expand Up @@ -223,5 +229,5 @@ jobs:
tag_name: ${{ env.TAG_NAME }}
files: |
./exiv2-linux64/exiv2-*
./exiv2-macos/exiv2-*
./exiv2-macos-*/exiv2-*
./exiv2-win/exiv2-*
13 changes: 8 additions & 5 deletions cmake/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ else()
set(CPACK_GENERATOR TGZ) # MinGW/Cygwin/Linux/macOS etc use .tar.gz
endif()

set (BS "") # Bit Size
if ( NOT APPLE )
set (BARCH "") # Target architecture
if ( MSVC OR MSYS OR CYGWIN OR MINGW )
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
LeoHsiao1 marked this conversation as resolved.
Show resolved Hide resolved
set (BS 64)
set (BARCH 64bit)
else()
LeoHsiao1 marked this conversation as resolved.
Show resolved Hide resolved
set (BS 32)
set (BARCH 32bit)
endif()
else()
# Will be "arm64", "x86_64" / "amd64", etc.
set (BARCH ${CMAKE_HOST_SYSTEM_PROCESSOR})
LeoHsiao1 marked this conversation as resolved.
Show resolved Hide resolved
endif()

set (LT "") # Library Type
Expand Down Expand Up @@ -113,7 +116,7 @@ endif()
# Set RV = Release Version
set(RV "Exiv2 v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")

set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${VS}${BUNDLE_NAME}${BS}${CC}${LT}${BT}${WR})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${BARCH}-${VS}${BUNDLE_NAME}${CC}${LT}${BT}${WR})

# https://stackoverflow.com/questions/17495906/copying-files-and-including-them-in-a-cpack-archive
install(FILES "${PROJECT_SOURCE_DIR}/samples/exifprint.cpp" DESTINATION "samples")
Expand Down
Loading