diff --git a/.github/workflows-in/Makefile b/.github/workflows-in/Makefile index 6cfc1911c..ab6208641 100644 --- a/.github/workflows-in/Makefile +++ b/.github/workflows-in/Makefile @@ -1,35 +1,36 @@ -SHELL := bash +M := .cache/makes +$(shell [ -d $M ] || git clone -q https://github.com/makeplus/makes $M) +include $M/init.mk +YS-VERSION := 0.2.8 +include $M/ys.mk +include $M/clean.mk +include $M/shell.mk -YS_VERSION := 0.2.4 -YS_PREFIX := $(shell cd ../.. ; pwd)/build/ys -YS := $(YS_PREFIX)/bin/ys-$(YS_VERSION) +INPUT-FILES := $(wildcard */*) +SOURCE-FILES := $(wildcard *.ys) +TARGET-FILES := $(SOURCE-FILES:%.ys=../workflows/%.yml) -INPUT_FILES := $(wildcard */*) -SOURCE_FILES := $(wildcard *.ys) -TARGET_FILES := $(SOURCE_FILES:%.ys=../workflows/%.yml) +export YSPATH := $(ROOT)/ys -export PATH := $(YS_PREFIX)/bin:$(PATH) -export YSPATH := $(shell pwd -P)/ys - -build: $(TARGET_FILES) +build: $(TARGET-FILES) test: force build - @git diff --exit-code $(TARGET_FILES) && \ + @git diff --exit-code $(TARGET-FILES) && \ echo -e '\nPASS - No normative changes to .github/workflows/*.yml' -DIFF_ORIG_COMMIT ?= HEAD +DIFF-ORIG-COMMIT ?= HEAD diff: - @for s in $(SOURCE_FILES); do \ + @for s in $(SOURCE-FILES); do \ s=$${s##*/}; \ t=../workflows/$${s%.yml}; \ - [[ $$(git show $(DIFF_ORIG_COMMIT):.github/workflows/.$$t \ + [[ $$(git show $(DIFF-ORIG-COMMIT):.github/workflows/.$$t \ 2>/dev/null) ]] && t=.$$t; \ diff -u --color=auto \ <(yq -P 'sort_keys(..)' \ - -o=props <(git show $(DIFF_ORIG_COMMIT):.github/workflows/$$t) | \ + -o=props <(git show $(DIFF-ORIG-COMMIT):.github/workflows/$$t) | \ grep -Ev '(^$$|^#)' \ ) \ <(yq -P 'sort_keys(..)' \ @@ -43,8 +44,8 @@ force: touch *.ys -../workflows/%.yml: %.ys $(YS) $(INPUT_FILES) - @if [ -f "$@" ] ; then chmod a+w $@ ; fi +../workflows/%.yml: %.ys $(YS) $(INPUT-FILES) + @if [[ -f $@ ]] ; then chmod a+w $@ ; fi @echo "# DO NOT EDIT - GENERATED FROM .github/workflows-in/$<" > $@ @echo >> $@ $(YS) -Y $< >> $@ @@ -55,11 +56,8 @@ force: # Auto install a specific version of ys install-ys: $(YS) $(YS): - mkdir -p $(YS_PREFIX) - curl -s https://yamlscript.org/install | \ - BIN=1 VERSION=$(YS_VERSION) PREFIX=$(YS_PREFIX) bash stats: @echo "ys : $$(wc -lm *.ys)" - @echo "yml: $$(wc -lm *.yml)" + @echo "yml: $$(wc -lm ../workflows/*.yml)" diff --git a/.github/workflows-in/api.ys b/.github/workflows-in/api.ys index 4186efc42..fdda88d7d 100644 --- a/.github/workflows-in/api.ys +++ b/.github/workflows-in/api.ys @@ -1,4 +1,4 @@ -!yamlscript/v0 +!ys-0 python-preamble-job =:: runs-on: ${{matrix.config.os}} @@ -85,10 +85,9 @@ python-bare-tests =:: python -m pytest -vvv api/python/tests ---- -!yamlscript/v0: +--- !ys: -:use common: :all +:use common: :: workflow-setup() jobs: @@ -101,9 +100,9 @@ jobs: name: pybare/${{matrix.config.pythonv}}/${{matrix.config.os}} :: python-preamble-job steps: - - :: checkout-action - - :: python-preamble-steps - - :: python-bare-tests + - :: checkout-action + - :: python-preamble-steps + - :: python-bare-tests #---------------------------------------------------- # run tests with built+installed wheels @@ -114,9 +113,9 @@ jobs: env: CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILES=ON steps: - - :: checkout-action - - :: python-preamble-steps - - :: python-wheel-tests + - :: checkout-action + - :: python-preamble-steps + - :: python-wheel-tests pywheelwin: :: setup-job('api' 'pywheel_win') name: pywheel/${{matrix.config.pythonv}}/${{matrix.config.os}} @@ -124,7 +123,7 @@ jobs: env: CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILES=ON steps: - - :: checkout-action - - :: python-preamble-steps - - :: setup-env-win - - :: python-wheel-tests + - :: checkout-action + - :: python-preamble-steps + - :: setup-env-win + - :: python-wheel-tests diff --git a/.github/workflows-in/benchmarks.ys b/.github/workflows-in/benchmarks.ys index 7a589a221..e01474629 100644 --- a/.github/workflows-in/benchmarks.ys +++ b/.github/workflows-in/benchmarks.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: @@ -24,7 +24,7 @@ jobs: #- {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-15-intel, xcver: 16, cmkflags: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64} - env:: -{'BM' 'ON'} + load('share/env.yaml') + env:: +{'BM' 'ON'} + load('share/env.yaml') steps: - :: checkout-action - :: version-get-vars diff --git a/.github/workflows-in/clang.ys b/.github/workflows-in/clang.ys index c7272c05c..a50dc2543 100644 --- a/.github/workflows-in/clang.ys +++ b/.github/workflows-in/clang.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: item =: \({:std %1, :cxx %2, :bt %3, :bitlinks 'shared64 static32'}) - include:: &include1 -[ + include:: &include1 +[ item(20 'clang++-18' 'Debug' ) item(20 'clang++-18' 'Release') ] env:: load('share/env.yaml') @@ -43,7 +43,7 @@ jobs: fail-fast: false matrix: include: *include1 - env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + + env:: +{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + load('share/env.yaml') steps:: checkout-action-docker + install-cxx + run-steps @@ -107,6 +107,7 @@ jobs: - :: run-clang-manual-with-flags('Release' '-O3 -DNDEBUG -m${{matrix.bits}}') - :: run-clang-manual-with-flags('Release' '-Os -DNDEBUG -m${{matrix.bits}}') + #---------------------------------------------------------------------------- clangsan: :: setup-job('clang' 'clangsan') diff --git a/.github/workflows-in/clang_tidy.ys b/.github/workflows-in/clang_tidy.ys index 54733cfa9..c8c9667a0 100644 --- a/.github/workflows-in/clang_tidy.ys +++ b/.github/workflows-in/clang_tidy.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: diff --git a/.github/workflows-in/coverage.ys b/.github/workflows-in/coverage.ys index 7864b8a26..8a15d5486 100644 --- a/.github/workflows-in/coverage.ys +++ b/.github/workflows-in/coverage.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: diff --git a/.github/workflows-in/embedded.ys b/.github/workflows-in/embedded.ys index 88f703746..f7a4f484a 100644 --- a/.github/workflows-in/embedded.ys +++ b/.github/workflows-in/embedded.ys @@ -1,9 +1,8 @@ -!yamlscript/v0: +!ys-0: # DOCKER DEBUGGING EXAMPLES AT THE END! - -:use common: :all +:use common: :: workflow-setup() :: @@ -100,7 +99,6 @@ matrix-items =:: jobs: - canary11: :: setup-job('embedded' 'canary11') :: define-job(list(first(matrix-items)) steps11 'c++11') diff --git a/.github/workflows-in/emscripten.ys b/.github/workflows-in/emscripten.ys index e57784a9a..a7be7da89 100644 --- a/.github/workflows-in/emscripten.ys +++ b/.github/workflows-in/emscripten.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: @@ -18,14 +18,14 @@ jobs: item =: \({:std %1, :cxx 'em++', :emver %2, :bt %3, :os 'ubuntu-latest', :bitlinks :static32}) include: - #- ! item(11 '2.0.34' 'Debug') - - ! item(11 '2.0.34' 'Release') - #- ! item(20 '2.0.34' 'Debug') - - ! item(20 '2.0.34' 'Release') - #- ! item(11 '3.0.0' 'Debug') - - ! item(11 '3.0.0' 'Release') - #- ! item(20 '3.0.0' 'Debug') - - ! item(20 '3.0.0' 'Release') + #- ! item(11 '2.0.34' 'Debug') + - ! item(11 '2.0.34' 'Release') + #- ! item(20 '2.0.34' 'Debug') + - ! item(20 '2.0.34' 'Release') + #- ! item(11 '3.0.0' 'Debug') + - ! item(11 '3.0.0' 'Release') + #- ! item(20 '3.0.0' 'Debug') + - ! item(20 '3.0.0' 'Release') env:: load('share/env.yaml') + {'EMSCRIPTEN_CACHE_FOLDER' 'emsdk-cache'} + {'CMAKE_FLAGS' '-DRYML_TEST_SUITE=OFF'} steps: diff --git a/.github/workflows-in/gcc.ys b/.github/workflows-in/gcc.ys index d43b2afaa..bec05b19c 100644 --- a/.github/workflows-in/gcc.ys +++ b/.github/workflows-in/gcc.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: @@ -16,14 +16,14 @@ jobs: item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :bitlinks 'shared64 static32', :img "$a(%4)"}) include: &include1 # use gcc13 because it's a lot faster than gcc14 - - ! item(11 13 'Debug' '22.04') - - ! item(11 13 'Release' '22.04') - - ! item(20 13 'Debug' '22.04') - - ! item(20 13 'Release' '22.04') - - ! item(11 5 'Debug' '18.04') - - ! item(11 5 'Release' '18.04') - - ! item(11 4.8 'Debug' '18.04') - - ! item(11 4.8 'Release' '18.04') + - :: item(11 13 'Debug' '22.04') + - :: item(11 13 'Release' '22.04') + - :: item(20 13 'Debug' '22.04') + - :: item(20 13 'Release' '22.04') + - :: item(11 5 'Debug' '18.04') + - :: item(11 5 'Release' '18.04') + - :: item(11 4.8 'Debug' '18.04') + - :: item(11 4.8 'Release' '18.04') env:: load('share/env.yaml') steps:: checkout-manual + install-cxx + run-steps @@ -187,10 +187,8 @@ jobs: fail-fast: false matrix: include:: - ? for - san qw(asan lsan tsan ubsan) - std [11 14 17 20] - : ! { std:: std, cxx: g++-14, bt:: san, bitlinks: static64 } + for san qw(asan lsan tsan ubsan), std [11 14 17 20]:: + { std:: std, cxx: g++-14, bt:: san, bitlinks: static64 } env:: load('share/env.yaml') steps:: checkout-action-docker + install-cxx + run-steps @@ -208,13 +206,13 @@ jobs: include: # these jobs take much longer, so run only one bitlink pair per job to # profit from parallelism - - ! item(11 'Debug') - - ! item(11 'Release') - - ! item(14 'Debug') - - ! item(14 'Release') - - ! item(17 'Debug') - - ! item(17 'Release') - env:: -{'TOOLCHAIN' '${{matrix.toolchain}}'} + load('share/env.yaml') + - :: item(11 'Debug') + - :: item(11 'Release') + - :: item(14 'Debug') + - :: item(14 'Release') + - :: item(17 'Debug') + - :: item(17 'Release') + env:: +{'TOOLCHAIN' '${{matrix.toolchain}}'} + load('share/env.yaml') steps: - :: checkout-manual - name: install gcc-arm-linux-gnueabihf diff --git a/.github/workflows-in/infra.ys b/.github/workflows-in/infra.ys index a5917f9c8..e46497479 100644 --- a/.github/workflows-in/infra.ys +++ b/.github/workflows-in/infra.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: diff --git a/.github/workflows-in/install.ys b/.github/workflows-in/install.ys index ec76ff605..ee29bdf02 100644 --- a/.github/workflows-in/install.ys +++ b/.github/workflows-in/install.ys @@ -1,8 +1,7 @@ -!yamlscript/v0: +!ys-0: -:use common: :all -:: - workflow-setup:: test_install +:use common: +:: workflow-setup('test_install') env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-in/macosx.ys b/.github/workflows-in/macosx.ys index a8e14f58f..699d2954f 100644 --- a/.github/workflows-in/macosx.ys +++ b/.github/workflows-in/macosx.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: diff --git a/.github/workflows-in/release.ys b/.github/workflows-in/release.ys index 39226ca37..95a724512 100644 --- a/.github/workflows-in/release.ys +++ b/.github/workflows-in/release.ys @@ -1,5 +1,6 @@ -!yamlscript/v0 +!ys-0 +use common: defn pywhl(pyv cibwpyv cibwarch cibwplatform os vsenvarch='' cmkflags=''):: # NOTE: cannot use _ in names? name:: "python/$pyv/$cibwplatform" @@ -15,87 +16,87 @@ defn pywhl(pyv cibwpyv cibwarch cibwplatform os vsenvarch='' cmkflags=''):: # N python-wheel-matrix =:: # pyv arch platform os -- ! pywhl('3.13' 313 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') -- ! pywhl('3.13' 313 'i686' 'manylinux_i686' 'ubuntu-24.04') -- ! pywhl('3.13' 313 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') -- ! pywhl('3.13' 313 'x86_64' 'macosx_x86_64' 'macos-15-intel') -- ! pywhl('3.13' 313 'arm64' 'macosx_arm64' 'macos-latest') -- ! pywhl('3.13' 313 'universal2' 'macosx_universal2' 'macos-latest') +- :: pywhl('3.13' 313 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') +- :: pywhl('3.13' 313 'i686' 'manylinux_i686' 'ubuntu-24.04') +- :: pywhl('3.13' 313 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') +- :: pywhl('3.13' 313 'x86_64' 'macosx_x86_64' 'macos-15-intel') +- :: pywhl('3.13' 313 'arm64' 'macosx_arm64' 'macos-latest') +- :: pywhl('3.13' 313 'universal2' 'macosx_universal2' 'macos-latest') # pyv arch platform os -- ! pywhl('3.12' 312 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') -- ! pywhl('3.12' 312 'i686' 'manylinux_i686' 'ubuntu-24.04') -- ! pywhl('3.12' 312 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') -- ! pywhl('3.12' 312 'x86_64' 'macosx_x86_64' 'macos-15-intel') -- ! pywhl('3.12' 312 'arm64' 'macosx_arm64' 'macos-latest') -- ! pywhl('3.12' 312 'universal2' 'macosx_universal2' 'macos-latest') +- :: pywhl('3.12' 312 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') +- :: pywhl('3.12' 312 'i686' 'manylinux_i686' 'ubuntu-24.04') +- :: pywhl('3.12' 312 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') +- :: pywhl('3.12' 312 'x86_64' 'macosx_x86_64' 'macos-15-intel') +- :: pywhl('3.12' 312 'arm64' 'macosx_arm64' 'macos-latest') +- :: pywhl('3.12' 312 'universal2' 'macosx_universal2' 'macos-latest') # pyv arch platform os -- ! pywhl('3.11' 311 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') -- ! pywhl('3.11' 311 'i686' 'manylinux_i686' 'ubuntu-24.04') -- ! pywhl('3.11' 311 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') -- ! pywhl('3.11' 311 'x86_64' 'macosx_x86_64' 'macos-15-intel') -- ! pywhl('3.11' 311 'arm64' 'macosx_arm64' 'macos-latest') -- ! pywhl('3.11' 311 'universal2' 'macosx_universal2' 'macos-latest') +- :: pywhl('3.11' 311 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') +- :: pywhl('3.11' 311 'i686' 'manylinux_i686' 'ubuntu-24.04') +- :: pywhl('3.11' 311 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') +- :: pywhl('3.11' 311 'x86_64' 'macosx_x86_64' 'macos-15-intel') +- :: pywhl('3.11' 311 'arm64' 'macosx_arm64' 'macos-latest') +- :: pywhl('3.11' 311 'universal2' 'macosx_universal2' 'macos-latest') # pyv arch platform os -- ! pywhl('3.10' 310 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') -- ! pywhl('3.10' 310 'i686' 'manylinux_i686' 'ubuntu-24.04') -- ! pywhl('3.10' 310 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') -- ! pywhl('3.10' 310 'x86_64' 'macosx_x86_64' 'macos-15-intel') -- ! pywhl('3.10' 310 'arm64' 'macosx_arm64' 'macos-latest') -- ! pywhl('3.10' 310 'universal2' 'macosx_universal2' 'macos-latest') +- :: pywhl('3.10' 310 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') +- :: pywhl('3.10' 310 'i686' 'manylinux_i686' 'ubuntu-24.04') +- :: pywhl('3.10' 310 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') +- :: pywhl('3.10' 310 'x86_64' 'macosx_x86_64' 'macos-15-intel') +- :: pywhl('3.10' 310 'arm64' 'macosx_arm64' 'macos-latest') +- :: pywhl('3.10' 310 'universal2' 'macosx_universal2' 'macos-latest') # pyv arch platform os -- ! pywhl('3.9' 39 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') -- ! pywhl('3.9' 39 'i686' 'manylinux_i686' 'ubuntu-24.04') -- ! pywhl('3.9' 39 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') -- ! pywhl('3.9' 39 'x86_64' 'macosx_x86_64' 'macos-15-intel') -- ! pywhl('3.9' 39 'arm64' 'macosx_arm64' 'macos-latest') -- ! pywhl('3.9' 39 'universal2' 'macosx_universal2' 'macos-latest') +- :: pywhl('3.9' 39 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') +- :: pywhl('3.9' 39 'i686' 'manylinux_i686' 'ubuntu-24.04') +- :: pywhl('3.9' 39 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') +- :: pywhl('3.9' 39 'x86_64' 'macosx_x86_64' 'macos-15-intel') +- :: pywhl('3.9' 39 'arm64' 'macosx_arm64' 'macos-latest') +- :: pywhl('3.9' 39 'universal2' 'macosx_universal2' 'macos-latest') # pyv arch platform os -- ! pywhl('3.8' 38 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') -- ! pywhl('3.8' 38 'i686' 'manylinux_i686' 'ubuntu-24.04') -- ! pywhl('3.8' 38 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') -- ! pywhl('3.8' 38 'x86_64' 'macosx_x86_64' 'macos-15-intel') -#- ! pywhl('3.8' 38 'arm64' 'macosx_arm64' 'macos-14' ) # disabled: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64 -#- ! pywhl('3.8' 38 'universal2' 'macosx_universal2' 'macos-14' ) # disabled: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64 +- :: pywhl('3.8' 38 'x86_64' 'manylinux_x86_64' 'ubuntu-24.04') +- :: pywhl('3.8' 38 'i686' 'manylinux_i686' 'ubuntu-24.04') +- :: pywhl('3.8' 38 'aarch64' 'manylinux_aarch64' 'ubuntu-24.04-arm') +- :: pywhl('3.8' 38 'x86_64' 'macosx_x86_64' 'macos-15-intel') +#- :: pywhl('3.8' 38 'arm64' 'macosx_arm64' 'macos-14' ) # disabled: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64 +#- :: pywhl('3.8' 38 'universal2' 'macosx_universal2' 'macos-14' ) # disabled: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64 # pyv arch platform os -- ! pywhl('3.7' 37 'x86_64' 'manylinux_x86_64' 'ubuntu-22.04') -- ! pywhl('3.7' 37 'i686' 'manylinux_i686' 'ubuntu-22.04') -- ! pywhl('3.7' 37 'x86_64' 'macosx_x86_64' 'macos-15-intel') +- :: pywhl('3.7' 37 'x86_64' 'manylinux_x86_64' 'ubuntu-22.04') +- :: pywhl('3.7' 37 'i686' 'manylinux_i686' 'ubuntu-22.04') +- :: pywhl('3.7' 37 'x86_64' 'macosx_x86_64' 'macos-15-intel') # pyv arch platform os -#- ! pywhl('3.6' 36 'x86_64' 'manylinux_x86_64' 'ubuntu-20.04') # setup-python 3.6 requires ubuntu 20.04 -#- ! pywhl('3.6' 36 'i686' 'manylinux_i686' 'ubuntu-20.04') # setup-python 3.6 requires ubuntu 20.04 -#- ! pywhl('3.6' 36 'x86_64' 'macosx_x86_64' 'macos-15-intel') +#- :: pywhl('3.6' 36 'x86_64' 'manylinux_x86_64' 'ubuntu-20.04') # setup-python 3.6 requires ubuntu 20.04 +#- :: pywhl('3.6' 36 'i686' 'manylinux_i686' 'ubuntu-20.04') # setup-python 3.6 requires ubuntu 20.04 +#- :: pywhl('3.6' 36 'x86_64' 'macosx_x86_64' 'macos-15-intel') python-wheel-matrix-win =:: # pyv arch platform os vsenvarch cmakeflags -- ! pywhl('3.13' 313 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -- ! pywhl('3.13' 313 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') -#- ! pywhl('3.13' 313 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') +- :: pywhl('3.13' 313 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +- :: pywhl('3.13' 313 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +#- :: pywhl('3.13' 313 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') # -- ! pywhl('3.12' 312 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -- ! pywhl('3.12' 312 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') -#- ! pywhl('3.12' 312 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') +- :: pywhl('3.12' 312 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +- :: pywhl('3.12' 312 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +#- :: pywhl('3.12' 312 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') # -- ! pywhl('3.11' 311 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -- ! pywhl('3.11' 311 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') -#- ! pywhl('3.11' 311 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') +- :: pywhl('3.11' 311 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +- :: pywhl('3.11' 311 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +#- :: pywhl('3.11' 311 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') # -- ! pywhl('3.10' 310 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -- ! pywhl('3.10' 310 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') -#- ! pywhl('3.10' 310 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') +- :: pywhl('3.10' 310 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +- :: pywhl('3.10' 310 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +#- :: pywhl('3.10' 310 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') # -- ! pywhl('3.9' 39 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -- ! pywhl('3.9' 39 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') -#- ! pywhl('3.9' 39 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') +- :: pywhl('3.9' 39 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +- :: pywhl('3.9' 39 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +#- :: pywhl('3.9' 39 'ARM64' 'win_arm64' 'windows-2022' 'amd64_arm64' '-G "Visual Studio 17 2022" -A ARM64') # -- ! pywhl('3.8' 38 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -- ! pywhl('3.8' 38 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +- :: pywhl('3.8' 38 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +- :: pywhl('3.8' 38 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') # -- ! pywhl('3.7' 37 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -#- ! pywhl('3.7' 37 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +- :: pywhl('3.7' 37 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +#- :: pywhl('3.7' 37 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') # -- ! pywhl('3.6' 36 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') -- ! pywhl('3.6' 36 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') +- :: pywhl('3.6' 36 'AMD64' 'win_amd64' 'windows-2022' 'x64' '-G "Visual Studio 17 2022" -A x64') +- :: pywhl('3.6' 36 'x86' 'win32' 'windows-2022' 'x86' '-G "Visual Studio 17 2022" -A Win32') setup-env =:: @@ -109,86 +110,84 @@ setup-env-win =:: with: arch: ${{matrix.config.vsenvarch}} +defn define-workflow-python-wheels(name matrix setup-env):: + :: setup-job('release' name) + name: ${{matrix.config.name}} + runs-on: ${{matrix.config.os}} + env: + CMAKE_FLAGS: ${{matrix.config.cmakeflags}} -DCMAKE_VERBOSE_MAKEFILES=ON -DRYML_DEV=OFF -DRYML_API_TESTS=OFF -DRYML_API_BENCHMARKS=OFF + CIBW_BUILD: cp${{matrix.config.cibw_pyv}}-${{matrix.config.cibw_platform}} + CIBW_ARCHS: ${{matrix.config.cibw_arch}} + CIBW_BUILD_VERBOSITY: 2 + strategy: + fail-fast: false + matrix: + config:: matrix + steps: + - :: checkout-action + setup-env + - name: create wheel + uses: pypa/cibuildwheel@v2.23 + - name: rename wheelhouse -> dist + run: mv -fv wheelhouse dist + - name: Verify artifacts + run: ls -lFhp dist/ + - name: Save artifacts for publishing to PyPI + uses: actions/upload-artifact@v4 + with: {name: 'dist-${{matrix.config.sfx}}', path: dist/} + # run the tests + - name: install python ${{matrix.config.pythonv}} + uses: actions/setup-python@v5 + with: + python-version: ${{matrix.config.pythonv}} + - name: confirm python install + run: | + python --version + python -c 'import sys ; import struct ; import platform ; print("python:", sys.version, struct.calcsize("P") * 8, "bits", platform.machine())' + - name: test with python ${{matrix.config.pythonv}} + run: | + set -x + echo "python ${{matrix.config.pythonv}} ${{matrix.config.py_arch}} ${{matrix.config.cibw_arch}}" + # skip 32 bit tests, as Python 32 bits are not available in ubuntu + arch="${{matrix.config.cibw_arch}}" + if [ "$arch" == "x86" ] || [ "$arch" == "i686" ] ; then + exit 0 + fi + python --version + python -c 'import sys ; import struct ; import platform ; print("python:", sys.version, struct.calcsize("P") * 8, "bits", platform.machine())' + pip --version + pip install -v -r requirements.txt + pip install -v -r api/python/requirements.txt + for whl in dist/* ; do + # verify that we can import the wheel files without installing the wheel + unzip -l $whl + mkdir -p tmpwhl + cd tmpwhl + unzip ../$whl + ls -lFpAR . + ( export PYTHONPATH=`pwd`/ryml ; python -c 'import ryml' ) + cd .. + rm -rf tmpwhl + # verify that we can install the wheel and then import it + pip install -v $whl + pip show -f rapidyaml + python -c 'import ryml' + python -c 'import ryml ; print("ryml", ryml.version, ryml.version_tuple)' + python -c 'import ryml ; tree = ryml.parse_in_arena(b"{foo: bar}") ; assert tree.key(1) == b"foo" ; assert tree.val(1) == b"bar" ; print(str(tree.key(1), "utf8")) ; print(str(tree.val(1), "utf8"))' + # run the tests + python -m pytest -vvv api/python/tests + pip uninstall -y -v rapidyaml + done + --- -!yamlscript/v0: +!ys: + +:use common: -:use common: :all :workflow-setup 'release':: push: tags: [v0.*, v1.*, v2.*] branches: [master] -:: - defn define-workflow-python-wheels(name matrix setup-env):: - :: setup-job('release' name) - name: ${{matrix.config.name}} - runs-on: ${{matrix.config.os}} - env: - CMAKE_FLAGS: ${{matrix.config.cmakeflags}} -DCMAKE_VERBOSE_MAKEFILES=ON -DRYML_DEV=OFF -DRYML_API_TESTS=OFF -DRYML_API_BENCHMARKS=OFF - CIBW_BUILD: cp${{matrix.config.cibw_pyv}}-${{matrix.config.cibw_platform}} - CIBW_ARCHS: ${{matrix.config.cibw_arch}} - CIBW_BUILD_VERBOSITY: 2 - strategy: - fail-fast: false - matrix: - config:: matrix - steps: - - :: checkout-action - - :: setup-env - - name: create wheel - uses: pypa/cibuildwheel@v2.23 - - name: rename wheelhouse -> dist - run: mv -fv wheelhouse dist - - name: Verify artifacts - run: ls -lFhp dist/ - - name: Save artifacts for publishing to PyPI - uses: actions/upload-artifact@v4 - with: {name: 'dist-${{matrix.config.sfx}}', path: dist/} - # run the tests - - name: install python ${{matrix.config.pythonv}} - uses: actions/setup-python@v5 - with: - python-version: ${{matrix.config.pythonv}} - - name: confirm python install - run: | - python --version - python -c 'import sys ; import struct ; import platform ; print("python:", sys.version, struct.calcsize("P") * 8, "bits", platform.machine())' - - name: test with python ${{matrix.config.pythonv}} - run: | - set -x - echo "python ${{matrix.config.pythonv}} ${{matrix.config.py_arch}} ${{matrix.config.cibw_arch}}" - # skip 32 bit tests, as Python 32 bits are not available in ubuntu - arch="${{matrix.config.cibw_arch}}" - if [ "$arch" == "x86" ] || [ "$arch" == "i686" ] ; then - exit 0 - fi - python --version - python -c 'import sys ; import struct ; import platform ; print("python:", sys.version, struct.calcsize("P") * 8, "bits", platform.machine())' - pip --version - pip install -v -r requirements.txt - pip install -v -r api/python/requirements.txt - for whl in dist/* ; do - # verify that we can import the wheel files without installing the wheel - unzip -l $whl - mkdir -p tmpwhl - cd tmpwhl - unzip ../$whl - ls -lFpAR . - ( export PYTHONPATH=`pwd`/ryml ; python -c 'import ryml' ) - cd .. - rm -rf tmpwhl - # verify that we can install the wheel and then import it - pip install -v $whl - pip show -f rapidyaml - python -c 'import ryml' - python -c 'import ryml ; print("ryml", ryml.version, ryml.version_tuple)' - python -c 'import ryml ; tree = ryml.parse_in_arena(b"{foo: bar}") ; assert tree.key(1) == b"foo" ; assert tree.val(1) == b"bar" ; print(str(tree.key(1), "utf8")) ; print(str(tree.val(1), "utf8"))' - # run the tests - python -m pytest -vvv api/python/tests - pip uninstall -y -v rapidyaml - done - - =>: nil # this is needed to expose the function above env: PROJ_PKG_NAME: rapidyaml- @@ -306,7 +305,7 @@ jobs: mkdir -p assets asset_src=`ls -1 ./build/shared64/*-${{matrix.config.sfxg}}` asset_dst=./assets/${PROJ_PKG_NAME}${SRC_VERSION}-${{matrix.config.sfxp}} - [ ! -f $asset_src ] && exit 1 + [ -f $asset_src ] || exit cp -fav $asset_src $asset_dst - name: Save artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows-in/samples.ys b/.github/workflows-in/samples.ys index 6ad6fedff..47536c971 100644 --- a/.github/workflows-in/samples.ys +++ b/.github/workflows-in/samples.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: +!ys-0: -:use common: :all +:use common: :: workflow-setup() jobs: @@ -18,7 +18,7 @@ jobs: - {bt: Debug , os: macos-latest} - {bt: Release, os: macos-latest} env: !:merge* - - ! load('share/env.yaml') + - :: load('share/env.yaml') - CMANY: ON steps: - :: checkout-action @@ -48,14 +48,9 @@ jobs: - name: custom_c4core run: cd samples/custom_c4core && ./run.sh $BT - name: fetch_content - run: | - # run this sample only if the branch exists on the repo - set -xe + run:: | + set -xeo pipefail cd samples/fetch_content - repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY - # https://stackoverflow.com/questions/58033366 - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} - echo branch=$branch - if [ ! -z "$(git ls-remote $repo | grep $branch)" ] ; then - ./run.sh $BT $branch "$repo" - fi + ${checkout-find-branch} + # run this sample only if the branch exists on the repo + ./run.sh \$BT \$hash "\$repo" || echo 'maybe some other time' diff --git a/.github/workflows-in/windows.ys b/.github/workflows-in/windows.ys index 8ca40aa9e..9e79d0541 100644 --- a/.github/workflows-in/windows.ys +++ b/.github/workflows-in/windows.ys @@ -1,6 +1,6 @@ -!yamlscript/v0: # data mode +!ys-0: -:use common: :all +:use common: :: workflow-setup() items =:: diff --git a/.github/workflows-in/ys/common.ys b/.github/workflows-in/ys/common.ys index a25ffacee..98d88524e 100644 --- a/.github/workflows-in/ys/common.ys +++ b/.github/workflows-in/ys/common.ys @@ -1,11 +1,10 @@ -!yamlscript/v0 +!ys-0 ns: common #---------------------------------------------------------- defn workflow-setup(name=nil overrides={}):: - name =: name || FILE.replace(/.*\//).replace(/\.ys$/) - name:: name + name:: name || FILE.replace(/.*\//).replace(/\.ys$/) defaults: run: # Use a bash shell so we can use the same syntax for environment @@ -27,11 +26,6 @@ defn workflow-setup(name=nil overrides={}):: NUM_JOBS_BUILD: # 4 -#---------------------------------------------------------- -defn bash(name): - slurp: "bash/$name.bash" - - #---------------------------------------------------------- defn setup-job(workflowname jobname):: if: always() # https://stackoverflow.com/a/62112985/721703 @@ -79,48 +73,64 @@ checkout-action-docker =:: #---------------------------------------------------------- +# this is a bash block to compute the repo and branch for manual +# checkouts +checkout-find-branch =:: | + env | sort + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + echo branch=$branch + localbranch=$branch + rembranch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch + branch=$branch:$localbranch + fi + fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + checkout-manual =:: # This provides a manual checkout, needed because the nodejs version # prevents use of checkout@v3/v4 action on ubuntu18.04 - name: checkout (manually) - run: | + run:: | set -xeo pipefail - env | sort - echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL - echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_REF_NAME=$GITHUB_REF_NAME - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY - # check the branch - # https://stackoverflow.com/questions/58033366 - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} - echo branch=$branch - # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - # refs/pull/485/merge -> pull/485/head - branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` - echo "... falling back to $branch" - # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - exit 1 - else - echo "branch $branch exists on $repo" - localbranch=$(echo $branch | sed -e 's@[/:]@_@g') - branch=$branch:$localbranch - echo "naming locally as $branch" - fi - fi + ${checkout-find-branch} # finally, create the local repo git init -q . # needed for running in the docker image. # see https://github.com/actions/checkout/issues/1169 git config --system --add safe.directory '*' # finally, do it! - git remote add origin $repo - git fetch origin $branch + git remote add origin \$repo + git fetch origin \$branch git reset --hard FETCH_HEAD git submodule update --init --recursive # show the log @@ -269,7 +279,7 @@ defn run-manual-with-flags(cxx cc buildtype flags=""):: # $() is the more general syntax for any expr # $name and ${name} for simple var expansion # those are the 4 interpolation forms -- name:: "---------------------------------------------------------" +- name: --------------------------------------------------------- run:: | echo "$buildtype ::: $flags" - name:: "configure $buildtype ::: $flags" @@ -300,7 +310,7 @@ defn run-manual-with-flags(cxx cc buildtype flags=""):: defn run-vs-manual-with-flags(gen arch buildtype shared flags=""):: -- name:: "---------------------------------------------------------" +- name: --------------------------------------------------------- run:: | echo "$buildtype ::: $flags shared=$shared" - name:: "configure $buildtype ::: $flags shared=$shared" diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 11d84ad1b..c0eda84a7 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -22,7 +22,6 @@ jobs: pybare: if: always() continue-on-error: false - name: pybare/${{matrix.config.pythonv}}/${{matrix.config.os}} runs-on: ${{matrix.config.os}} strategy: fail-fast: false @@ -73,10 +72,10 @@ jobs: run: | export PYTHONPATH=`pwd`/build/py/api/python3:$PYTHONPATH python -m pytest -vvv api/python/tests + name: pybare/${{matrix.config.pythonv}}/${{matrix.config.os}} pywheel: if: always() continue-on-error: false - name: pywheel/${{matrix.config.pythonv}}/${{matrix.config.os}} runs-on: ${{matrix.config.os}} strategy: fail-fast: false @@ -140,10 +139,10 @@ jobs: run: pip install dist/*.whl - name: test with pytest run: python -m pytest -vvv api/python/tests + name: pywheel/${{matrix.config.pythonv}}/${{matrix.config.os}} pywheelwin: if: always() continue-on-error: false - name: pywheel/${{matrix.config.pythonv}}/${{matrix.config.os}} runs-on: ${{matrix.config.os}} strategy: fail-fast: false @@ -210,3 +209,4 @@ jobs: run: pip install dist/*.whl - name: test with pytest run: python -m pytest -vvv api/python/tests + name: pywheel/${{matrix.config.pythonv}}/${{matrix.config.os}} diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index ffe75d2e5..0735ec9bd 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -85,8 +85,6 @@ jobs: - name: Verify vars.sh run: env | grep SRC benchmarks: - name: bm/c++${{matrix.std}}/${{matrix.comp}}/${{matrix.bt}} - needs: gettag if: always() continue-on-error: false runs-on: ${{matrix.os}} @@ -200,3 +198,5 @@ jobs: with: name: ryml-benchmark_results-${{strategy.job-index}} path: ryml-benchmark_results/ + name: bm/c++${{matrix.std}}/${{matrix.comp}}/${{matrix.bt}} + needs: gettag diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 15c209d14..8d207e8cf 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -22,7 +22,6 @@ jobs: canary: if: always() continue-on-error: false - name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -88,10 +87,10 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 + name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} tabtokens: if: always() continue-on-error: false - name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu22.04:latest needs: canary @@ -159,10 +158,10 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 + name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} noexceptions: if: always() continue-on-error: false - name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu22.04:latest needs: canary @@ -230,10 +229,10 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 + name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} extended: if: always() continue-on-error: false - name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg${{matrix.vg}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest needs: canary @@ -450,23 +449,35 @@ jobs: # https://stackoverflow.com/questions/58033366 branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + localbranch=$branch + rembranch=$branch # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" # refs/pull/485/merge -> pull/485/head branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch echo "... falling back to $branch" # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" exit 1 else echo "branch $branch exists on $repo" localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch branch=$branch:$localbranch - echo "naming locally as $branch" fi fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + # finally, create the local repo git init -q . # needed for running in the docker image. @@ -626,10 +637,10 @@ jobs: source .github/setenv.sh export CTEST_PARALLEL_LEVEL=`_c4getnumcores` cmake --build build/Release --target ryml-test-run + name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg${{matrix.vg}} clangsan: if: always() continue-on-error: false - name: san/${{matrix.bt}}/c++${{matrix.std}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu22.04:latest needs: canary @@ -752,3 +763,4 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 + name: san/${{matrix.bt}}/c++${{matrix.std}} diff --git a/.github/workflows/embedded.yml b/.github/workflows/embedded.yml index bc096a824..abf056af5 100644 --- a/.github/workflows/embedded.yml +++ b/.github/workflows/embedded.yml @@ -189,9 +189,6 @@ jobs: 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 @@ -304,10 +301,10 @@ jobs: run: | export CTEST_PARALLEL_LEVEL=`nproc` cmake --build build --target ryml-test-run - xcompile20: needs: - canary11 - canary20 + xcompile20: if: always() continue-on-error: false name: ${{matrix.arch}}/c++20 @@ -425,3 +422,6 @@ jobs: run: | export CTEST_PARALLEL_LEVEL=`nproc` cmake --build build --target ryml-test-run + needs: + - canary11 + - canary20 diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index f5c829664..efd332ccf 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -20,7 +20,6 @@ env: NUM_JOBS_BUILD: null jobs: emscripten: - name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} if: ${{ false }} continue-on-error: false runs-on: ${{matrix.os}} @@ -87,3 +86,4 @@ jobs: run: source .github/setenv.sh && c4_build_test static32 - name: static32-run run: source .github/setenv.sh && c4_run_test static32 + name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 0e46b66a9..eb9ddaf92 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -19,56 +19,56 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: null jobs: - canary: + vg1: if: always() continue-on-error: false - name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest + needs: canary strategy: fail-fast: false matrix: include: - - std: 11 - cxx: g++-13 - bt: Debug - bitlinks: shared64 static32 - img: '22.04' - - std: 11 - cxx: g++-13 - bt: Release - bitlinks: shared64 static32 - img: '22.04' - std: 20 - cxx: g++-13 - bt: Debug - bitlinks: shared64 static32 - img: '22.04' + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 - std: 20 - cxx: g++-13 - bt: Release - bitlinks: shared64 static32 - img: '22.04' - - std: 11 - cxx: g++-5 - bt: Debug - bitlinks: shared64 static32 - img: '18.04' - - std: 11 - cxx: g++-5 - bt: Release - bitlinks: shared64 static32 - img: '18.04' + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 + - std: 17 + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 + - std: 17 + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 + - std: 14 + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 + - std: 14 + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 - std: 11 - cxx: g++-4.8 - bt: Debug - bitlinks: shared64 static32 - img: '18.04' + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 - std: 11 - cxx: g++-4.8 - bt: Release - bitlinks: shared64 static32 - img: '18.04' + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -93,23 +93,35 @@ jobs: # https://stackoverflow.com/questions/58033366 branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + localbranch=$branch + rembranch=$branch # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" # refs/pull/485/merge -> pull/485/head branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch echo "... falling back to $branch" # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" exit 1 else echo "branch $branch exists on $repo" localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch branch=$branch:$localbranch - echo "naming locally as $branch" fi fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + # finally, create the local repo git init -q . # needed for running in the docker image. @@ -127,45 +139,96 @@ 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 - tabtokens: + - name: install + run: c4core-install g++-${{matrix.cxx}} + - name: '---------------------------------------------------------' + run: | + echo "Debug ::: -m${{matrix.bits}}" + - name: 'configure Debug ::: -m${{matrix.bits}}' + run: | + rm -rf build/Debug + export C4_EXTERN_DIR=`pwd`/build/extern + 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="-m${{matrix.bits}}" \ + -DCMAKE_C_FLAGS_DEBUG="-m${{matrix.bits}}" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DEV=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_DBG=OFF + - name: 'build Debug ::: -m${{matrix.bits}}' + run: | + cmake --build build/Debug --target ryml-test-build --parallel --verbose + - name: 'run Debug ::: -m${{matrix.bits}}' + run: | + source .github/setenv.sh + export CTEST_PARALLEL_LEVEL=`_c4getnumcores` + cmake --build build/Debug --target ryml-test-run + - name: '---------------------------------------------------------' + run: | + echo "Release ::: -O1 -DNDEBUG -m${{matrix.bits}}" + - name: 'configure Release ::: -O1 -DNDEBUG -m${{matrix.bits}}' + run: | + rm -rf build/Release + export C4_EXTERN_DIR=`pwd`/build/extern + 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 -m${{matrix.bits}}" \ + -DCMAKE_C_FLAGS_RELEASE="-O1 -DNDEBUG -m${{matrix.bits}}" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DEV=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_DBG=OFF + - name: 'build Release ::: -O1 -DNDEBUG -m${{matrix.bits}}' + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: 'run Release ::: -O1 -DNDEBUG -m${{matrix.bits}}' + run: | + source .github/setenv.sh + export CTEST_PARALLEL_LEVEL=`_c4getnumcores` + cmake --build build/Release --target ryml-test-run + - name: '---------------------------------------------------------' + run: | + echo "Release ::: -O2 -DNDEBUG -m${{matrix.bits}}" + - name: 'configure Release ::: -O2 -DNDEBUG -m${{matrix.bits}}' + run: | + rm -rf build/Release + export C4_EXTERN_DIR=`pwd`/build/extern + 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 -m${{matrix.bits}}" \ + -DCMAKE_C_FLAGS_RELEASE="-O2 -DNDEBUG -m${{matrix.bits}}" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DEV=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_DBG=OFF + - name: 'build Release ::: -O2 -DNDEBUG -m${{matrix.bits}}' + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: 'run Release ::: -O2 -DNDEBUG -m${{matrix.bits}}' + run: | + source .github/setenv.sh + export CTEST_PARALLEL_LEVEL=`_c4getnumcores` + cmake --build build/Release --target ryml-test-run + name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg/D_O1_O2 + vg2: if: always() continue-on-error: false - name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest needs: canary @@ -173,46 +236,46 @@ jobs: fail-fast: false matrix: include: - - std: 11 - cxx: g++-13 - bt: Debug - bitlinks: shared64 static32 - img: '22.04' - - std: 11 - cxx: g++-13 - bt: Release - bitlinks: shared64 static32 - img: '22.04' - std: 20 - cxx: g++-13 - bt: Debug - bitlinks: shared64 static32 - img: '22.04' + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 - std: 20 - cxx: g++-13 - bt: Release - bitlinks: shared64 static32 - img: '22.04' + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 + - std: 17 + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 + - std: 17 + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 + - std: 14 + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 + - std: 14 + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 - std: 11 - cxx: g++-5 - bt: Debug - bitlinks: shared64 static32 - img: '18.04' + cxx: 14 + bits: 64 + vg: 'ON' + img: 22.04 - std: 11 - cxx: g++-5 - bt: Release - bitlinks: shared64 static32 - img: '18.04' - - std: 11 - cxx: g++-4.8 - bt: Debug - bitlinks: shared64 static32 - img: '18.04' - - std: 11 - cxx: g++-4.8 - bt: Release - bitlinks: shared64 static32 - img: '18.04' + cxx: 14 + bits: 32 + vg: 'ON' + img: 22.04 env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -222,7 +285,6 @@ jobs: SAN: ${{matrix.san}} LINT: ${{matrix.lint}} OS: ${{matrix.os}} - CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON steps: - name: checkout (manually) run: | @@ -238,23 +300,35 @@ jobs: # https://stackoverflow.com/questions/58033366 branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + localbranch=$branch + rembranch=$branch # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" # refs/pull/485/merge -> pull/485/head branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch echo "... falling back to $branch" # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" exit 1 else echo "branch $branch exists on $repo" localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch branch=$branch:$localbranch - echo "naming locally as $branch" fi fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + # finally, create the local repo git init -q . # needed for running in the docker image. @@ -272,45 +346,68 @@ 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 - noexceptions: + - name: install + run: c4core-install g++-${{matrix.cxx}} + - name: '---------------------------------------------------------' + run: | + echo "Release ::: -O3 -DNDEBUG -m${{matrix.bits}}" + - name: 'configure Release ::: -O3 -DNDEBUG -m${{matrix.bits}}' + run: | + rm -rf build/Release + export C4_EXTERN_DIR=`pwd`/build/extern + 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 -m${{matrix.bits}}" \ + -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -m${{matrix.bits}}" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DEV=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_DBG=OFF + - name: 'build Release ::: -O3 -DNDEBUG -m${{matrix.bits}}' + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: 'run Release ::: -O3 -DNDEBUG -m${{matrix.bits}}' + run: | + source .github/setenv.sh + export CTEST_PARALLEL_LEVEL=`_c4getnumcores` + cmake --build build/Release --target ryml-test-run + - name: '---------------------------------------------------------' + run: | + echo "Release ::: -Os -DNDEBUG -m${{matrix.bits}}" + - name: 'configure Release ::: -Os -DNDEBUG -m${{matrix.bits}}' + run: | + rm -rf build/Release + export C4_EXTERN_DIR=`pwd`/build/extern + 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 -m${{matrix.bits}}" \ + -DCMAKE_C_FLAGS_RELEASE="-Os -DNDEBUG -m${{matrix.bits}}" \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DRYML_CXX_STANDARD=${{matrix.std}} \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=${{matrix.vg}} \ + -DRYML_DEV=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_DBG=OFF + - name: 'build Release ::: -Os -DNDEBUG -m${{matrix.bits}}' + run: | + cmake --build build/Release --target ryml-test-build --parallel --verbose + - name: 'run Release ::: -Os -DNDEBUG -m${{matrix.bits}}' + run: | + source .github/setenv.sh + export CTEST_PARALLEL_LEVEL=`_c4getnumcores` + cmake --build build/Release --target ryml-test-run + name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg/O3_Os + extended: if: always() continue-on-error: false - name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-24.04 container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest needs: canary @@ -319,45 +416,115 @@ jobs: matrix: include: - std: 11 - cxx: g++-13 - bt: Debug - bitlinks: shared64 static32 - img: '22.04' + cxx: 13 + bits: 64 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-13 - bt: Release - bitlinks: shared64 static32 - img: '22.04' - - std: 20 - cxx: g++-13 - bt: Debug - bitlinks: shared64 static32 - img: '22.04' - - std: 20 - cxx: g++-13 - bt: Release - bitlinks: shared64 static32 - img: '22.04' + cxx: 13 + bits: 32 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-5 - bt: Debug - bitlinks: shared64 static32 - img: '18.04' + cxx: 12 + bits: 64 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-5 - bt: Release - bitlinks: shared64 static32 - img: '18.04' + cxx: 12 + bits: 32 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-4.8 - bt: Debug - bitlinks: shared64 static32 - img: '18.04' + cxx: 11 + bits: 64 + vg: 'OFF' + img: 22.04 - std: 11 - cxx: g++-4.8 - bt: Release - bitlinks: shared64 static32 - img: '18.04' + cxx: 11 + bits: 32 + vg: 'OFF' + img: 22.04 + - std: 11 + cxx: 10 + bits: 64 + vg: 'OFF' + img: 22.04 + - std: 11 + cxx: 10 + bits: 32 + vg: 'OFF' + img: 22.04 + - std: 11 + cxx: 9 + bits: 64 + vg: 'OFF' + img: 22.04 + - std: 11 + cxx: 9 + bits: 32 + vg: 'OFF' + img: 22.04 + - std: 11 + cxx: 8 + bits: 64 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 8 + bits: 32 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 7 + bits: 64 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 7 + bits: 32 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 6 + bits: 64 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 6 + bits: 32 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 5 + bits: 64 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 5 + bits: 32 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 4.9 + bits: 64 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 4.9 + bits: 32 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 4.8 + bits: 64 + vg: 'OFF' + img: 18.04 + - std: 11 + cxx: 4.8 + bits: 32 + vg: 'OFF' + img: 18.04 env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -367,7 +534,6 @@ jobs: SAN: ${{matrix.san}} LINT: ${{matrix.lint}} OS: ${{matrix.os}} - CXXFLAGS: -fno-exceptions -fno-rtti steps: - name: checkout (manually) run: | @@ -383,225 +549,35 @@ jobs: # https://stackoverflow.com/questions/58033366 branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + localbranch=$branch + rembranch=$branch # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" # refs/pull/485/merge -> pull/485/head branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch echo "... falling back to $branch" # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" exit 1 else echo "branch $branch exists on $repo" localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch branch=$branch:$localbranch - echo "naming locally as $branch" - fi - fi - # finally, create the local repo - git init -q . - # needed for running in the docker image. - # see https://github.com/actions/checkout/issues/1169 - git config --system --add safe.directory '*' - # finally, do it! - git remote add origin $repo - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - # show the log - git log --graph --date=relative --date-order --color=always \ - --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ - | head -30 \ - || 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 - misbuild: - if: always() - continue-on-error: false - name: misbuild#${{matrix.issue}}/gcc${{matrix.gcc}}/c++${{matrix.std}} - runs-on: ubuntu-24.04 - container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest - needs: canary - 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: | - source .github/setenv.sh - export CTEST_PARALLEL_LEVEL=`_c4getnumcores` - cmake --build build --target ryml-test-run - vg1: - if: always() - continue-on-error: false - name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg/D_O1_O2 - runs-on: ubuntu-24.04 - container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest - needs: canary - strategy: - fail-fast: false - matrix: - include: - - std: 20 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 20 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - - std: 17 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 17 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - - std: 14 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 14 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - - std: 11 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 11 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - env: - STD: ${{matrix.std}} - CXX_: ${{matrix.cxx}} - BT: ${{matrix.bt}} - BITLINKS: ${{matrix.bitlinks}} - VG: ${{matrix.vg}} - SAN: ${{matrix.san}} - LINT: ${{matrix.lint}} - OS: ${{matrix.os}} - steps: - - name: checkout (manually) - run: | - set -xeo pipefail - env | sort - echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL - echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_REF_NAME=$GITHUB_REF_NAME - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY - # check the branch - # https://stackoverflow.com/questions/58033366 - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} - echo branch=$branch - # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - # refs/pull/485/merge -> pull/485/head - branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` - echo "... falling back to $branch" - # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - exit 1 - else - echo "branch $branch exists on $repo" - localbranch=$(echo $branch | sed -e 's@[/:]@_@g') - branch=$branch:$localbranch - echo "naming locally as $branch" fi fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + # finally, create the local repo git init -q . # needed for running in the docker image. @@ -705,117 +681,6 @@ jobs: source .github/setenv.sh export CTEST_PARALLEL_LEVEL=`_c4getnumcores` cmake --build build/Release --target ryml-test-run - vg2: - if: always() - continue-on-error: false - name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg/O3_Os - runs-on: ubuntu-24.04 - container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest - needs: canary - strategy: - fail-fast: false - matrix: - include: - - std: 20 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 20 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - - std: 17 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 17 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - - std: 14 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 14 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - - std: 11 - cxx: 14 - bits: 64 - vg: 'ON' - img: 22.04 - - std: 11 - cxx: 14 - bits: 32 - vg: 'ON' - img: 22.04 - env: - STD: ${{matrix.std}} - CXX_: ${{matrix.cxx}} - BT: ${{matrix.bt}} - BITLINKS: ${{matrix.bitlinks}} - VG: ${{matrix.vg}} - SAN: ${{matrix.san}} - LINT: ${{matrix.lint}} - OS: ${{matrix.os}} - steps: - - name: checkout (manually) - run: | - set -xeo pipefail - env | sort - echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL - echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_REF_NAME=$GITHUB_REF_NAME - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY - # check the branch - # https://stackoverflow.com/questions/58033366 - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} - echo branch=$branch - # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - # refs/pull/485/merge -> pull/485/head - branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` - echo "... falling back to $branch" - # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - exit 1 - else - echo "branch $branch exists on $repo" - localbranch=$(echo $branch | sed -e 's@[/:]@_@g') - branch=$branch:$localbranch - echo "naming locally as $branch" - fi - fi - # finally, create the local repo - git init -q . - # needed for running in the docker image. - # see https://github.com/actions/checkout/issues/1169 - git config --system --add safe.directory '*' - # finally, do it! - git remote add origin $repo - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - # show the log - git log --graph --date=relative --date-order --color=always \ - --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ - | head -30 \ - || echo -n - # show the last commit - git log --name-status HEAD^..HEAD - - name: install - run: c4core-install g++-${{matrix.cxx}} - name: '---------------------------------------------------------' run: | echo "Release ::: -O3 -DNDEBUG -m${{matrix.bits}}" @@ -872,127 +737,81 @@ jobs: source .github/setenv.sh export CTEST_PARALLEL_LEVEL=`_c4getnumcores` cmake --build build/Release --target ryml-test-run - extended: + name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}} + gccsan: if: always() continue-on-error: false - name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}} runs-on: ubuntu-24.04 - container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest needs: canary strategy: fail-fast: false matrix: include: - std: 11 - cxx: 13 - bits: 64 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 13 - bits: 32 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 12 - bits: 64 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 12 - bits: 32 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 11 - bits: 64 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 11 - bits: 32 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 10 - bits: 64 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 10 - bits: 32 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 9 - bits: 64 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 9 - bits: 32 - vg: 'OFF' - img: 22.04 - - std: 11 - cxx: 8 - bits: 64 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 8 - bits: 32 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 7 - bits: 64 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 7 - bits: 32 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 6 - bits: 64 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 6 - bits: 32 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 5 - bits: 64 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 5 - bits: 32 - vg: 'OFF' - img: 18.04 - - std: 11 - cxx: 4.9 - bits: 64 - vg: 'OFF' - img: 18.04 + cxx: g++-14 + bt: asan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: asan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: asan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: asan + bitlinks: static64 - std: 11 - cxx: 4.9 - bits: 32 - vg: 'OFF' - img: 18.04 + cxx: g++-14 + bt: lsan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: lsan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: lsan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: lsan + bitlinks: static64 - std: 11 - cxx: 4.8 - bits: 64 - vg: 'OFF' - img: 18.04 + cxx: g++-14 + bt: tsan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: tsan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: tsan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: tsan + bitlinks: static64 - std: 11 - cxx: 4.8 - bits: 32 - vg: 'OFF' - img: 18.04 + cxx: g++-14 + bt: ubsan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: ubsan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: ubsan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: ubsan + bitlinks: static64 env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -1003,41 +822,141 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout (manually) - run: | - set -xeo pipefail - env | sort - echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL - echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_REF_NAME=$GITHUB_REF_NAME - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY - # check the branch - # https://stackoverflow.com/questions/58033366 - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} - echo branch=$branch - # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - # refs/pull/485/merge -> pull/485/head - branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` - echo "... falling back to $branch" - # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then - echo "branch $branch does not exist on $repo" - exit 1 - else - echo "branch $branch exists on $repo" - localbranch=$(echo $branch | sed -e 's@[/:]@_@g') - branch=$branch:$localbranch - echo "naming locally as $branch" - fi - fi - # finally, create the local repo - git init -q . - # needed for running in the docker image. - # see https://github.com/actions/checkout/issues/1169 + - name: checkout (action + docker) + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - run: git config --system --add safe.directory '*' + - 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: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}} + arm: + if: always() + continue-on-error: false + runs-on: ubuntu-24.04 + container: ghcr.io/biojppm/c4core/ubuntu18.04:latest + name: arm/c++${{matrix.std}}/${{matrix.bt}} + needs: canary + strategy: + fail-fast: false + matrix: + include: + - std: 11 + bt: Debug + cxx: arm-linux-gnueabihf-gcc + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + - std: 11 + bt: Release + cxx: arm-linux-gnueabihf-gcc + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + - std: 14 + bt: Debug + cxx: arm-linux-gnueabihf-gcc + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + - std: 14 + bt: Release + cxx: arm-linux-gnueabihf-gcc + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + - std: 17 + bt: Debug + cxx: arm-linux-gnueabihf-gcc + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + - std: 17 + bt: Release + cxx: arm-linux-gnueabihf-gcc + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + env: + TOOLCHAIN: ${{matrix.toolchain}} + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} + steps: + - name: checkout (manually) + run: | + set -xeo pipefail + env | sort + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + echo branch=$branch + localbranch=$branch + rembranch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch + branch=$branch:$localbranch + fi + fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + + # finally, create the local repo + git init -q . + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 git config --system --add safe.directory '*' # finally, do it! git remote add origin $repo @@ -1051,223 +970,223 @@ jobs: || echo -n # show the last commit git log --name-status HEAD^..HEAD - - name: install - run: c4core-install g++-${{matrix.cxx}} - - name: '---------------------------------------------------------' - run: | - echo "Debug ::: -m${{matrix.bits}}" - - name: 'configure Debug ::: -m${{matrix.bits}}' - run: | - rm -rf build/Debug - export C4_EXTERN_DIR=`pwd`/build/extern - 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="-m${{matrix.bits}}" \ - -DCMAKE_C_FLAGS_DEBUG="-m${{matrix.bits}}" \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DRYML_CXX_STANDARD=${{matrix.std}} \ - -DRYML_BUILD_TESTS=ON \ - -DRYML_VALGRIND=${{matrix.vg}} \ - -DRYML_DEV=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_DBG=OFF - - name: 'build Debug ::: -m${{matrix.bits}}' - run: | - cmake --build build/Debug --target ryml-test-build --parallel --verbose - - name: 'run Debug ::: -m${{matrix.bits}}' - run: | - source .github/setenv.sh - export CTEST_PARALLEL_LEVEL=`_c4getnumcores` - cmake --build build/Debug --target ryml-test-run - - name: '---------------------------------------------------------' - run: | - echo "Release ::: -O1 -DNDEBUG -m${{matrix.bits}}" - - name: 'configure Release ::: -O1 -DNDEBUG -m${{matrix.bits}}' - run: | - rm -rf build/Release - export C4_EXTERN_DIR=`pwd`/build/extern - 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 -m${{matrix.bits}}" \ - -DCMAKE_C_FLAGS_RELEASE="-O1 -DNDEBUG -m${{matrix.bits}}" \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DRYML_CXX_STANDARD=${{matrix.std}} \ - -DRYML_BUILD_TESTS=ON \ - -DRYML_VALGRIND=${{matrix.vg}} \ - -DRYML_DEV=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_DBG=OFF - - name: 'build Release ::: -O1 -DNDEBUG -m${{matrix.bits}}' - run: | - cmake --build build/Release --target ryml-test-build --parallel --verbose - - name: 'run Release ::: -O1 -DNDEBUG -m${{matrix.bits}}' - run: | - source .github/setenv.sh - export CTEST_PARALLEL_LEVEL=`_c4getnumcores` - cmake --build build/Release --target ryml-test-run - - name: '---------------------------------------------------------' - run: | - echo "Release ::: -O2 -DNDEBUG -m${{matrix.bits}}" - - name: 'configure Release ::: -O2 -DNDEBUG -m${{matrix.bits}}' - run: | - rm -rf build/Release - export C4_EXTERN_DIR=`pwd`/build/extern - 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 -m${{matrix.bits}}" \ - -DCMAKE_C_FLAGS_RELEASE="-O2 -DNDEBUG -m${{matrix.bits}}" \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DRYML_CXX_STANDARD=${{matrix.std}} \ - -DRYML_BUILD_TESTS=ON \ - -DRYML_VALGRIND=${{matrix.vg}} \ - -DRYML_DEV=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_DBG=OFF - - name: 'build Release ::: -O2 -DNDEBUG -m${{matrix.bits}}' - run: | - cmake --build build/Release --target ryml-test-build --parallel --verbose - - name: 'run Release ::: -O2 -DNDEBUG -m${{matrix.bits}}' - run: | - source .github/setenv.sh - export CTEST_PARALLEL_LEVEL=`_c4getnumcores` - cmake --build build/Release --target ryml-test-run - - name: '---------------------------------------------------------' - run: | - echo "Release ::: -O3 -DNDEBUG -m${{matrix.bits}}" - - name: 'configure Release ::: -O3 -DNDEBUG -m${{matrix.bits}}' - run: | - rm -rf build/Release - export C4_EXTERN_DIR=`pwd`/build/extern - 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 -m${{matrix.bits}}" \ - -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -m${{matrix.bits}}" \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DRYML_CXX_STANDARD=${{matrix.std}} \ - -DRYML_BUILD_TESTS=ON \ - -DRYML_VALGRIND=${{matrix.vg}} \ - -DRYML_DEV=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_DBG=OFF - - name: 'build Release ::: -O3 -DNDEBUG -m${{matrix.bits}}' - run: | - cmake --build build/Release --target ryml-test-build --parallel --verbose - - name: 'run Release ::: -O3 -DNDEBUG -m${{matrix.bits}}' - run: | - source .github/setenv.sh - export CTEST_PARALLEL_LEVEL=`_c4getnumcores` - cmake --build build/Release --target ryml-test-run - - name: '---------------------------------------------------------' - run: | - echo "Release ::: -Os -DNDEBUG -m${{matrix.bits}}" - - name: 'configure Release ::: -Os -DNDEBUG -m${{matrix.bits}}' - run: | - rm -rf build/Release - export C4_EXTERN_DIR=`pwd`/build/extern - 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 -m${{matrix.bits}}" \ - -DCMAKE_C_FLAGS_RELEASE="-Os -DNDEBUG -m${{matrix.bits}}" \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DRYML_CXX_STANDARD=${{matrix.std}} \ - -DRYML_BUILD_TESTS=ON \ - -DRYML_VALGRIND=${{matrix.vg}} \ - -DRYML_DEV=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_DBG=OFF - - name: 'build Release ::: -Os -DNDEBUG -m${{matrix.bits}}' - run: | - cmake --build build/Release --target ryml-test-build --parallel --verbose - - name: 'run Release ::: -Os -DNDEBUG -m${{matrix.bits}}' + - name: install gcc-arm-linux-gnueabihf + run: c4core-install arm-linux-gnueabihf; c4core-install qemu + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test arm + - name: build + run: source .github/setenv.sh && c4_build_test arm + - name: run + run: source .github/setenv.sh && c4_run_test arm + - name: pack + run: source .github/setenv.sh && c4_package arm + canary: + if: always() + continue-on-error: false + runs-on: ubuntu-24.04 + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest + strategy: + fail-fast: false + matrix: + include: + - std: 11 + cxx: g++-13 + bt: Debug + bitlinks: shared64 static32 + img: '22.04' + - std: 11 + cxx: g++-13 + bt: Release + bitlinks: shared64 static32 + img: '22.04' + - std: 20 + cxx: g++-13 + bt: Debug + bitlinks: shared64 static32 + img: '22.04' + - std: 20 + cxx: g++-13 + bt: Release + bitlinks: shared64 static32 + img: '22.04' + - std: 11 + cxx: g++-5 + bt: Debug + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-5 + bt: Release + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-4.8 + bt: Debug + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-4.8 + bt: Release + bitlinks: shared64 static32 + img: '18.04' + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} + steps: + - name: checkout (manually) run: | - source .github/setenv.sh - export CTEST_PARALLEL_LEVEL=`_c4getnumcores` - cmake --build build/Release --target ryml-test-run - gccsan: + set -xeo pipefail + env | sort + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + echo branch=$branch + localbranch=$branch + rembranch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch + branch=$branch:$localbranch + fi + fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + + # finally, create the local repo + git init -q . + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || 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: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + tabtokens: if: always() continue-on-error: false - name: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}} runs-on: ubuntu-24.04 - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest needs: canary strategy: fail-fast: false matrix: include: - std: 11 - cxx: g++-14 - bt: asan - bitlinks: static64 - - std: 14 - cxx: g++-14 - bt: asan - bitlinks: static64 - - std: 17 - cxx: g++-14 - bt: asan - bitlinks: static64 - - std: 20 - cxx: g++-14 - bt: asan - bitlinks: static64 + cxx: g++-13 + bt: Debug + bitlinks: shared64 static32 + img: '22.04' - std: 11 - cxx: g++-14 - bt: lsan - bitlinks: static64 - - std: 14 - cxx: g++-14 - bt: lsan - bitlinks: static64 - - std: 17 - cxx: g++-14 - bt: lsan - bitlinks: static64 + cxx: g++-13 + bt: Release + bitlinks: shared64 static32 + img: '22.04' - std: 20 - cxx: g++-14 - bt: lsan - bitlinks: static64 - - std: 11 - cxx: g++-14 - bt: tsan - bitlinks: static64 - - std: 14 - cxx: g++-14 - bt: tsan - bitlinks: static64 - - std: 17 - cxx: g++-14 - bt: tsan - bitlinks: static64 + cxx: g++-13 + bt: Debug + bitlinks: shared64 static32 + img: '22.04' - std: 20 - cxx: g++-14 - bt: tsan - bitlinks: static64 + cxx: g++-13 + bt: Release + bitlinks: shared64 static32 + img: '22.04' - std: 11 - cxx: g++-14 - bt: ubsan - bitlinks: static64 - - std: 14 - cxx: g++-14 - bt: ubsan - bitlinks: static64 - - std: 17 - cxx: g++-14 - bt: ubsan - bitlinks: static64 - - std: 20 - cxx: g++-14 - bt: ubsan - bitlinks: static64 + cxx: g++-5 + bt: Debug + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-5 + bt: Release + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-4.8 + bt: Debug + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-4.8 + bt: Release + bitlinks: shared64 static32 + img: '18.04' env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -1277,13 +1196,68 @@ jobs: SAN: ${{matrix.san}} LINT: ${{matrix.lint}} OS: ${{matrix.os}} + CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON steps: - - name: checkout (action + docker) - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - run: git config --system --add safe.directory '*' + - name: checkout (manually) + run: | + set -xeo pipefail + env | sort + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + echo branch=$branch + localbranch=$branch + rembranch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch + branch=$branch:$localbranch + fi + fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + + # finally, create the local repo + git init -q . + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || 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 @@ -1319,43 +1293,58 @@ jobs: run: source .github/setenv.sh && c4_run_test shared32 - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 - arm: + name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + noexceptions: if: always() continue-on-error: false runs-on: ubuntu-24.04 - container: ghcr.io/biojppm/c4core/ubuntu18.04:latest - name: arm/c++${{matrix.std}}/${{matrix.bt}} + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest needs: canary strategy: fail-fast: false matrix: include: - std: 11 + cxx: g++-13 bt: Debug - cxx: arm-linux-gnueabihf-gcc - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + bitlinks: shared64 static32 + img: '22.04' - std: 11 + cxx: g++-13 bt: Release - cxx: arm-linux-gnueabihf-gcc - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - - std: 14 + bitlinks: shared64 static32 + img: '22.04' + - std: 20 + cxx: g++-13 bt: Debug - cxx: arm-linux-gnueabihf-gcc - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - - std: 14 + bitlinks: shared64 static32 + img: '22.04' + - std: 20 + cxx: g++-13 bt: Release - cxx: arm-linux-gnueabihf-gcc - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - - std: 17 + bitlinks: shared64 static32 + img: '22.04' + - std: 11 + cxx: g++-5 bt: Debug - cxx: arm-linux-gnueabihf-gcc - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - - std: 17 + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-5 bt: Release - cxx: arm-linux-gnueabihf-gcc - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-4.8 + bt: Debug + bitlinks: shared64 static32 + img: '18.04' + - std: 11 + cxx: g++-4.8 + bt: Release + bitlinks: shared64 static32 + img: '18.04' env: - TOOLCHAIN: ${{matrix.toolchain}} STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} BT: ${{matrix.bt}} @@ -1364,6 +1353,7 @@ jobs: SAN: ${{matrix.san}} LINT: ${{matrix.lint}} OS: ${{matrix.os}} + CXXFLAGS: -fno-exceptions -fno-rtti steps: - name: checkout (manually) run: | @@ -1379,23 +1369,35 @@ jobs: # https://stackoverflow.com/questions/58033366 branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + localbranch=$branch + rembranch=$branch # does the branch exist in the repo? - if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" # refs/pull/485/merge -> pull/485/head branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch echo "... falling back to $branch" # does the fallback exist? - if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then echo "branch $branch does not exist on $repo" exit 1 else echo "branch $branch exists on $repo" localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch branch=$branch:$localbranch - echo "naming locally as $branch" fi fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + # finally, create the local repo git init -q . # needed for running in the docker image. @@ -1413,15 +1415,97 @@ jobs: || echo -n # show the last commit git log --name-status HEAD^..HEAD - - name: install gcc-arm-linux-gnueabihf - run: c4core-install arm-linux-gnueabihf; c4core-install qemu + - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test arm - - name: build - run: source .github/setenv.sh && c4_build_test arm - - name: run - run: source .github/setenv.sh && c4_run_test arm - - name: pack - run: source .github/setenv.sh && c4_package arm + - 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: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + misbuild: + if: always() + continue-on-error: false + runs-on: ubuntu-24.04 + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest + needs: canary + 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: | + source .github/setenv.sh + export CTEST_PARALLEL_LEVEL=`_c4getnumcores` + cmake --build build --target ryml-test-run + name: misbuild#${{matrix.issue}}/gcc${{matrix.gcc}}/c++${{matrix.std}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2462b46f8..08cafa945 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -239,7 +239,7 @@ jobs: mkdir -p assets asset_src=`ls -1 ./build/shared64/*-${{matrix.config.sfxg}}` asset_dst=./assets/${PROJ_PKG_NAME}${SRC_VERSION}-${{matrix.config.sfxp}} - [ ! -f $asset_src ] && exit 1 + [ -f $asset_src ] || exit cp -fav $asset_src $asset_dst - name: Save artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 33123d3fa..60f740de0 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -83,13 +83,47 @@ jobs: run: cd samples/custom_c4core && ./run.sh $BT - name: fetch_content run: | - # run this sample only if the branch exists on the repo - set -xe + set -xeo pipefail cd samples/fetch_content + env | sort + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch # https://stackoverflow.com/questions/58033366 branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch - if [ ! -z "$(git ls-remote $repo | grep $branch)" ] ; then - ./run.sh $BT $branch "$repo" + localbranch=$branch + rembranch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + localbranch=$branch + rembranch=$branch + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "$(git ls-remote $repo | grep -F $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + echo "naming locally as $localbranch" + rembranch=$branch + branch=$branch:$localbranch + fi fi + hash=$(git ls-remote $repo | grep -F $rembranch | awk '{print $1}') + echo "final repo=$repo" + echo "final branch=$branch" + echo "final rembranch=$rembranch" + echo "final localbranch=$localbranch" + echo "final hash=$hash" + + # run this sample only if the branch exists on the repo + ./run.sh $BT $hash "$repo" || echo 'maybe some other time' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3b0fe938d..82f04e924 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,7 +22,6 @@ jobs: vsdebug: if: always() continue-on-error: false - name: ${{matrix.name}}bit/c++${{matrix.std}}/debug runs-on: windows-${{matrix.os}} strategy: fail-fast: false @@ -145,10 +144,10 @@ jobs: source .github/setenv.sh export CTEST_PARALLEL_LEVEL=`_c4getnumcores` cmake --build build/Release --target ryml-test-run + name: ${{matrix.name}}bit/c++${{matrix.std}}/debug vsrelease: if: always() continue-on-error: false - name: ${{matrix.name}}bit/c++${{matrix.std}}/release runs-on: windows-${{matrix.os}} strategy: fail-fast: false @@ -271,3 +270,4 @@ jobs: source .github/setenv.sh export CTEST_PARALLEL_LEVEL=`_c4getnumcores` cmake --build build/Release --target ryml-test-run + name: ${{matrix.name}}bit/c++${{matrix.std}}/release diff --git a/samples/fetch_content/CMakeLists.txt b/samples/fetch_content/CMakeLists.txt index 8f3499606..d24f6c8b9 100644 --- a/samples/fetch_content/CMakeLists.txt +++ b/samples/fetch_content/CMakeLists.txt @@ -2,14 +2,17 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) project(ryml-quickstart LANGUAGES CXX) set(RYML_REPO_URL https://github.com/biojppm/rapidyaml CACHE STRING "") -set(RYML_BRANCH_NAME master CACHE STRING "") +set(RYML_TAG_NAME master CACHE STRING "") message(STATUS "FetchContent from repo: ${RYML_REPO_URL}") -message(STATUS "FetchContent from branch: ${RYML_BRANCH_NAME}") +message(STATUS "FetchContent from tag: ${RYML_TAG_NAME}") + include(FetchContent) FetchContent_Declare(ryml GIT_REPOSITORY ${RYML_REPO_URL} - GIT_TAG ${RYML_BRANCH_NAME} - GIT_SHALLOW FALSE # ensure submodules are checked out + GIT_TAG ${RYML_TAG_NAME} + # Do not set GIT_SHALLOW: if enabled then GIT_TAG works only with + # branch names and tags, and a commit hash is not allowed. + GIT_SHALLOW FALSE ) FetchContent_MakeAvailable(ryml) diff --git a/samples/fetch_content/run.sh b/samples/fetch_content/run.sh index 306471453..7933e0ae0 100755 --- a/samples/fetch_content/run.sh +++ b/samples/fetch_content/run.sh @@ -12,7 +12,7 @@ cd $(dirname $0) # configure the sample cmake -S . -B ./build/$cfg \ -DCMAKE_BUILD_TYPE=$cfg \ - -DRYML_BRANCH_NAME=$branch \ + -DRYML_TAG_NAME=$branch \ -DRYML_REPO_URL=$repo # build and run the sample cmake --build ./build/$cfg --config $cfg --target run