Skip to content

Allow build dft on MinGW #2

Allow build dft on MinGW

Allow build dft on MinGW #2

name: "MSYS2 Build & Test"
on:
# allow direct trigger
workflow_dispatch:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
COMMON_CMAKE_FLAGS: >
-DSLEEF_SHOW_CONFIG=1
-DSLEEF_BUILD_GNUABI_LIBS=ON
-DSLEEF_BUILD_DFT=ON
-DSLEEF_BUILD_QUAD=ON
-DSLEEF_BUILD_SCALAR_LIB=ON
-DSLEEF_BUILD_STATIC_TEST_BINS=ON
-DSLEEF_ENFORCE_TESTER=ON
-DSLEEF_ENFORCE_TESTER3=ON
jobs:
build-msys2:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys:
- clang64
#- mingw64
#- ucrt64
defaults:
run:
shell: msys2 {0}
name: build-msys2-${{ matrix.sys }}
steps:
- name: Disable autocrlf
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
git
pacboy: >-
cmake:p
ninja:p
cc:p
pkgconf:p
mpfr:p
openssl:p
- uses: actions/[email protected]
with:
persist-credentials: false
- name: Build msys2
shell: msys2 {0}
run: |
EXTRA_CMAKE_FLAGS="-DSLEEF_ENFORCE_SSE2=ON -DSLEEF_ENFORCE_SSE4=ON -DSLEEF_ENFORCE_AVX=ON -DSLEEF_ENFORCE_AVX=ON -DSLEEF_ENFORCE_AVX2=ON -DSLEEF_ENFORCE_AVX512F=ON -DSLEEF_ENFORCE_FMA4=ON"
cmake -S . -B _build-msys2 -GNinja \
-DCMAKE_INSTALL_PREFIX=$(pwd)/_install-msys2 \
${COMMON_CMAKE_FLAGS} \
${EXTRA_CMAKE_FLAGS} \
-DOPENSSL_EXTRA_LIBRARIES="-lws2_32 -lcrypt32"
cmake --build _build-msys2
cmake --install _build-msys2
- name: Upload build-msys2-${{ matrix.sys }} artifacts
uses: actions/upload-artifact@v3
with:
name: build-msys2-${{ matrix.sys }}
path: |
_build-*
_install-*
if: always()
test-msys2:
runs-on: windows-latest
needs: [build-msys2]
strategy:
fail-fast: false
matrix:
sys:
- clang64
#- mingw64
#- ucrt64
defaults:
run:
shell: msys2 {0}
name: test-msys2-${{ matrix.sys }}
steps:
- name: Disable autocrlf
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
git
pacboy: >-
cmake:p
ninja:p
cc:p
pkgconf:p
mpfr:p
openssl:p
- uses: actions/[email protected]
with:
persist-credentials: false
- name: Print host CPU info
run: |
wget -qO- https://download.sysinternals.com/files/Coreinfo.zip | bsdtar -xf-
./Coreinfo64.exe -accepteula
- name: Download build-msys2-${{ matrix.sys }} artifacts
uses: actions/download-artifact@v3
with:
name: build-msys2-${{ matrix.sys }}
- name: Test msys2
env:
CTEST_OUTPUT_ON_FAILURE: "TRUE"
run: |
cd _build-msys2
ctest -j$(nproc)
- name: Upload test-msys2 artifacts
uses: actions/upload-artifact@v3
with:
name: test-msys2
path: |
_build-msys2/Testing
if: always()