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

[INFRA] Use macos-14 #232

Merged
merged 3 commits 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
9 changes: 5 additions & 4 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defaults:
jobs:
build:
name: ${{ matrix.compiler }}
runs-on: macos-12
runs-on: macos-14
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
strategy:
fail-fast: false
Expand All @@ -43,10 +43,11 @@ jobs:
compiler: ${{ matrix.compiler }}
ccache_size: 75M

- name: Install CMake
uses: seqan/actions/setup-cmake@main
- name: Patch M1 GCC
if: contains(matrix.compiler, 'gcc') && matrix.compiler != 'gcc-14'
uses: seqan/actions/patch-m1-gcc@main
with:
cmake: 3.28.5
compiler: ${{ matrix.compiler }}

- name: Configure tests
run: |
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/ci_sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
fail-fast: false
matrix:
name: [ASan, TSan, UBSan]
os: [ubuntu-latest, macos-12]
os: [ubuntu-latest, macos-14]
build_type: [Release, RelWithDebInfo, Debug]
exclude:
- name: "TSan"
os: macos-12
os: macos-14

include:
- name: "ASan"
Expand All @@ -46,14 +46,14 @@ jobs:
cxx_flags: "-fno-omit-frame-pointer -fsanitize=thread"

- name: "UBSan"
os: macos-12
os: macos-14
cxx_flags: "-fno-omit-frame-pointer -fsanitize=undefined,float-divide-by-zero,implicit-conversion,local-bounds,nullability -Wno-pass-failed"

- name: "UBSan"
os: ubuntu-latest
cxx_flags: "-fno-omit-frame-pointer -fsanitize=undefined,float-divide-by-zero"

- os: macos-12
- os: macos-14
compiler: clang-18

- os: ubuntu-latest
Expand All @@ -78,6 +78,12 @@ jobs:
with:
compiler: ${{ matrix.compiler }}

- name: Patch M1 GCC
if: contains(matrix.os, 'macos') && contains(matrix.compiler, 'gcc') && matrix.compiler != 'gcc-14'
uses: seqan/actions/patch-m1-gcc@main
with:
compiler: ${{ matrix.compiler }}

- name: Configure tests
run: |
mkdir build && cd build
Expand Down
13 changes: 12 additions & 1 deletion cmake/configuration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,19 @@ else ()
set (HIBF_IS_DEBUG FALSE)
endif ()

# Apple M1 with GCC sets `march=apple-m1` when using `-march=native`. This option is only available with GCC >= 14.
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm64"
AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
set (HIBF_M1_NO_NATIVE TRUE)
else ()
set (HIBF_M1_NO_NATIVE FALSE)
endif ()

option (HIBF_NATIVE_BUILD "Optimize build for current architecture." ON)
if (HIBF_IS_DEBUG)
if (HIBF_M1_NO_NATIVE)
hibf_config_print ("Optimize build: disabled (Apple M1 with GCC < 14)")
elseif (HIBF_IS_DEBUG)
hibf_config_print ("Optimize build: disabled")
elseif (HIBF_NATIVE_BUILD)
set (HIBF_CXX_FLAGS "${HIBF_CXX_FLAGS} -march=native")
Expand Down
Loading