# DO NOT EDIT - GENERATED FROM .github/workflows-in/embedded.ys

name: embedded
defaults:
  run:
    shell: bash -e -x {0}
'on':
  workflow_dispatch: null
  push:
    branches:
    - master
  pull_request:
    branches:
    - '*'
env:
  PROJ_PKG_NAME: rapidyaml-
  PROJ_PFX_TARGET: ryml-
  PROJ_PFX_CMAKE: RYML_
  CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
  NUM_JOBS_BUILD: null
jobs:
  canary11:
    if: always()
    continue-on-error: false
    name: ${{matrix.arch}}/c++11
    runs-on: ubuntu-24.04
    strategy:
      fail-fast: false
      matrix:
        include:
        - arch: armv7
          tc: arm-linux-gnueabihf
          flags: -march=armv7+fp
    steps:
    - name: checkout (action)
      uses: actions/checkout@v4
      with:
        submodules: recursive
        fetch-depth: 0
    - name: install
      run: |
        sudo apt-get update
        sudo apt-get install -y \
            gcc${{matrix.version}}-${{matrix.tc}} \
            g++${{matrix.version}}-${{matrix.tc}} \
            qemu-user-static
    - name: info
      run: |
        ${{matrix.tc}}-g++${{matrix.version}} --version
        ${{matrix.tc}}-g++${{matrix.version}} -dM -E - </dev/null | sort
        ${{matrix.tc}}-g++${{matrix.version}} ${{matrix.flags}} -dM -E - </dev/null | sort
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++11/Debug
    - name: configure ${{matrix.arch}}/c++11/Debug
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Debug \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=11 \
            -DCXX_STANDARD=11 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++11/Debug
      run: |
        cmake --build build --parallel --target ryml-test-build --verbose
    - name: test ${{matrix.arch}}/c++11/Debug
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++11/Release
    - name: configure ${{matrix.arch}}/c++11/Release
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Release \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=11 \
            -DCXX_STANDARD=11 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++11/Release
      run: |
        cmake --build build --parallel --target ryml-test-build --verbose
    - name: test ${{matrix.arch}}/c++11/Release
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
  canary20:
    if: always()
    continue-on-error: false
    name: ${{matrix.arch}}/c++20
    runs-on: ubuntu-24.04
    strategy:
      fail-fast: false
      matrix:
        include:
        - arch: armv7
          tc: arm-linux-gnueabihf
          flags: -march=armv7+fp
    steps:
    - name: checkout (action)
      uses: actions/checkout@v4
      with:
        submodules: recursive
        fetch-depth: 0
    - name: install
      run: |
        sudo apt-get update
        sudo apt-get install -y \
            gcc${{matrix.version}}-${{matrix.tc}} \
            g++${{matrix.version}}-${{matrix.tc}} \
            qemu-user-static
    - name: info
      run: |
        ${{matrix.tc}}-g++${{matrix.version}} --version
        ${{matrix.tc}}-g++${{matrix.version}} -dM -E - </dev/null | sort
        ${{matrix.tc}}-g++${{matrix.version}} ${{matrix.flags}} -dM -E - </dev/null | sort
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++20/Debug
    - name: configure ${{matrix.arch}}/c++20/Debug
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Debug \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=20 \
            -DCXX_STANDARD=20 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++20/Debug
      run: |
        cmake --build build --parallel --target ryml-test-build --verbose
    - name: test ${{matrix.arch}}/c++20/Debug
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++20/Release
    - name: configure ${{matrix.arch}}/c++20/Release
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Release \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=20 \
            -DCXX_STANDARD=20 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++20/Release
      run: |
        if [ ${{matrix.arch}} == aarch64 ] ; then
          nproc=$((`nproc` / 2))
          cmake --build build --parallel $nproc --target ryml-test-build --verbose
        else
          cmake --build build --parallel --target ryml-test-build --verbose
        fi
    - name: test ${{matrix.arch}}/c++20/Release
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
  xcompile11:
    needs:
    - canary11
    - canary20
    if: always()
    continue-on-error: false
    name: ${{matrix.arch}}/c++11
    runs-on: ubuntu-24.04
    strategy:
      fail-fast: false
      matrix:
        include:
        - arch: armv6
          tc: arm-linux-gnueabi
          flags: -march=armv6+fp
        - arch: armv5
          tc: arm-linux-gnueabi
          flags: -march=armv5te+fp
        - arch: armv4
          tc: arm-linux-gnueabi
          flags: -march=armv4
        - arch: aarch64
          tc: aarch64-linux-gnu
        - arch: loongarch64
          tc: loongarch64-linux-gnu
          version: -14
        - arch: mips
          tc: mips-linux-gnu
        - arch: mipsel
          tc: mipsel-linux-gnu
        - arch: mips64
          tc: mips64-linux-gnuabi64
        - arch: mips64el
          tc: mips64el-linux-gnuabi64
        - arch: riscv64
          tc: riscv64-linux-gnu
        - arch: s390x
          tc: s390x-linux-gnu
        - arch: ppc
          tc: powerpc-linux-gnu
        - arch: ppc64
          tc: powerpc64-linux-gnu
        - arch: ppc64le
          tc: powerpc64le-linux-gnu
        - arch: sparc64
          tc: sparc64-linux-gnu
    steps:
    - name: checkout (action)
      uses: actions/checkout@v4
      with:
        submodules: recursive
        fetch-depth: 0
    - name: install
      run: |
        sudo apt-get update
        sudo apt-get install -y \
            gcc${{matrix.version}}-${{matrix.tc}} \
            g++${{matrix.version}}-${{matrix.tc}} \
            qemu-user-static
    - name: info
      run: |
        ${{matrix.tc}}-g++${{matrix.version}} --version
        ${{matrix.tc}}-g++${{matrix.version}} -dM -E - </dev/null | sort
        ${{matrix.tc}}-g++${{matrix.version}} ${{matrix.flags}} -dM -E - </dev/null | sort
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++11/Debug
    - name: configure ${{matrix.arch}}/c++11/Debug
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Debug \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=11 \
            -DCXX_STANDARD=11 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++11/Debug
      run: |
        cmake --build build --parallel --target ryml-test-build --verbose
    - name: test ${{matrix.arch}}/c++11/Debug
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++11/Release
    - name: configure ${{matrix.arch}}/c++11/Release
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Release \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=11 \
            -DCXX_STANDARD=11 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++11/Release
      run: |
        cmake --build build --parallel --target ryml-test-build --verbose
    - name: test ${{matrix.arch}}/c++11/Release
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
  xcompile20:
    needs:
    - canary11
    - canary20
    if: always()
    continue-on-error: false
    name: ${{matrix.arch}}/c++20
    runs-on: ubuntu-24.04
    strategy:
      fail-fast: false
      matrix:
        include:
        - arch: armv6
          tc: arm-linux-gnueabi
          flags: -march=armv6+fp
        - arch: armv5
          tc: arm-linux-gnueabi
          flags: -march=armv5te+fp
        - arch: armv4
          tc: arm-linux-gnueabi
          flags: -march=armv4
        - arch: aarch64
          tc: aarch64-linux-gnu
        - arch: loongarch64
          tc: loongarch64-linux-gnu
          version: -14
        - arch: mips
          tc: mips-linux-gnu
        - arch: mipsel
          tc: mipsel-linux-gnu
        - arch: mips64
          tc: mips64-linux-gnuabi64
        - arch: mips64el
          tc: mips64el-linux-gnuabi64
        - arch: riscv64
          tc: riscv64-linux-gnu
        - arch: s390x
          tc: s390x-linux-gnu
        - arch: ppc
          tc: powerpc-linux-gnu
        - arch: ppc64
          tc: powerpc64-linux-gnu
        - arch: ppc64le
          tc: powerpc64le-linux-gnu
        - arch: sparc64
          tc: sparc64-linux-gnu
    steps:
    - name: checkout (action)
      uses: actions/checkout@v4
      with:
        submodules: recursive
        fetch-depth: 0
    - name: install
      run: |
        sudo apt-get update
        sudo apt-get install -y \
            gcc${{matrix.version}}-${{matrix.tc}} \
            g++${{matrix.version}}-${{matrix.tc}} \
            qemu-user-static
    - name: info
      run: |
        ${{matrix.tc}}-g++${{matrix.version}} --version
        ${{matrix.tc}}-g++${{matrix.version}} -dM -E - </dev/null | sort
        ${{matrix.tc}}-g++${{matrix.version}} ${{matrix.flags}} -dM -E - </dev/null | sort
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++20/Debug
    - name: configure ${{matrix.arch}}/c++20/Debug
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Debug \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=20 \
            -DCXX_STANDARD=20 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++20/Debug
      run: |
        cmake --build build --parallel --target ryml-test-build --verbose
    - name: test ${{matrix.arch}}/c++20/Debug
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
    - name: '-------------------------------------------------'
      run: echo ${{matrix.arch}}/c++20/Release
    - name: configure ${{matrix.arch}}/c++20/Release
      run: |
        touch build
        rm -rf build
        export C4_EXTERN_DIR=`pwd`/build/extern
        cmake -S . -B build \
            -DCMAKE_TOOLCHAIN_FILE=ext/c4core/.github/toolchains/${{matrix.arch}}.cmake \
            -DCMAKE_BUILD_TYPE=Release \
            -DCMAKE_CXX_FLAGS=" ${{matrix.flags}}" \
            -DCMAKE_C_FLAGS=" ${{matrix.flags}}" \
            -DC4_CXX_STANDARD=20 \
            -DCXX_STANDARD=20 \
            -DRYML_DEV=ON \
            -DRYML_BUILD_BENCHMARKS=OFF \
            -DRYML_SANITIZE=OFF \
            -DRYML_LINT=OFF \
            -DRYML_VALGRIND=OFF
    - name: build ${{matrix.arch}}/c++20/Release
      run: |
        if [ ${{matrix.arch}} == aarch64 ] ; then
          nproc=$((`nproc` / 2))
          cmake --build build --parallel $nproc --target ryml-test-build --verbose
        else
          cmake --build build --parallel --target ryml-test-build --verbose
        fi
    - name: test ${{matrix.arch}}/c++20/Release
      run: |
        export CTEST_PARALLEL_LEVEL=`nproc`
        cmake --build build --target ryml-test-run
