File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1+ # Detect if running in GitHub Actions
2+ if (DEFINED ENV{GITHUB_ACTIONS} AND "$ENV{GITHUB_ACTIONS} " STREQUAL "true" )
3+ message (STATUS "Running on GitHub Actions runner." )
4+ set (IS_GITHUB_ACTIONS ON )
5+ endif ()
6+
17# Step 1: Check compiler support for AVX-512DQ
28check_cxx_compiler_flag("-mavx512dq" COMPILER_SUPPORTS_AVX512DQ)
39
@@ -19,14 +25,20 @@ if (COMPILER_SUPPORTS_AVX512DQ)
1925 COMPILE_DEFINITIONS -mavx512dq
2026 )
2127
22- if (HAS_AVX512DQ_SUPPORT)
28+ if (HAS_AVX512DQ_SUPPORT AND NOT IS_GITHUB_ACTIONS )
2329 message (STATUS "Hardware supports AVX-512DQ. Adding AVX-512DQ flags." )
2430 set (AVX512DQ_FLAG "-mavx512dq" )
31+ elseif (HAS_AVX512DQ_SUPPORT AND IS_GITHUB_ACTIONS)
32+ message (WARNING "AVX-512DQ is supported, but flags will not be added on GitHub Actions runner." )
2533 else ()
2634 message (STATUS "Hardware does not support AVX-512DQ." )
2735 endif ()
2836else ()
29- message (STATUS "Compiler does not support AVX-512DQ." )
37+ if (IS_GITHUB_ACTIONS)
38+ message (WARNING "Compiler on GitHub Actions runner does not support AVX-512DQ." )
39+ else ()
40+ message (STATUS "Compiler does not support AVX-512DQ." )
41+ endif ()
3042endif ()
3143
3244# Define the library
@@ -39,7 +51,7 @@ add_library(ALP
3951 fastlanes_unffor.cpp
4052 )
4153
42- # Add AVX-512DQ flag if supported
54+ # Add AVX-512DQ flag if supported and not on GitHub Actions
4355if (AVX512DQ_FLAG)
4456 target_compile_options (ALP PUBLIC ${AVX512DQ_FLAG} )
4557endif ()
You can’t perform that action at this time.
0 commit comments