Improved trunc() function when no SSE4.1 is available #15
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" | |
on: | |
push: | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { title: "linux-lib" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Debug" , problem_matcher: "cpp" } | |
- { title: "macos-lib" , os: "macos-latest" , cc: "clang" , arch: "x64", build_type: "Debug" , problem_matcher: "cpp" } | |
- { title: "windows-lib" , os: "windows-latest", cc: "vs2022" , arch: "x64", build_type: "Debug" , problem_matcher: "cpp" } | |
- { title: "diag-asan" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Release", diagnostics: "address" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "diag-ubsan" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Release", diagnostics: "undefined", defs: "MATHPRESSO_TEST=1" } | |
- { title: "diag-valgrind" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Release", diagnostics: "valgrind" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "diag-scan-build" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Debug" , diagnostics: "scan-build" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-9" , arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-9" , arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-9" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-9" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-10" , arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-10" , arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-10" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-10" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-11" , arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-11" , arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-11" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-11" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-12" , arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-12" , arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-12" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "gcc-12" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-11", arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-11", arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-11", arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-11", arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-12", arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-12", arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-12", arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-12", arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "macos" , os: "macos-12" , cc: "gcc-11" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "macos" , os: "macos-12" , cc: "gcc-11" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "macos" , os: "macos-12" , cc: "clang" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "macos" , os: "macos-12" , cc: "clang" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2019" , cc: "vs2019" , arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2019" , cc: "vs2019" , arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2019" , cc: "vs2019" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2019" , cc: "vs2019" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2022" , cc: "vs2022" , arch: "x86", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2022" , cc: "vs2022" , arch: "x86", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2022" , cc: "vs2022" , arch: "x64", build_type: "Debug" , defs: "MATHPRESSO_TEST=1" } | |
- { title: "windows" , os: "windows-2022" , cc: "vs2022" , arch: "x64", build_type: "Release", defs: "MATHPRESSO_TEST=1" } | |
- { host: "ubuntu-latest" , os: "freebsd", osver: "13.1", cc: "clang", arch: "x86-64", build_type: "Release", defs: "MATHPRESSO_TEST=ON" } | |
- { host: "ubuntu-latest" , os: "netbsd" , osver: "9.3" , cc: "clang", arch: "x86-64", build_type: "Release", defs: "MATHPRESSO_TEST=ON" } | |
- { host: "ubuntu-latest" , os: "openbsd", osver: "7.3" , cc: "clang", arch: "x86-64", build_type: "Release", defs: "MATHPRESSO_TEST=ON" } | |
name: "${{matrix.title || format('{0}-{1}', matrix.os, matrix.osver)}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})" | |
runs-on: "${{matrix.host || matrix.os}}" | |
steps: | |
- name: "Checkout MathPresso" | |
uses: actions/checkout@v3 | |
with: | |
path: "mathpresso" | |
- name: "Checkout AsmJit" | |
uses: actions/checkout@v3 | |
with: | |
repository: asmjit/asmjit | |
path: "asmjit" | |
- name: "Checkout Build Actions" | |
uses: actions/checkout@v3 | |
with: | |
repository: build-actions/build-actions | |
path: "build-actions" | |
- name: "Setup Python" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: "Build & Test" | |
if: ${{!matrix.host}} | |
run: python build-actions/action.py | |
--step=all | |
--compiler=${{matrix.cc}} | |
--architecture=${{matrix.arch}} | |
--source-dir=mathpresso | |
--config=mathpresso/.github/workflows/build-config.json | |
--build-type=${{matrix.build_type}} | |
--build-defs=${{matrix.defs}} | |
- name: "Build & Test in VM" | |
if: ${{matrix.host}} | |
uses: cross-platform-actions/action@master | |
with: | |
operating_system: ${{matrix.os}} | |
architecture: ${{matrix.arch}} | |
version: ${{matrix.osver}} | |
shell: bash | |
run: | | |
set -e | |
PATH="/usr/sbin:/usr/pkg/sbin:/usr/pkg/bin:$PATH:$(pwd)/build-actions" | |
CI_NETBSD_USE_PKGIN=1 | |
export PATH | |
export CI_NETBSD_USE_PKGIN | |
sh ./build-actions/prepare-environment.sh | |
python3 build-actions/action.py \ | |
--step=all \ | |
--compiler=${{matrix.cc}} \ | |
--architecture=${{matrix.arch}} \ | |
--source-dir=mathpresso \ | |
--config=mathpresso/.github/workflows/build-config.json \ | |
--build-type=${{matrix.build_type}} \ | |
--build-defs=${{matrix.defs}} |