diff --git a/.github/workflows/rarearchs.yml b/.github/workflows/rarearchs.yml index 5b799bb7..bd282d2e 100644 --- a/.github/workflows/rarearchs.yml +++ b/.github/workflows/rarearchs.yml @@ -22,47 +22,69 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip rarearchs')) || contains(github.event.head_commit.message, 'only rarearchs') - name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} + name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}${{matrix.suffix}} continue-on-error: true runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: include: - - {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04} + #- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O0, cxxflags: ' -O0 '} + #- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O1, cxxflags: ' -O1 '} + #- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O2, cxxflags: ' -O2 '} + #- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O3, cxxflags: ' -O3 '} + #- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: .O2dbg, cxxflags: ' -O2 -g -DNDEBUG '} + #- {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04, suffix: } + #- {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04, suffix: } # - - {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O0 , cxxflags: ' -O0 '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O0NDEBUG , cxxflags: ' -O0 -DNDEBUG '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O0gNDEBUG, cxxflags: ' -O0 -DNDEBUG -g '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O1 , cxxflags: ' -O1 '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O1NDEBUG , cxxflags: ' -O1 -DNDEBUG '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O1gNDEBUG, cxxflags: ' -O1 -DNDEBUG -g '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O2 , cxxflags: ' -O2 '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O2NDEBUG , cxxflags: ' -O2 -DNDEBUG '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O2gNDEBUG, cxxflags: ' -O2 -DNDEBUG -g '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O3 , cxxflags: ' -O3 '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O3NDEBUG , cxxflags: ' -O3 -DNDEBUG '} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: .O3gNDEBUG, cxxflags: ' -O3 -DNDEBUG -g '} + #- {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04, suffix: } + #- {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04, suffix: } # - - {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04} + #- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O0, cxxflags: ' -O0 '} + #- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O1, cxxflags: ' -O1 '} + #- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O2, cxxflags: ' -O2 '} + #- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O3, cxxflags: ' -O3 '} + #- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: .O2dbg, cxxflags: ' -O2 -g -DNDEBUG '} + #- {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04, suffix: } + #- {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04, suffix: } # - #- {std: 11, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 11, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 14, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 14, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 17, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 17, bt: Release, arch: armv6 , distro: bullseye} + #- {std: 11, bt: Debug , arch: armv6 , distro: bullseye, suffix: } + #- {std: 11, bt: Release, arch: armv6 , distro: bullseye, suffix: } + #- {std: 14, bt: Debug , arch: armv6 , distro: bullseye, suffix: } + #- {std: 14, bt: Release, arch: armv6 , distro: bullseye, suffix: } + #- {std: 17, bt: Debug , arch: armv6 , distro: bullseye, suffix: } + #- {std: 17, bt: Release, arch: armv6 , distro: bullseye, suffix: } # - #- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04} + #- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04, suffix: } + #- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04, suffix: } + #- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04, suffix: } + #- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04, suffix: } steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - name: test @@ -95,29 +117,53 @@ jobs: cmake --version echo "install took $((SECONDS - start_time))" run: | - set -x + set -xe start_time=$SECONDS uname -a pwd ls -lFhp . # + # https://stackoverflow.com/questions/5470257/how-to-see-which-flags-march-native-will-activate + echo | c++ -O0 -Q -E -v - &1 + echo | c++ -O0 -Q -c --help=optimizers --help=target + echo | c++ -O0 -dM -E - | sort + echo ----- + echo | c++ -O1 -Q -E -v - &1 + echo | c++ -O1 -Q -c --help=optimizers --help=target + echo | c++ -O1 -dM -E - | sort + echo ----- + echo | c++ -O2 -Q -E -v - &1 + echo | c++ -O2 -Q -c --help=optimizers --help=target + echo | c++ -O2 -dM -E - | sort + echo ----- + echo | c++ -O3 -Q -E -v - &1 + echo | c++ -O3 -Q -c --help=optimizers --help=target + echo | c++ -O3 -dM -E - | sort + echo ===== + # bdir=build_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} idir=install_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} mkdir -p $bdir # - time cmake -S . -B $bdir \ - -DCMAKE_INSTALL_PREFIX=$idir \ - -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DCXX_STANDARD=${{matrix.std}} \ - -DRYML_DEV=ON \ - -DRYML_TEST_SUITE=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_SANITIZE=OFF \ - -DRYML_LINT=OFF \ - -DRYML_VALGRIND=OFF + cmd="cmake -S . -B $bdir \ + -DCMAKE_INSTALL_PREFIX=$idir \ + -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DCXX_STANDARD=${{matrix.std}} \ + -DRYML_DEV=ON \ + -DRYML_TEST_SUITE=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_SANITIZE=OFF \ + -DRYML_LINT=OFF \ + -DRYML_VALGRIND=OFF" + echo $cmd + if [ -z "${{matrix.cxxflags}}" ] ; then + time $cmd + else + time $cmd -DCMAKE_CXX_FLAGS_RELEASE:STRING="${{matrix.cxxflags}}" + fi # - time cmake --build $bdir -j 3 --target ryml-test-build + time cmake --build $bdir --verbose -j 4 --target ryml-test-build # - time cmake --build $bdir -j 3 --target ryml-test-run + time cmake --build $bdir --target ryml-test-run echo "run took $((SECONDS - start_time))"