Fix detection of Westmere kernel #493
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-test | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
cc: gcc | |
build_type: Debug | |
build_tool_options: -j 4 | |
analyzer: off | |
- os: ubuntu-22.04 | |
cc: clang | |
build_type: Debug | |
build_tool_options: -j 4 | |
analyzer: off | |
sanitizer: address,undefined | |
- os: macos-12 | |
packages: automake | |
build_type: Debug | |
build_tool_options: -j 4 | |
analyzer: off | |
- os: windows-2022 | |
generator: "Visual Studio 17 2022" | |
build_type: Debug | |
build_tool_options: "-nologo -verbosity:minimal -maxcpucount:4 -p:CL_MPCount=4" | |
- os: windows-2022 | |
cc: 'C:/mingw64/bin/gcc.exe' | |
generator: 'MinGW Makefiles' | |
build_type: Debug | |
steps: | |
- uses: actions/checkout@v4 | |
# Use for SSH access | |
#- uses: mxschmitt/action-tmate@v3 | |
# with: | |
# detached: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' # use latest Python 3.x | |
- name: 'Add user site-packages to PATH' | |
if: runner.os != 'Windows' | |
shell: bash | |
run: | | |
echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH | |
- name: 'Add user site-packages to PATH' | |
if: runner.os == 'Windows' | |
shell: pwsh | |
run: | | |
$python_base = python -m site --user-base | |
Write-Output "$python_base\\bin" >> $GITHUB_PATH | |
- name: 'Install macOS packages' | |
if: runner.os == 'macOS' | |
shell: bash | |
run: | | |
brew install ${{matrix.packages}} | |
- name: 'Install MSYS2 packages' | |
uses: msys2/setup-msys2@v2 | |
if: runner.os == 'Windows' && matrix.generator == 'MinGW Makefiles' | |
with: | |
update: false | |
release: false | |
install: make gcc base-devel autotools autoconf-wrapper | |
- name: 'Workaround for actions/runner-images#9491' | |
if: runner.os == 'Linux' | |
run: sudo sysctl vm.mmap_rnd_bits=28 | |
- name: 'Install Conan C/C++ package manager' | |
id: install_conan | |
shell: bash | |
env: | |
CC: ${{matrix.cc}} | |
# Set CONAN_BASH_PATH to avoid having to build msys2 for Conan packages. | |
CONAN_BASH_PATH: "C:\\msys64\\usr\\bin\\bash.exe" | |
run: | | |
pip install conan --user --upgrade | |
conan profile detect | |
conan_home=$(conan config home) | |
echo "conan_data=${conan_home}/p" >> $GITHUB_OUTPUT | |
- name: 'Restore Conan cache' | |
id: cache_conan | |
uses: actions/cache@v4 | |
with: | |
key: conan | 1 | ${{runner.os}} | ${{matrix.cc}} | ${{matrix.build_type}} | |
path: ${{ steps.install_conan.outputs.conan_data }} | |
- name: 'Build simdzone' | |
id: build | |
shell: bash | |
env: | |
CC: ${{matrix.cc}} | |
ANALYZER: ${{matrix.analyzer}} | |
SANITIZER: ${{matrix.sanitizer}} | |
GENERATOR: ${{matrix.generator}} | |
BUILD_TYPE: ${{matrix.build_type}} | |
BUILD_TOOL_OPTIONS: ${{matrix.build_tool_options}} | |
WARNINGS_AS_ERRORS: ${{matrix.warnings_as_errors}} | |
CONAN_BASH_PATH: "C:\\msys64\\usr\\bin\\bash.exe" | |
run: | | |
set -e -x | |
mkdir build | |
cd build | |
conan install -b missing -s build_type=${BUILD_TYPE:-RelWithDebInfo} -of . ../conanfile.txt | |
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-RelWithDebInfo} \ | |
-DCMAKE_COMPILE_WARNING_AS_ERROR=${WARNINGS_AS_ERRORS:-on} \ | |
-DCMAKE_PREFIX_PATH=$(pwd) \ | |
-DBUILD_TESTING=on \ | |
-DANALYZER=${ANALYZER:-off} \ | |
-DSANITIZER=${SANITIZER:-off} \ | |
${GENERATOR:+-G} ${GENERATOR:+"${GENERATOR}"} .. | |
cmake --build . --config ${BUILD_TYPE:-RelWithDebInfo} -- ${BUILD_TOOL_OPTIONS} | |
- name: 'Run simdzone tests' | |
id: test | |
shell: bash | |
env: | |
BUILD_TYPE: ${{matrix.build_type}} | |
run: | | |
set -e -x | |
cd build | |
ctest -j 4 --output-on-failure -T test -C ${BUILD_TYPE:-RelWithDebInfo} | |
ZONE_KERNEL=fallback ctest -j 4 --output-on-failure -T test -C ${BUILD_TYPE:-RelWithDebInfo} | |
- name: 'Build simdzone with configure + make' | |
if: runner.os != 'Windows' | |
id: test_autoconf | |
shell: bash | |
run: | | |
set -e -x | |
echo $PATH | |
autoreconf -i | |
./configure | |
make -j 2 |