Feat/mulhilo #105
Workflow file for this run
This file contains hidden or 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: IBM Z cross-compilation build | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: '${{ matrix.target.platform }}, ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}' | |
| strategy: | |
| matrix: | |
| target: | |
| - { platform: 's390x', dir: 's390x-linux-gnu', full: 'OFF' } | |
| sys: | |
| - { compiler: 'gcc', version: '14' } | |
| steps: | |
| - name: Setup compiler | |
| if: ${{ matrix.sys.compiler == 'gcc' }} | |
| run: | | |
| sudo apt-get update || exit 1 | |
| sudo apt-get -y --no-install-suggests --no-install-recommends install g++-${{ matrix.sys.version }}-${{ matrix.target.dir }} g++-${{ matrix.sys.version }}-multilib cmake || exit 1 | |
| sudo update-alternatives --remove-all ${{ matrix.target.dir }}-gcc || true | |
| sudo update-alternatives --remove-all ${{ matrix.target.dir }}-g++ || true | |
| sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-gcc ${{ matrix.target.dir }}-gcc /usr/bin/${{ matrix.target.dir }}-gcc-${{ matrix.sys.version }} 20 | |
| sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-g++ ${{ matrix.target.dir }}-g++ /usr/bin/${{ matrix.target.dir }}-g++-${{ matrix.sys.version }} 20 | |
| - name: Setup QEMU | |
| run: | | |
| sudo apt-get --no-install-suggests --no-install-recommends install qemu-user | |
| - name: Setup Ninja | |
| run: | | |
| sudo apt-get install ninja-build | |
| - name: Checkout xsimd | |
| uses: actions/checkout@v6 | |
| - name: Setup | |
| run: | | |
| cmake -B build/ \ | |
| -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON \ | |
| -DBUILD_BENCHMARK=${{ matrix.target.full }} -DBUILD_EXAMPLES=${{ matrix.target.full }} \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_C_FLAGS="${{ matrix.target.flags }}" \ | |
| -DCMAKE_CXX_FLAGS="${{ matrix.target.flags }}" \ | |
| -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-${{ matrix.target.dir }}.cmake | |
| - name: Build | |
| run: cmake --build build/ --verbose -j1 | |
| - name: Testing xsimd | |
| run: | | |
| # Set CPU feature test expectations, 0 is explicit absence of the feature | |
| export XSIMD_TEST_CPU_ASSUME_SSE4_2="0" | |
| export XSIMD_TEST_CPU_ASSUME_NEON64="0" | |
| export XSIMD_TEST_CPU_ASSUME_RVV="0" | |
| export XSIMD_TEST_CPU_ASSUME_VSX="0" | |
| export XSIMD_TEST_CPU_ASSUME_VXE="1" | |
| qemu-${{ matrix.target.platform }} -L /usr/${{ matrix.target.dir}}/ ./build/test/test_xsimd |