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

Provide x64 builds for macOS again in addition to the arm64 builds #239

Merged
merged 1 commit into from
Sep 18, 2024
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
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ jobs:
runs-on: ${{ matrix.sys.os }}
strategy:
matrix:
sys:
- { name: linux-glibc, os: ubuntu-latest, shell: bash }
- { name: linux-musl, os: ubuntu-latest, shell: 'alpine.sh --root {0}' }
- { name: windows, os: windows-latest, shell: pwsh }
- { name: mac, os: macos-latest, shell: bash }
sys:
- { name: linux-glibc, os: ubuntu-latest, shell: bash, osx_architectures: '' }
- { name: linux-musl, os: ubuntu-latest, shell: 'alpine.sh --root {0}', osx_architectures: '' }
- { name: windows, os: windows-latest, shell: pwsh, osx_architectures: '' }
- { name: mac, os: macos-latest, shell: bash, osx_architectures: 'arm64' }
- { name: mac, os: macos-latest, shell: bash, osx_architectures: 'x86_64' }
defaults:
run:
shell: ${{ matrix.sys.shell }}
Expand Down Expand Up @@ -47,7 +48,7 @@ jobs:
- name: Configure CMake
env:
USE_MUSL_LIBC: ${{ matrix.sys.name == 'linux-musl' }}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_MUSL_LIBC=${{env.USE_MUSL_LIBC}} -DZIP_RELEASE=1
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=${{matrix.sys.osx_architectures}} -DUSE_MUSL_LIBC=${{env.USE_MUSL_LIBC}} -DZIP_RELEASE=1

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
runs-on: ${{ matrix.sys.os }}
strategy:
matrix:
sys:
- { name: linux-glibc, os: ubuntu-latest, shell: bash }
- { name: linux-musl, os: ubuntu-latest, shell: 'alpine.sh --root {0}' }
- { name: windows, os: windows-latest, shell: pwsh }
- { name: mac, os: macos-latest, shell: bash }
sys:
- { name: linux-glibc, os: ubuntu-latest, shell: bash, osx_architectures: '' }
- { name: linux-musl, os: ubuntu-latest, shell: 'alpine.sh --root {0}', osx_architectures: '' }
- { name: windows, os: windows-latest, shell: pwsh, osx_architectures: '' }
- { name: mac, os: macos-latest, shell: bash, osx_architectures: 'arm64' }
- { name: mac, os: macos-latest, shell: bash, osx_architectures: 'x86_64' }
defaults:
run:
shell: ${{ matrix.sys.shell }}
Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
- name: Configure CMake
env:
USE_MUSL_LIBC: ${{ matrix.sys.name == 'linux-musl' }}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_MUSL_LIBC=${{env.USE_MUSL_LIBC}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=${{matrix.sys.osx_architectures}} -DUSE_MUSL_LIBC=${{env.USE_MUSL_LIBC}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ jobs:
runs-on: ${{ matrix.sys.os }}
strategy:
matrix:
sys:
- { name: linux-glibc, os: ubuntu-latest, shell: bash }
- { name: linux-musl, os: ubuntu-latest, shell: 'alpine.sh --root {0}' }
- { name: windows, os: windows-latest, shell: pwsh }
- { name: mac, os: macos-latest, shell: bash }
sys:
- { name: linux-glibc, os: ubuntu-latest, shell: bash, osx_architectures: '' }
- { name: linux-musl, os: ubuntu-latest, shell: 'alpine.sh --root {0}', osx_architectures: '' }
- { name: windows, os: windows-latest, shell: pwsh, osx_architectures: '' }
- { name: mac, os: macos-latest, shell: bash, osx_architectures: 'arm64' }
- { name: mac, os: macos-latest, shell: bash, osx_architectures: 'x86_64' }
defaults:
run:
shell: ${{ matrix.sys.shell }}
Expand Down Expand Up @@ -46,7 +47,7 @@ jobs:
- name: Configure CMake
env:
USE_MUSL_LIBC: ${{ matrix.sys.name == 'linux-musl' }}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_MUSL_LIBC=${{env.USE_MUSL_LIBC}} -DZIP_RELEASE=1
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=${{matrix.sys.osx_architectures}} -DUSE_MUSL_LIBC=${{env.USE_MUSL_LIBC}} -DZIP_RELEASE=1

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## v2.2

- Provide x64 builds for macOS again in addition to the arm64 builds.
- stdump: The `functions` and `globals` subcommands now output a header comment like the `types` command.
- stdump: The output format of the `files` subcommand has been updated.

Expand Down
14 changes: 12 additions & 2 deletions cmake/release_crafter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ if(ZIP_RELEASE)
else()
set(RELEASE_VERSION ${GIT_TAG})
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(USE_MUSL_LIBC)
set(RELEASE_OS "linux-musl")
else()
Expand All @@ -25,7 +26,16 @@ if(ZIP_RELEASE)
else()
set(RELEASE_OS ${CMAKE_SYSTEM_NAME})
endif()
set(RELEASE_NAME "ccc_${RELEASE_VERSION}_${RELEASE_OS}")

if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
set(RELEASE_ARCHITECTURE "x64")
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64")
set(RELEASE_ARCHITECTURE "arm64")
else()
set(RELEASE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
endif()

set(RELEASE_NAME "ccc_${RELEASE_VERSION}_${RELEASE_OS}_${RELEASE_ARCHITECTURE}")
add_custom_target(releasezip ALL
COMMAND
${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/${RELEASE_NAME}" &&
Expand Down
Loading