diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile index 44f1f9df..73d65a5b 100644 --- a/.github/workflows/Makefile +++ b/.github/workflows/Makefile @@ -19,6 +19,7 @@ test: force build @git diff --exit-code $(TARGET_FILES) && \ echo -e '\nPASS - No normative changes to .github/workflows/*.yml' + DIFF_ORIG_COMMIT ?= HEAD diff: @for s in $(SOURCE_FILES); do \ @@ -37,9 +38,11 @@ diff: ); \ done + force: touch *.ys + %.yml: %.ys $(YS) $(INPUT_FILES) @if [ -f "$@" ] ; then chmod a+w $@ ; fi @echo "# DO NOT EDIT - GENERATED FROM .github/workflows/$<" > $@ @@ -55,6 +58,7 @@ $(YS): curl -s https://yamlscript.org/install | \ BIN=1 VERSION=$(YS_VERSION) PREFIX=$(YS_PREFIX) bash + stats: - @echo "ys : $$(wc -l *.ys)" - @echo "yml: $$(wc -l *.yml)" + @echo "ys : $$(wc -lm *.ys)" + @echo "yml: $$(wc -lm *.yml)" diff --git a/.github/workflows/bash/benchmarks-install.bash b/.github/workflows/bash/benchmarks-install.bash deleted file mode 100644 index 3e5f15fe..00000000 --- a/.github/workflows/bash/benchmarks-install.bash +++ /dev/null @@ -1,7 +0,0 @@ -which python -which pip -python --version -pip --version -pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt -python -c 'import munch ; print("ok!") ; exit(0)' -echo $? diff --git a/.github/workflows/bash/benchmarks-run.bash b/.github/workflows/bash/benchmarks-run.bash deleted file mode 100644 index 1833b062..00000000 --- a/.github/workflows/bash/benchmarks-run.bash +++ /dev/null @@ -1,11 +0,0 @@ -set -x -source vars.sh -echo SRC_TAG=$SRC_TAG -echo SRC_VERSION=$SRC_VERSION -desc=$SRC_TAG -for bl in ${{matrix.bitlinks}} ; do - dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g') - mkdir -p $dst - find build -name bm-results - mv -vf build/$bl/bm/bm-results/* $dst/. -done diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index a47289d8..701568bd 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -83,49 +83,36 @@ jobs: - name: Verify vars.sh run: env | grep SRC benchmarks: - name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}} + name: bm/c++${{matrix.std}}/${{matrix.comp}}/${{matrix.bt}} needs: gettag - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip benchmarks')) || - contains(github.event.head_commit.message, 'only benchmarks') - continue-on-error: true + if: always() + continue-on-error: false runs-on: ${{matrix.os}} strategy: fail-fast: false matrix: include: - - std: 11 - cxx: g++-10 - bt: Release - os: ubuntu-20.04 - bitlinks: static64 static32 - std: 17 - cxx: g++-10 - bt: Release - os: ubuntu-20.04 - bitlinks: static64 static32 - - std: 20 - cxx: g++-10 - bt: Release - os: ubuntu-20.04 - bitlinks: static64 static32 + comp: gcc14 + os: ubuntu-24.04 + cmkflags: -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_C_COMPILER=gcc-14 - std: 17 - cxx: vs2019 - bt: Release - os: windows-2019 - bitlinks: static64 static32 - - std: 20 - cxx: vs2019 - bt: Release + comp: clang18 + os: ubuntu-24.04 + cmkflags: -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 + - std: 17 + comp: vs2019 os: windows-2019 - bitlinks: static64 static32 + cmkflags: -G 'Visual Studio 16 2019' -A x64 - std: 17 - cxx: xcode - xcver: 15 - bt: Release + comp: vs2022 + os: windows-2022 + cmkflags: -G 'Visual Studio 17 2022' -A x64 + - std: 17 + comp: xcode15 os: macos-13 - bitlinks: static64 + xcver: 15 + cmkflags: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 env: BM: 'ON' STD: ${{matrix.std}} @@ -182,47 +169,21 @@ jobs: pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt python -c 'import munch ; print("ok!") ; exit(0)' echo $? - - name: set build env vars - run: | - echo "NUM_JOBS_BUILD=1" >> $GITHUB_ENV - echo "CMAKE_FLAGS=\"-DPython_EXECUTABLE=$(which python)\"" >> $GITHUB_ENV - - name: check build env vars + - name: configure------------------------------------------------- run: | - echo NUM_JOBS_BUILD=$NUM_JOBS_BUILD - echo "CMAKE_FLAGS=\"$CMAKE_FLAGS\"" - - name: shared64-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared64 - - name: shared64-build - run: source .github/setenv.sh && c4_build_target shared64 ryml-bm-build - - name: shared64-run - run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-run - - name: shared64-plot - run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot - - name: static64-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static64 - - name: static64-build - run: source .github/setenv.sh && c4_build_target static64 ryml-bm-build - - name: static64-run - run: source .github/setenv.sh && c4_run_target static64 ryml-bm-run - - name: static64-plot - run: source .github/setenv.sh && c4_run_target static64 ryml-bm-plot - - name: static32-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static32 - - name: static32-build - run: source .github/setenv.sh && c4_build_target static32 ryml-bm-build - - name: static32-run - run: source .github/setenv.sh && c4_run_target static32 ryml-bm-run - - name: static32-plot - run: source .github/setenv.sh && c4_run_target static32 ryml-bm-plot - - name: shared32-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared32 - - name: shared32-build - run: source .github/setenv.sh && c4_build_target shared32 ryml-bm-build - - name: shared32-run - run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-run - - name: shared32-plot - run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot - - name: gather benchmark results + cmake -S . -B build \ + ${{matrix.cmkflags}} \ + -DPython_EXECUTABLE="$(which python)" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_BENCHMARKS=ON + - name: build + run: cmake --build build --config Release --parallel --verbose --target ryml-bm-build + - name: run + run: cmake --build build --config Release --verbose --target ryml-bm-run + - name: plot + run: cmake --build build --config Release --verbose --target ryml-bm-plot + - name: gather benchmark results------------------------------------------- run: | set -x source vars.sh diff --git a/.github/workflows/benchmarks.ys b/.github/workflows/benchmarks.ys index f6e9a525..a963782a 100644 --- a/.github/workflows/benchmarks.ys +++ b/.github/workflows/benchmarks.ys @@ -11,23 +11,19 @@ jobs: - :: version-discover benchmarks: - name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}} + name: bm/c++${{matrix.std}}/${{matrix.comp}}/${{matrix.bt}} needs: gettag - :: setup-job('benchmarks') + :: setup-job('benchmarks' 'benchmarks') runs-on: ${{matrix.os}} strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx %2, :bt 'Release', :os %3, :bitlinks 'static64 static32'}) include: - - ! item(11 'g++-10' 'ubuntu-20.04') - - ! item(17 'g++-10' 'ubuntu-20.04') - - ! item(20 'g++-10' 'ubuntu-20.04') - - ! item(17 'vs2019' 'windows-2019') - - ! item(20 'vs2019' 'windows-2019') - #- ! item(17 'vs2019' 'windows-2022') - #- ! item(20 'vs2019' 'windows-2022') - - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} + - {std: 17, comp: gcc14 , os: ubuntu-24.04, cmkflags: -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_C_COMPILER=gcc-14} + - {std: 17, comp: clang18, os: ubuntu-24.04, cmkflags: -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18} + - {std: 17, comp: vs2019 , os: windows-2019, cmkflags: -G 'Visual Studio 16 2019' -A x64} + - {std: 17, comp: vs2022 , os: windows-2022, cmkflags: -G 'Visual Studio 17 2022' -A x64} + - {std: 17, comp: xcode15, os: macos-13, xcver: 15, cmkflags: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64} env:: -{'BM' 'ON'} + load('share/env.yaml') steps: - :: checkout-action @@ -40,49 +36,41 @@ jobs: uses: actions/setup-python@v5 with: { python-version: '3.10' } - name: install benchmark plotting dependencies - run:: bash('benchmarks-install') - - name: set build env vars run: | - echo "NUM_JOBS_BUILD=1" >> $GITHUB_ENV - echo "CMAKE_FLAGS=\"-DPython_EXECUTABLE=$(which python)\"" >> $GITHUB_ENV - - name: check build env vars + which python + which pip + python --version + pip --version + pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt + python -c 'import munch ; print("ok!") ; exit(0)' + echo $? + - name: configure------------------------------------------------- run: | - echo NUM_JOBS_BUILD=$NUM_JOBS_BUILD - echo "CMAKE_FLAGS=\"$CMAKE_FLAGS\"" - - name: shared64-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared64 - - name: shared64-build - run: source .github/setenv.sh && c4_build_target shared64 ryml-bm-build - - name: shared64-run - run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-run - - name: shared64-plot - run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot - - name: static64-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static64 - - name: static64-build - run: source .github/setenv.sh && c4_build_target static64 ryml-bm-build - - name: static64-run - run: source .github/setenv.sh && c4_run_target static64 ryml-bm-run - - name: static64-plot - run: source .github/setenv.sh && c4_run_target static64 ryml-bm-plot - - name: static32-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static32 - - name: static32-build - run: source .github/setenv.sh && c4_build_target static32 ryml-bm-build - - name: static32-run - run: source .github/setenv.sh && c4_run_target static32 ryml-bm-run - - name: static32-plot - run: source .github/setenv.sh && c4_run_target static32 ryml-bm-plot - - name: shared32-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared32 - - name: shared32-build - run: source .github/setenv.sh && c4_build_target shared32 ryml-bm-build - - name: shared32-run - run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-run - - name: shared32-plot - run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot - - name: gather benchmark results - run:: bash('benchmarks-run') + cmake -S . -B build \ + ${{matrix.cmkflags}} \ + -DPython_EXECUTABLE="$(which python)" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_BENCHMARKS=ON + - name: build + run: cmake --build build --config Release --parallel --verbose --target ryml-bm-build + - name: run + run: cmake --build build --config Release --verbose --target ryml-bm-run + - name: plot + run: cmake --build build --config Release --verbose --target ryml-bm-plot + - name: gather benchmark results------------------------------------------- + run: | + set -x + source vars.sh + echo SRC_TAG=$SRC_TAG + echo SRC_VERSION=$SRC_VERSION + desc=$SRC_TAG + for bl in ${{matrix.bitlinks}} ; do + dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g') + mkdir -p $dst + find build -name bm-results + mv -vf build/$bl/bm/bm-results/* $dst/. + done - name: upload benchmark result artifacts uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index ba41a32d..b74f6326 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -18,12 +18,9 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: null jobs: - clang_canary: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip clang')) || - contains(github.event.head_commit.message, 'only clang') - continue-on-error: true + canary: + if: always() + continue-on-error: false name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest @@ -32,19 +29,11 @@ jobs: matrix: include: - std: 20 - cxx: clang++-17 + cxx: clang++-18 bt: Debug bitlinks: shared64 static32 - std: 20 - cxx: clang++-17 - bt: Release - bitlinks: shared64 static32 - - std: 11 - cxx: clang++-9 - bt: Debug - bitlinks: shared64 static32 - - std: 11 - cxx: clang++-9 + cxx: clang++-18 bt: Release bitlinks: shared64 static32 env: @@ -98,12 +87,9 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 - clang_tabtokens: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip clang')) || - contains(github.event.head_commit.message, 'only clang') - continue-on-error: true + tabtokens: + if: always() + continue-on-error: false name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest @@ -112,19 +98,11 @@ jobs: matrix: include: - std: 20 - cxx: clang++-17 + cxx: clang++-18 bt: Debug bitlinks: shared64 static32 - std: 20 - cxx: clang++-17 - bt: Release - bitlinks: shared64 static32 - - std: 11 - cxx: clang++-9 - bt: Debug - bitlinks: shared64 static32 - - std: 11 - cxx: clang++-9 + cxx: clang++-18 bt: Release bitlinks: shared64 static32 env: @@ -179,12 +157,9 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 - clang_noexceptions: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip clang')) || - contains(github.event.head_commit.message, 'only clang') - continue-on-error: true + noexceptions: + if: always() + continue-on-error: false name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest @@ -193,19 +168,11 @@ jobs: matrix: include: - std: 20 - cxx: clang++-17 + cxx: clang++-18 bt: Debug bitlinks: shared64 static32 - std: 20 - cxx: clang++-17 - bt: Release - bitlinks: shared64 static32 - - std: 11 - cxx: clang++-9 - bt: Debug - bitlinks: shared64 static32 - - std: 11 - cxx: clang++-9 + cxx: clang++-18 bt: Release bitlinks: shared64 static32 env: @@ -260,169 +227,92 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 - clang_extended: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip clang')) || - contains(github.event.head_commit.message, 'only clang') - continue-on-error: true - name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + extended: + if: always() + continue-on-error: false + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/vg${{matrix.vg}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: fail-fast: false matrix: include: + - std: 20 + cxx: 18 + vg: 'ON' + img: 22.04 + - std: 17 + cxx: 18 + vg: 'ON' + img: 22.04 + - std: 14 + cxx: 18 + vg: 'ON' + img: 22.04 - std: 11 - cxx: clang++-17 - bt: Debug - vg: 'on' - img: '22.04' - - std: 11 - cxx: clang++-17 - bt: Release - vg: 'on' - img: '22.04' - - std: 11 - cxx: clang++-16 - bt: Debug - vg: 'on' - img: '22.04' - - std: 11 - cxx: clang++-16 - bt: Release - vg: 'on' - img: '22.04' + cxx: 18 + vg: 'ON' + img: 22.04 - std: 11 - cxx: clang++-15 - bt: Debug - vg: 'on' - img: '22.04' + cxx: 17 + vg: 'ON' + img: 22.04 - std: 11 - cxx: clang++-15 - bt: Release - vg: 'on' - img: '22.04' + cxx: 16 + vg: 'ON' + img: 22.04 - std: 11 - cxx: clang++-14 - bt: Debug - vg: 'on' - img: '22.04' + cxx: 15 + vg: 'ON' + img: 22.04 - std: 11 - cxx: clang++-14 - bt: Release - vg: 'on' - img: '22.04' + cxx: 14 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: clang++-13 - bt: Debug - vg: 'on' - img: '18.04' + cxx: 13 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-13 - bt: Release - vg: 'on' - img: '18.04' + cxx: 12 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-12 - bt: Debug - vg: 'on' - img: '18.04' + cxx: 11 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-12 - bt: Release - vg: 'on' - img: '18.04' + cxx: 10 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-11 - bt: Debug - vg: 'on' - img: '18.04' + cxx: 9 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-11 - bt: Release - vg: 'on' - img: '18.04' + cxx: 8 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-10 - bt: Debug - vg: 'on' - img: '18.04' + cxx: 7 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-10 - bt: Release - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-9 - bt: Debug - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-9 - bt: Release - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-8 - bt: Debug - vg: 'on' - img: '18.04' + cxx: '6.0' + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-8 - bt: Release - vg: 'on' - img: '18.04' + cxx: '5.0' + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-7 - bt: Debug - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-7 - bt: Release - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-6.0 - bt: Debug - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-6.0 - bt: Release - vg: 'on' - img: '18.04' + cxx: '4.0' + vg: 'OFF' + img: 18.04 - std: 11 - cxx: clang++-5.0 - bt: Debug - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-5.0 - bt: Release - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-4.0 - bt: Debug - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-4.0 - bt: Release - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-3.9 - bt: Debug - vg: 'on' - img: '18.04' - - std: 11 - cxx: clang++-3.9 - bt: Release - vg: 'on' - img: '18.04' + cxx: '3.9' + vg: 'OFF' + img: 18.04 env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -481,47 +371,106 @@ jobs: || echo -n # show the last commit git log --name-status HEAD^..HEAD - - run: c4core-install ${{matrix.cxx}} - - name: show info - run: source .github/setenv.sh && c4_show_info - - name: shared64-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared64 - - name: shared64-build - run: source .github/setenv.sh && c4_build_test shared64 - - name: shared64-run - run: source .github/setenv.sh && c4_run_test shared64 - - name: shared64-pack - run: source .github/setenv.sh && c4_package shared64 - - name: static64-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static64 - - name: static64-build - run: source .github/setenv.sh && c4_build_test static64 - - name: static64-run - run: source .github/setenv.sh && c4_run_test static64 - - name: static64-pack - run: source .github/setenv.sh && c4_package static64 - - name: static32-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static32 - - name: static32-build - run: source .github/setenv.sh && c4_build_test static32 - - name: static32-run - run: source .github/setenv.sh && c4_run_test static32 - - name: static32-pack - run: source .github/setenv.sh && c4_package static32 - - name: shared32-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared32 - - name: shared32-build - run: source .github/setenv.sh && c4_build_test shared32 - - name: shared32-run - run: source .github/setenv.sh && c4_run_test shared32 - - name: shared32-pack - run: source .github/setenv.sh && c4_package shared32 + - name: install + run: c4core-install clang++-${{matrix.cxx}} + - name: Debug --------------------------------------- + run: | + rm -rf build/Debug + cmake -S . -B build/Debug \ + -DCMAKE_CXX_COMPILER=clang++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_FLAGS_DEBUG="" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: 'build Debug ' + run: | + cmake --build build/Debug --target ryml-test-build --parallel --verbose + - name: 'run Debug ' + run: | + cmake --build build/Debug --target ryml-test-run + - name: Release -O3 -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=clang++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -O3 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -O3 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run + - name: Release -O2 -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=clang++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -O2 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -O2 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run + - name: Release -O1 -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=clang++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-O1 -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -O1 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -O1 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run + - name: Release -Os -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=clang++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-Os -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -Os -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -Os -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run clangsan: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip clang')) || - contains(github.event.head_commit.message, 'only clang') - continue-on-error: true + if: always() + continue-on-error: false name: san/${{matrix.bt}}/c++${{matrix.std}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest diff --git a/.github/workflows/clang.ys b/.github/workflows/clang.ys index c479b8bf..1cc74bfb 100644 --- a/.github/workflows/clang.ys +++ b/.github/workflows/clang.ys @@ -5,8 +5,8 @@ jobs: #---------------------------------------------------------------------------- - clang_canary: - :: setup-job('clang') + canary: + :: setup-job('clang' 'canary') name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} :: runs-on-docker-c4core('22.04') strategy: @@ -14,16 +14,14 @@ jobs: matrix: item =: \({:std %1, :cxx %2, :bt %3, :bitlinks 'shared64 static32'}) include:: &include1 -[ - item(20 'clang++-17' 'Debug') - item(20 'clang++-17' 'Release') - item(11 'clang++-9' 'Debug') - item(11 'clang++-9' 'Release') ] + item(20 'clang++-18' 'Debug' ) + item(20 'clang++-18' 'Release') ] env:: load('share/env.yaml') steps:: checkout-action-docker + install-cxx + run-steps #---------------------------------------------------------------------------- - clang_tabtokens: - :: setup-job('clang') + tabtokens: + :: setup-job('clang' 'tabtokens') name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} :: runs-on-docker-c4core('22.04') strategy: @@ -35,8 +33,8 @@ jobs: steps:: checkout-action-docker + install-cxx + run-steps #---------------------------------------------------------------------------- - clang_noexceptions: - :: setup-job('clang') + noexceptions: + :: setup-job('clang' 'noexceptions') name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} :: runs-on-docker-c4core('22.04') strategy: @@ -48,53 +46,49 @@ jobs: steps:: checkout-action-docker + install-cxx + run-steps #---------------------------------------------------------------------------- - clang_extended: - :: setup-job('clang') - name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + extended: + :: setup-job('clang' 'extended') + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/vg${{matrix.vg}} :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false matrix: - item =: \({:std 11, :cxx "clang++-$a(%1)", :bt %2, :vg 'on', :img "$a(%3)"}) include: - - ! item(17 'Debug' '22.04') - - ! item(17 'Release' '22.04') - - ! item(16 'Debug' '22.04') - - ! item(16 'Release' '22.04') - # install of clang15 fails on ubuntu18.04 - - ! item(15 'Debug' '22.04') - - ! item(15 'Release' '22.04') - # install of clang14 fails on ubuntu18.04 - - ! item(14 'Debug' '22.04') - - ! item(14 'Release' '22.04') - - ! item(13 'Debug' '18.04') - - ! item(13 'Release' '18.04') - - ! item(12 'Debug' '18.04') - - ! item(12 'Release' '18.04') - - ! item(11 'Debug' '18.04') - - ! item(11 'Release' '18.04') - - ! item(10 'Debug' '18.04') - - ! item(10 'Release' '18.04') - - ! item( 9 'Debug' '18.04') - - ! item( 9 'Release' '18.04') - - ! item( 8 'Debug' '18.04') - - ! item( 8 'Release' '18.04') - - ! item( 7 'Debug' '18.04') - - ! item( 7 'Release' '18.04') - - ! item(6.0 'Debug' '18.04') - - ! item(6.0 'Release' '18.04') - - ! item(5.0 'Debug' '18.04') - - ! item(5.0 'Release' '18.04') - - ! item(4.0 'Debug' '18.04') - - ! item(4.0 'Release' '18.04') - - ! item(3.9 'Debug' '18.04') - - ! item(3.9 'Release' '18.04') + # with valgrind: only latest clang + - {std: 20, cxx: 18 , vg: ON , img: 22.04} + - {std: 17, cxx: 18 , vg: ON , img: 22.04} + - {std: 14, cxx: 18 , vg: ON , img: 22.04} + - {std: 11, cxx: 18 , vg: ON , img: 22.04} + # without valgrind + - {std: 11, cxx: 17 , vg: ON , img: 22.04} + - {std: 11, cxx: 16 , vg: ON , img: 22.04} + - {std: 11, cxx: 15 , vg: ON , img: 22.04} + - {std: 11, cxx: 14 , vg: OFF, img: 22.04} + - {std: 11, cxx: 13 , vg: OFF, img: 18.04} + - {std: 11, cxx: 12 , vg: OFF, img: 18.04} + - {std: 11, cxx: 11 , vg: OFF, img: 18.04} + - {std: 11, cxx: 10 , vg: OFF, img: 18.04} + - {std: 11, cxx: 9 , vg: OFF, img: 18.04} + - {std: 11, cxx: 8 , vg: OFF, img: 18.04} + - {std: 11, cxx: 7 , vg: OFF, img: 18.04} + - {std: 11, cxx: '6.0', vg: OFF, img: 18.04} + - {std: 11, cxx: '5.0', vg: OFF, img: 18.04} + - {std: 11, cxx: '4.0', vg: OFF, img: 18.04} + - {std: 11, cxx: '3.9', vg: OFF, img: 18.04} env:: load('share/env.yaml') - steps:: checkout-manual + install-cxx + run-steps + steps: + - :: checkout-manual + - name: install + run: c4core-install clang++-${{matrix.cxx}} + - :: run-clang-manual-with-flags('Debug' '') + - :: run-clang-manual-with-flags('Release' '-O3 -DNDEBUG') + - :: run-clang-manual-with-flags('Release' '-O2 -DNDEBUG') + - :: run-clang-manual-with-flags('Release' '-O1 -DNDEBUG') + - :: run-clang-manual-with-flags('Release' '-Os -DNDEBUG') #---------------------------------------------------------------------------- clangsan: - :: setup-job('clang') + :: setup-job('clang' 'clangsan') name: san/${{matrix.bt}}/c++${{matrix.std}} :: runs-on-docker-c4core('22.04') strategy: diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index 02a75aae..c7fd4bfe 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -19,11 +19,8 @@ env: NUM_JOBS_BUILD: null jobs: clang_tidy: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip clang_tidy')) || - contains(github.event.head_commit.message, 'only clang_tidy') - continue-on-error: true + if: always() + continue-on-error: false name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest diff --git a/.github/workflows/clang_tidy.ys b/.github/workflows/clang_tidy.ys index f1353e3f..8a027143 100644 --- a/.github/workflows/clang_tidy.ys +++ b/.github/workflows/clang_tidy.ys @@ -5,7 +5,7 @@ jobs: clang_tidy: - :: setup-job('clang_tidy') + :: setup-job('clang_tidy' 'clang_tidy') name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} :: runs-on-docker-c4core('22.04') strategy: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c0b07820..47f65a88 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -19,11 +19,8 @@ env: NUM_JOBS_BUILD: null jobs: coverage: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip coverage')) || - contains(github.event.head_commit.message, 'only coverage') - continue-on-error: true + if: always() + continue-on-error: false name: coverage/c++${{matrix.std}}${{matrix.namesfx}} runs-on: ${{matrix.os}} strategy: diff --git a/.github/workflows/coverage.ys b/.github/workflows/coverage.ys index 8568d62b..3cb2f9f0 100644 --- a/.github/workflows/coverage.ys +++ b/.github/workflows/coverage.ys @@ -5,7 +5,7 @@ jobs: coverage: - :: setup-job('coverage') + :: setup-job('coverage' 'coverage') name: coverage/c++${{matrix.std}}${{matrix.namesfx}} runs-on: ${{matrix.os}} strategy: diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 24afabf6..a92ee20a 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -21,7 +21,7 @@ jobs: emscripten: name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} if: ${{ false }} - continue-on-error: true + continue-on-error: false runs-on: ${{matrix.os}} strategy: fail-fast: false diff --git a/.github/workflows/emscripten.ys b/.github/workflows/emscripten.ys index 6bc00d93..8d60d884 100644 --- a/.github/workflows/emscripten.ys +++ b/.github/workflows/emscripten.ys @@ -6,7 +6,7 @@ jobs: emscripten: name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} - :: setup-job('emscripten') + :: setup-job('emscripten' 'emscripten') # this job is always causing trouble, with failures showing unreadable code # dumps. eg https://github.com/biojppm/rapidyaml/actions/runs/10368522906 # Disabling until we can find a proper way to investigate these failures: diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 84fe306c..04b6ac1a 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -18,12 +18,9 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: null jobs: - gcc_canary: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip gcc')) || - contains(github.event.head_commit.message, 'only gcc') - continue-on-error: true + canary: + if: always() + continue-on-error: false name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest @@ -164,59 +161,9 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 - gcc_O2: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip gcc')) || - contains(github.event.head_commit.message, 'only gcc') - continue-on-error: true - name: gcc_O2/${{matrix.gcc}}/c++${{matrix.std}} - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - strategy: - fail-fast: false - matrix: - include: - - std: 11 - gcc: 12 - bt: Release - env: - STD: ${{matrix.std}} - CXX_: ${{matrix.gcc}} - BT: ${{matrix.bt}} - BITLINKS: ${{matrix.bitlinks}} - VG: ${{matrix.vg}} - SAN: ${{matrix.san}} - LINT: ${{matrix.lint}} - OS: ${{matrix.os}} - steps: - - name: checkout (action + docker) - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - run: git config --system --add safe.directory '*' - - run: c4core-install g++-${{matrix.gcc}} - - name: show info - run: source .github/setenv.sh && c4_show_info - - name: configure - run: | - cmake -S . -B build_o2 \ - -DCMAKE_CXX_COMPILER=g++-${{matrix.gcc}} \ - -DCMAKE_C_COMPILER=gcc-${{matrix.gcc}} \ - -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \ - -DRYML_BUILD_TESTS:BOOL=ON \ - -DRYML_DBG:BOOL=OFF - - name: build - run: cmake --build build_o2 --target ryml-test-build -j --verbose - - name: run - run: cmake --build build_o2 --target ryml-test-run - gcc_tabtokens: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip gcc')) || - contains(github.event.head_commit.message, 'only gcc') - continue-on-error: true + tabtokens: + if: always() + continue-on-error: false name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest @@ -358,12 +305,63 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 - gcc_noexceptions: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip gcc')) || - contains(github.event.head_commit.message, 'only gcc') - continue-on-error: true + misbuild: + if: always() + continue-on-error: false + name: misbuild#${{matrix.issue}}/gcc${{matrix.gcc}}/c++${{matrix.std}} + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest + strategy: + fail-fast: false + matrix: + include: + - issue: 440 + std: 11 + gcc: 12 + bt: Release + img: 22.04 + cxxflags: -O2 -DNDEBUG -g + - issue: 486 + std: 11 + gcc: 11 + bt: Release + img: 22.04 + cxxflags: -O3 -DNDEBUG + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.gcc}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} + steps: + - name: checkout (action + docker) + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - run: git config --system --add safe.directory '*' + - run: c4core-install g++-${{matrix.gcc}} + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: configure (issue \#${{matrix.issue}}) + run: | + cmake -S . -B build \ + -DCMAKE_CXX_COMPILER=g++-${{matrix.gcc}} \ + -DCMAKE_C_COMPILER=gcc-${{matrix.gcc}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="${{matrix.cxxflags}}" \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_DBG=OFF + - name: build (issue \#${{matrix.issue}}) + run: cmake --build build --target ryml-test-build --parallel --verbose + - name: run (issue \#${{matrix.issue}}) + run: cmake --build build --target ryml-test-run + noexceptions: + if: always() + continue-on-error: false name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest @@ -485,13 +483,10 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 - gcc_extended: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip gcc')) || - contains(github.event.head_commit.message, 'only gcc') - continue-on-error: true - name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + extended: + if: always() + continue-on-error: false + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/vg${{matrix.vg}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: @@ -499,133 +494,65 @@ jobs: matrix: include: - std: 11 - cxx: g++-14 - bt: Debug - vg: 'ON' - img: '22.04' - - std: 11 - cxx: g++-14 - bt: Release + cxx: 14 vg: 'ON' - img: '22.04' + img: 22.04 - std: 14 - cxx: g++-14 - bt: Debug + cxx: 14 vg: 'ON' - img: '22.04' - - std: 14 - cxx: g++-14 - bt: Release - vg: 'ON' - img: '22.04' + img: 22.04 - std: 17 - cxx: g++-14 - bt: Debug + cxx: 14 vg: 'ON' - img: '22.04' - - std: 17 - cxx: g++-14 - bt: Release - vg: 'ON' - img: '22.04' + img: 22.04 - std: 20 - cxx: g++-14 - bt: Debug + cxx: 14 vg: 'ON' - img: '22.04' - - std: 20 - cxx: g++-14 - bt: Release - vg: 'ON' - img: '22.04' + img: 22.04 - std: 11 - cxx: g++-13 - bt: Debug - img: '22.04' + cxx: 13 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-13 - bt: Release - img: '22.04' + cxx: 12 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-12 - bt: Debug - img: '22.04' + cxx: 11 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-12 - bt: Release - img: '22.04' - - std: 11 - cxx: g++-11 - bt: Debug - img: '22.04' - - std: 11 - cxx: g++-11 - bt: Release - img: '22.04' - - std: 11 - cxx: g++-10 - bt: Debug - img: '22.04' - - std: 11 - cxx: g++-10 - bt: Release - img: '22.04' + cxx: 10 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-9 - bt: Debug - img: '22.04' + cxx: 9 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-9 - bt: Release - img: '22.04' + cxx: 8 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: g++-8 - bt: Debug - img: '18.04' + cxx: 7 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: g++-8 - bt: Release - img: '18.04' + cxx: 6 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: g++-7 - bt: Debug - img: '18.04' + cxx: 5 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: g++-7 - bt: Release - img: '18.04' + cxx: 4.9 + vg: 'OFF' + img: 18.04 - std: 11 - cxx: g++-6 - bt: Debug - img: '18.04' - - std: 11 - cxx: g++-6 - bt: Release - img: '18.04' - - std: 11 - cxx: g++-5 - bt: Debug - img: '18.04' - - std: 11 - cxx: g++-5 - bt: Release - img: '18.04' - - std: 11 - cxx: g++-4.9 - bt: Debug - img: '18.04' - - std: 11 - cxx: g++-4.9 - bt: Release - img: '18.04' - - std: 11 - cxx: g++-4.8 - bt: Debug - img: '18.04' - - std: 11 - cxx: g++-4.8 - bt: Release - img: '18.04' + cxx: 4.8 + vg: 'OFF' + img: 18.04 env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -684,47 +611,106 @@ jobs: || echo -n # show the last commit git log --name-status HEAD^..HEAD - - run: c4core-install ${{matrix.cxx}} - - name: show info - run: source .github/setenv.sh && c4_show_info - - name: shared64-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared64 - - name: shared64-build - run: source .github/setenv.sh && c4_build_test shared64 - - name: shared64-run - run: source .github/setenv.sh && c4_run_test shared64 - - name: shared64-pack - run: source .github/setenv.sh && c4_package shared64 - - name: static64-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static64 - - name: static64-build - run: source .github/setenv.sh && c4_build_test static64 - - name: static64-run - run: source .github/setenv.sh && c4_run_test static64 - - name: static64-pack - run: source .github/setenv.sh && c4_package static64 - - name: static32-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static32 - - name: static32-build - run: source .github/setenv.sh && c4_build_test static32 - - name: static32-run - run: source .github/setenv.sh && c4_run_test static32 - - name: static32-pack - run: source .github/setenv.sh && c4_package static32 - - name: shared32-configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared32 - - name: shared32-build - run: source .github/setenv.sh && c4_build_test shared32 - - name: shared32-run - run: source .github/setenv.sh && c4_run_test shared32 - - name: shared32-pack - run: source .github/setenv.sh && c4_package shared32 + - name: install + run: c4core-install g++-${{matrix.cxx}} + - name: Debug --------------------------------------- + run: | + rm -rf build/Debug + cmake -S . -B build/Debug \ + -DCMAKE_CXX_COMPILER=g++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=gcc-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_FLAGS_DEBUG="" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: 'build Debug ' + run: | + cmake --build build/Debug --target ryml-test-build --parallel --verbose + - name: 'run Debug ' + run: | + cmake --build build/Debug --target ryml-test-run + - name: Release -O3 -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=g++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=gcc-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -O3 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -O3 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run + - name: Release -O2 -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=g++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=gcc-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -O2 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -O2 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run + - name: Release -O1 -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=g++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=gcc-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-O1 -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -O1 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -O1 -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run + - name: Release -Os -DNDEBUG --------------------------------------- + run: | + rm -rf build/Release + cmake -S . -B build/Release \ + -DCMAKE_CXX_COMPILER=g++-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=gcc-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-Os -DNDEBUG" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF + - name: build Release -Os -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: run Release -Os -DNDEBUG + run: | + cmake --build build/Release --target ryml-test-run gccsan: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip gcc')) || - contains(github.event.head_commit.message, 'only gcc') - continue-on-error: true + if: always() + continue-on-error: false name: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest @@ -848,11 +834,8 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 arm: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip gcc')) || - contains(github.event.head_commit.message, 'only gcc') - continue-on-error: true + if: always() + continue-on-error: false runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu18.04:latest name: arm/c++${{matrix.std}}/${{matrix.bt}} diff --git a/.github/workflows/gcc.ys b/.github/workflows/gcc.ys index a838cd39..181a7d80 100644 --- a/.github/workflows/gcc.ys +++ b/.github/workflows/gcc.ys @@ -6,15 +6,14 @@ jobs: #---------------------------------------------------------------------------- - gcc_canary: - :: setup-job('gcc') + canary: + :: setup-job('gcc' 'canary') name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3 - :bitlinks 'shared64 static32', :img "$a(%4)"}) + item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :bitlinks 'shared64 static32', :img "$a(%4)"}) include: &include1 - ! item(11 14 'Debug' '22.04') - ! item(11 14 'Release' '22.04') @@ -28,56 +27,57 @@ jobs: steps:: checkout-manual + install-cxx + run-steps #---------------------------------------------------------------------------- - gcc_O2: # see https://github.com/biojppm/rapidyaml/issues/440 - :: setup-job('gcc') - name: gcc_O2/${{matrix.gcc}}/c++${{matrix.std}} - :: runs-on-docker-c4core('22.04') + tabtokens: + :: setup-job('gcc' 'tabtokens') + name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + :: runs-on-docker-c4core('${{matrix.img}}') + strategy: + fail-fast: false + matrix: + include: *include1 + env:: load('share/env.yaml') + {'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'} + steps:: checkout-manual + install-cxx + run-steps + + #---------------------------------------------------------------------------- + misbuild: + :: setup-job('gcc' 'misbuild') + name: misbuild#${{matrix.issue}}/gcc${{matrix.gcc}}/c++${{matrix.std}} + :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false matrix: include: - - {std: 11, gcc: 12 , bt: Release} + - {issue: 440, std: 11, gcc: 12 , bt: Release, img: 22.04, cxxflags: -O2 -DNDEBUG -g} + - {issue: 486, std: 11, gcc: 11 , bt: Release, img: 22.04, cxxflags: -O3 -DNDEBUG} env:: load('share/env.yaml') + {'CXX_' '${{matrix.gcc}}'} steps: - :: checkout-action-docker - run: c4core-install g++-${{matrix.gcc}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: configure + - name: configure (issue \#${{matrix.issue}}) run: | - cmake -S . -B build_o2 \ + cmake -S . -B build \ -DCMAKE_CXX_COMPILER=g++-${{matrix.gcc}} \ -DCMAKE_C_COMPILER=gcc-${{matrix.gcc}} \ - -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \ - -DRYML_BUILD_TESTS:BOOL=ON \ - -DRYML_DBG:BOOL=OFF - - name: build - run: cmake --build build_o2 --target ryml-test-build -j --verbose - - name: run - run: cmake --build build_o2 --target ryml-test-run + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="${{matrix.cxxflags}}" \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_DBG=OFF + - name: build (issue \#${{matrix.issue}}) + run: cmake --build build --target ryml-test-build --parallel --verbose + - name: run (issue \#${{matrix.issue}}) + run: cmake --build build --target ryml-test-run #---------------------------------------------------------------------------- - gcc_tabtokens: - :: setup-job('gcc') - name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} - :: runs-on-docker-c4core('${{matrix.img}}') - strategy: - fail-fast: false - matrix: - include: *include1 - env:: load('share/env.yaml') + {'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'} - steps:: checkout-manual + install-cxx + run-steps - - #---------------------------------------------------------------------------- - gcc_noexceptions: - :: setup-job('gcc') + noexceptions: + :: setup-job('gcc' 'noexceptions') name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3 - :bitlinks 'shared64 static32', :img "$a(%4)"}) + item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :bitlinks 'shared64 static32', :img "$a(%4)"}) include: - ! item(11 5 'Debug' '18.04') - ! item(11 5 'Release' '18.04') @@ -87,53 +87,45 @@ jobs: steps:: checkout-manual + install-cxx + run-steps #---------------------------------------------------------------------------- - gcc_extended: - :: setup-job('gcc') - name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + extended: + :: setup-job('gcc' 'extended') + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/vg${{matrix.vg}} :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false matrix: - item-vg =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :vg 'ON', :img %4}) - item =: \({:std 11, :cxx "g++-$a(%1)", :bt %2 :img %3}) include: - # VALGRIND - - ! item-vg(11 14 'Debug' '22.04') - - ! item-vg(11 14 'Release' '22.04') - - ! item-vg(14 14 'Debug' '22.04') - - ! item-vg(14 14 'Release' '22.04') - - ! item-vg(17 14 'Debug' '22.04') - - ! item-vg(17 14 'Release' '22.04') - - ! item-vg(20 14 'Debug' '22.04') - - ! item-vg(20 14 'Release' '22.04') - - ! item(13 'Debug' '22.04') - - ! item(13 'Release' '22.04') - - ! item(12 'Debug' '22.04') - - ! item(12 'Release' '22.04') - - ! item(11 'Debug' '22.04') - - ! item(11 'Release' '22.04') - - ! item(10 'Debug' '22.04') - - ! item(10 'Release' '22.04') - - ! item( 9 'Debug' '22.04') - - ! item( 9 'Release' '22.04') - - ! item( 8 'Debug' '18.04') - - ! item( 8 'Release' '18.04') - - ! item( 7 'Debug' '18.04') - - ! item( 7 'Release' '18.04') - - ! item( 6 'Debug' '18.04') - - ! item( 6 'Release' '18.04') - - ! item( 5 'Debug' '18.04') - - ! item( 5 'Release' '18.04') - - ! item(4.9 'Debug' '18.04') - - ! item(4.9 'Release' '18.04') - - ! item(4.8 'Debug' '18.04') - - ! item(4.8 'Release' '18.04') + # with valgrind: only latest gcc + - {std: 11, cxx: 14 , vg: ON , img: 22.04} + - {std: 14, cxx: 14 , vg: ON , img: 22.04} + - {std: 17, cxx: 14 , vg: ON , img: 22.04} + - {std: 20, cxx: 14 , vg: ON , img: 22.04} + # without valgrind + - {std: 11, cxx: 13 , vg: OFF, img: 22.04} + - {std: 11, cxx: 12 , vg: OFF, img: 22.04} + - {std: 11, cxx: 11 , vg: OFF, img: 22.04} + - {std: 11, cxx: 10 , vg: OFF, img: 22.04} + - {std: 11, cxx: 9 , vg: OFF, img: 22.04} + - {std: 11, cxx: 8 , vg: OFF, img: 18.04} + - {std: 11, cxx: 7 , vg: OFF, img: 18.04} + - {std: 11, cxx: 6 , vg: OFF, img: 18.04} + - {std: 11, cxx: 5 , vg: OFF, img: 18.04} + - {std: 11, cxx: 4.9, vg: OFF, img: 18.04} + - {std: 11, cxx: 4.8, vg: OFF, img: 18.04} env:: load('share/env.yaml') - steps:: checkout-manual + install-cxx + run-steps + steps: + - :: checkout-manual + - name: install + run: c4core-install g++-${{matrix.cxx}} + - :: run-gcc-manual-with-flags('Debug' '') + - :: run-gcc-manual-with-flags('Release' '-O3 -DNDEBUG') + - :: run-gcc-manual-with-flags('Release' '-O2 -DNDEBUG') + - :: run-gcc-manual-with-flags('Release' '-O1 -DNDEBUG') + - :: run-gcc-manual-with-flags('Release' '-Os -DNDEBUG') #---------------------------------------------------------------------------- gccsan: - :: setup-job('gcc') + :: setup-job('gcc' 'gccsan') name: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}} :: runs-on-docker-c4core('22.04') strategy: @@ -149,7 +141,7 @@ jobs: #---------------------------------------------------------------------------- arm: - :: setup-job('gcc') + runs-on-docker-c4core('18.04') + :: setup-job('gcc' 'arm') + runs-on-docker-c4core('18.04') name: arm/c++${{matrix.std}}/${{matrix.bt}} strategy: fail-fast: false diff --git a/.github/workflows/infra.yml b/.github/workflows/infra.yml index 1715f8ef..7a4f1d09 100644 --- a/.github/workflows/infra.yml +++ b/.github/workflows/infra.yml @@ -18,13 +18,16 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: null jobs: + log-github-event: + name: log github event + runs-on: ubuntu-24.04 + steps: + - name: log github event + run: echo "${{toJSON(github.event)}}" check_workflows: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip infra')) || - contains(github.event.head_commit.message, 'only infra') - continue-on-error: true - runs-on: ubuntu-22.04 + if: always() + continue-on-error: false + runs-on: ubuntu-24.04 steps: - name: checkout (action) uses: actions/checkout@v4 @@ -37,6 +40,8 @@ jobs: run: make -C .github/workflows build - name: test workflows run: | + wc --version + wc --help make -C .github/workflows test status=$? if [ $status != 0 ] ; then diff --git a/.github/workflows/infra.ys b/.github/workflows/infra.ys index 06d94862..73904c03 100644 --- a/.github/workflows/infra.ys +++ b/.github/workflows/infra.ys @@ -4,11 +4,16 @@ :: workflow-setup() jobs: + log-github-event: + name: log github event + runs-on: ubuntu-24.04 + steps: + - name: log github event + run: echo "${{toJSON(github.event)}}" - #---------------------------------------------------------------------------- check_workflows: - :: setup-job('infra') - runs-on: ubuntu-22.04 + :: setup-job('infra' 'check_workflows') + runs-on: ubuntu-24.04 steps: - :: checkout-action - name: install ys @@ -17,6 +22,8 @@ jobs: run: make -C .github/workflows build - name: test workflows run: | + wc --version + wc --help make -C .github/workflows test status=$? if [ $status != 0 ] ; then diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml index bb69113a..a4273ae7 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/macosx.yml @@ -19,11 +19,8 @@ env: NUM_JOBS_BUILD: null jobs: macosx: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip macosx')) || - contains(github.event.head_commit.message, 'only macosx') - continue-on-error: true + if: always() + continue-on-error: false runs-on: macos-13 strategy: fail-fast: false diff --git a/.github/workflows/macosx.ys b/.github/workflows/macosx.ys index 595cb805..08efbbbe 100644 --- a/.github/workflows/macosx.ys +++ b/.github/workflows/macosx.ys @@ -5,7 +5,7 @@ jobs: macosx: - :: setup-job('macosx') + :: setup-job('macosx' 'macosx') runs-on: macos-13 strategy: fail-fast: false diff --git a/.github/workflows/rarearchs.yml b/.github/workflows/rarearchs.yml index b4350c89..d8e043b3 100644 --- a/.github/workflows/rarearchs.yml +++ b/.github/workflows/rarearchs.yml @@ -19,11 +19,8 @@ env: NUM_JOBS_BUILD: null jobs: rarearchs: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip rarearchs')) || - contains(github.event.head_commit.message, 'only rarearchs') - continue-on-error: true + if: always() + continue-on-error: false name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-22.04 strategy: diff --git a/.github/workflows/rarearchs.ys b/.github/workflows/rarearchs.ys index e67e8251..901a3093 100644 --- a/.github/workflows/rarearchs.ys +++ b/.github/workflows/rarearchs.ys @@ -5,7 +5,7 @@ jobs: rarearchs: - :: setup-job('rarearchs') + :: setup-job('rarearchs' 'rarearchs') name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-22.04 strategy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b33726c4..600e2aa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,10 +24,7 @@ env: NUM_JOBS_BUILD: null jobs: gettag: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip release')) || - contains(github.event.head_commit.message, 'only release') + if: always() continue-on-error: false runs-on: ubuntu-latest steps: @@ -93,10 +90,7 @@ jobs: - name: Verify vars.sh run: env | grep SRC src: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip release')) || - contains(github.event.head_commit.message, 'only release') + if: always() continue-on-error: false needs: gettag runs-on: ubuntu-latest @@ -155,10 +149,7 @@ jobs: name: assets path: assets cpp: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip release')) || - contains(github.event.head_commit.message, 'only release') + if: always() continue-on-error: false name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} needs: gettag @@ -253,10 +244,7 @@ jobs: name: assets path: assets python_src: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip release')) || - contains(github.event.head_commit.message, 'only release') + if: always() continue-on-error: false name: python/src runs-on: ubuntu-latest @@ -287,10 +275,7 @@ jobs: name: dist path: dist python_wheels: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip release')) || - contains(github.event.head_commit.message, 'only release') + if: always() continue-on-error: false name: python/${{matrix.config.cibw_pyv}}/${{matrix.config.osname}}/${{matrix.config.cibw_arch}} runs-on: ${{matrix.config.os}} @@ -428,10 +413,7 @@ jobs: pip uninstall -y -v rapidyaml done release: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip release')) || - contains(github.event.head_commit.message, 'only release') + if: always() continue-on-error: false runs-on: ubuntu-latest needs: diff --git a/.github/workflows/release.ys b/.github/workflows/release.ys index 23ebc2a6..85756144 100644 --- a/.github/workflows/release.ys +++ b/.github/workflows/release.ys @@ -24,7 +24,7 @@ env: jobs: gettag: - :: setup-job('release') + :: setup-job('release' 'gettag') continue-on-error: false runs-on: ubuntu-latest steps: @@ -34,7 +34,7 @@ jobs: #---------------------------------------------------------------------------- # create source packages src: - :: setup-job('release') + :: setup-job('release' 'src') continue-on-error: false needs: gettag runs-on: ubuntu-latest @@ -55,7 +55,7 @@ jobs: #---------------------------------------------------------------------------- # create c++ packages cpp: - :: setup-job('release') + :: setup-job('release' 'cpp') continue-on-error: false name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} needs: gettag @@ -117,7 +117,7 @@ jobs: # github.com/pikepdf/pikepdf/blob/master/.github/workflows/build_wheels.yml python_src: - :: setup-job('release') + :: setup-job('release' 'python_src') continue-on-error: false name: python/src runs-on: ubuntu-latest @@ -135,7 +135,7 @@ jobs: with: {name: dist, path: dist} python_wheels: - :: setup-job('release') + :: setup-job('release' 'python_wheels') continue-on-error: false name:: -'python/${{matrix.config.cibw_pyv}}/' + @@ -266,7 +266,7 @@ jobs: #---------------------------------------------------------------------------- release: - :: setup-job('release') + :: setup-job('release' 'release') continue-on-error: false runs-on: ubuntu-latest needs: diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 9db79466..6b7300f6 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -19,11 +19,8 @@ env: NUM_JOBS_BUILD: null jobs: samples: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip samples')) || - contains(github.event.head_commit.message, 'only samples') - continue-on-error: true + if: always() + continue-on-error: false runs-on: ${{matrix.os}} strategy: fail-fast: false diff --git a/.github/workflows/samples.ys b/.github/workflows/samples.ys index 89b44c7a..ebe8f5ea 100644 --- a/.github/workflows/samples.ys +++ b/.github/workflows/samples.ys @@ -5,7 +5,7 @@ jobs: samples: - :: setup-job('samples') + :: setup-job('samples' 'samples') runs-on: ${{matrix.os}} strategy: fail-fast: false diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 236240ed..69822dee 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -19,11 +19,8 @@ env: NUM_JOBS_BUILD: null jobs: vs: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip windows')) || - contains(github.event.head_commit.message, 'only windows') - continue-on-error: true + if: always() + continue-on-error: false name: ${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ${{matrix.os}} strategy: diff --git a/.github/workflows/windows.ys b/.github/workflows/windows.ys index 34f9de5d..063195c0 100644 --- a/.github/workflows/windows.ys +++ b/.github/workflows/windows.ys @@ -5,7 +5,7 @@ jobs: vs: - :: setup-job('windows') + :: setup-job('windows' 'vs') name: ${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ${{matrix.os}} strategy: diff --git a/.github/workflows/ys/common.ys b/.github/workflows/ys/common.ys index 31ca8bc4..ca6ac63a 100644 --- a/.github/workflows/ys/common.ys +++ b/.github/workflows/ys/common.ys @@ -7,8 +7,8 @@ defn workflow-setup(name=nil overrides={}):: name:: name defaults: run: - # Use a bash shell so we can use the same syntax for environment variable - # access regardless of the host operating system + # Use a bash shell so we can use the same syntax for environment + # variable access regardless of the host operating system shell: bash -e -x {0} on:: merge _ overrides:: @@ -31,13 +31,23 @@ defn bash(name): #---------------------------------------------------------- -defn setup-job(name):: - # if: always() # https://stackoverflow.com/a/62112985/721703 - if:: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip $name')) || - contains(github.event.head_commit.message, 'only $name') - continue-on-error: true +defn setup-job(workflowname jobname):: + if: always() # https://stackoverflow.com/a/62112985/721703 + #if:: | + # ${{ + # ( + # !contains(github.event.head_commit.message, '[skip all]') + # && + # !contains(github.event.head_commit.message, '[skip $workflowname]') + # && + # !contains(github.event.head_commit.message, '[skip $workflowname.$jobname]') + # ) + # || + # contains(github.event.head_commit.message, '[only $workflowname]') + # || + # contains(github.event.head_commit.message, '[only $workflowname.$jobname]') + # }} + continue-on-error: false #---------------------------------------------------------- @@ -237,3 +247,38 @@ run-steps =:: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 + + +#---------------------------------------------------------- + +defn run-manual-with-flags(cxx cc buildtype flags=""):: +# $(buildtype:uc) +# also in that case you could $uc(buildtype) +# $() is the more general syntax for any expr +# $name and ${name} for simple var expansion +# those are the 4 interpolation forms +- name:: "$buildtype $flags ---------------------------------------" + run:: | + rm -rf build/$buildtype + cmake -S . -B build/$buildtype \ + -DCMAKE_CXX_COMPILER=$cxx-${{matrix.cxx}} \ + -DCMAKE_C_COMPILER=$cc-${{matrix.cxx}} \ + -DCMAKE_BUILD_TYPE=$buildtype \ + -DCMAKE_CXX_FLAGS_$(buildtype:uc)="$flags" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DBG=OFF +- name:: "build $buildtype $flags" + run:: | + cmake --build build/$buildtype --target ryml-test-build --parallel --verbose +- name:: "run $buildtype $flags" + run:: | + cmake --build build/$buildtype --target ryml-test-run + +defn run-gcc-manual-with-flags(buildtype flags=""): + run-manual-with-flags('g++' 'gcc' buildtype flags) + +defn run-clang-manual-with-flags(buildtype flags=""): + run-manual-with-flags('clang++' 'clang' buildtype flags) diff --git a/bm/CMakeLists.txt b/bm/CMakeLists.txt index 0f08d042..93a370b1 100644 --- a/bm/CMakeLists.txt +++ b/bm/CMakeLists.txt @@ -95,6 +95,12 @@ c4_download_remote_proj(rapidjson rapidjson_dir GIT_REPOSITORY https://github.com/Tencent/rapidjson GIT_TAG version1.1.0) set(RYML_RAPIDJSON_INC_DIR ${rapidjson_dir}/include) +if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/rapidjson.was.patched) + execute_process(COMMAND ${CMAKE_COMMAND} -E echo "cd ${rapidjson_dir} ; git --git-dir= apply ${CMAKE_CURRENT_LIST_DIR}/rapidjson.fix.diff" + COMMAND git --git-dir= apply ${CMAKE_CURRENT_LIST_DIR}/rapidjson.fix.diff + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/rapidjson.was.patched + WORKING_DIRECTORY ${rapidjson_dir}) +endif() # sajson is header only set(sajson_dir ${_ed}/sajson) diff --git a/bm/rapidjson.fix.diff b/bm/rapidjson.fix.diff new file mode 100644 index 00000000..4a86ac6c --- /dev/null +++ b/bm/rapidjson.fix.diff @@ -0,0 +1,13 @@ +diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h +index e3e20dfb..2b6ccad9 100644 +--- a/include/rapidjson/document.h ++++ b/include/rapidjson/document.h +@@ -316,7 +316,7 @@ struct GenericStringRef { + + GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} + +- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } ++ //GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } + + //! implicit conversion to plain CharType pointer + operator const Ch *() const { return s; } diff --git a/ext/c4core b/ext/c4core index 28d2b807..f480f051 160000 --- a/ext/c4core +++ b/ext/c4core @@ -1 +1 @@ -Subproject commit 28d2b807b9b58ec7754e00d6a13057fb708b78cd +Subproject commit f480f0512f5ce8fe774fdfa87464d91c0c9a1398 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e5cad7ef..7a7e8749 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -299,10 +299,10 @@ if(RYML_TEST_FUZZ) function(ryml_add_fuzz_test name) c4_add_executable(ryml-test-fuzz-${name} SOURCES - test_fuzz/test_fuzz_common.hpp - test_fuzz/test_fuzz_${name}.cpp - test_fuzz/test_fuzz_main.cpp - ${ARGN} + test_fuzz/test_fuzz_common.hpp + test_fuzz/test_fuzz_${name}.cpp + test_fuzz/test_fuzz_main.cpp + ${ARGN} INC_DIRS ${CMAKE_CURRENT_LIST_DIR} LIBS ryml c4fs FOLDER test/fuzz) @@ -315,6 +315,7 @@ if(RYML_TEST_FUZZ) string(REPLACE "/" "_" fuzz_name "${file}") add_test(NAME ryml-test-fuzz-${name_}-${fuzz_name} COMMAND ${tgtexe} ${dir}/${file}) + set_tests_properties(ryml-test-fuzz-${name_}-${fuzz_name} PROPERTIES TIMEOUT 10) endfunction() foreach(fuzz_file ${fuzz_files}) ryml_add_fuzz_test_file(${name} ${corpus_artifacts_dir} ${fuzz_file})