ci improvements:

- ensure gcc and clang are tested with several optimization
  levels (-O3,-O2,-O1,-Os). This reveals a number of problems in
  gcc11,12,13 (but not 14), which should be addressed next.
- use continue-on-error: false to ensure the final workflow result is
  red when any of its jobs fails
This commit is contained in:
Joao Paulo Magalhaes
2025-01-10 19:21:26 +00:00
parent 94a2681013
commit 6fbd63a856
34 changed files with 1554 additions and 1136 deletions

3
.github/cancel_workflows.sh vendored Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash -x
gh run list --json databaseId -q '.[].databaseId' | xargs -d '\n' -n1 gh run cancel

View File

@@ -19,6 +19,7 @@ test: force build
@git diff --exit-code $(TARGET_FILES) && \
echo -e '\nPASS - No normative changes to .github/workflows/*.yml'
DIFF_ORIG_COMMIT ?= HEAD
diff:
@for s in $(SOURCE_FILES); do \
@@ -37,9 +38,11 @@ diff:
); \
done
force:
touch *.ys
%.yml: %.ys $(YS) $(INPUT_FILES)
@if [ -f "$@" ] ; then chmod a+w $@ ; fi
@echo "# DO NOT EDIT - GENERATED FROM .github/workflows/$<" > $@
@@ -55,6 +58,7 @@ $(YS):
curl -s https://yamlscript.org/install | \
BIN=1 VERSION=$(YS_VERSION) PREFIX=$(YS_PREFIX) bash
stats:
@echo "ys : $$(wc -l *.ys)"
@echo "yml: $$(wc -l *.yml)"
@echo "ys : $$(wc -lm *.ys)"
@echo "yml: $$(wc -lm *.yml)"

View File

@@ -1,7 +0,0 @@
which python
which pip
python --version
pip --version
pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt
python -c 'import munch ; print("ok!") ; exit(0)'
echo $?

View File

@@ -1,11 +0,0 @@
set -x
source vars.sh
echo SRC_TAG=$SRC_TAG
echo SRC_VERSION=$SRC_VERSION
desc=$SRC_TAG
for bl in ${{matrix.bitlinks}} ; do
dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g')
mkdir -p $dst
find build -name bm-results
mv -vf build/$bl/bm/bm-results/* $dst/.
done

View File

@@ -1,20 +0,0 @@
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 ; print("python:", sys.version, struct.calcsize("P") * 8, "bits")'
pip --version
pip install -v -r requirements.txt
pip install -v -r api/python/requirements.txt
for whl in dist/* ; do
pip install -v $whl
pip show -f rapidyaml
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"))'
python -m pytest -vvv api/python/tests
pip uninstall -y -v rapidyaml
done

View File

@@ -60,7 +60,7 @@ jobs:
export SRC_VERSION=$SRC_VERSION
EOF
- name: Save vars.sh
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: vars.sh
path: ./vars.sh
@@ -83,49 +83,36 @@ jobs:
- name: Verify vars.sh
run: env | grep SRC
benchmarks:
name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}}
name: bm/c++${{matrix.std}}/${{matrix.comp}}/${{matrix.bt}}
needs: gettag
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip benchmarks')) ||
contains(github.event.head_commit.message, 'only benchmarks')
continue-on-error: true
if: always()
continue-on-error: false
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- std: 11
cxx: g++-10
bt: Release
os: ubuntu-20.04
bitlinks: static64 static32
- std: 17
cxx: g++-10
bt: Release
os: ubuntu-20.04
bitlinks: static64 static32
- std: 20
cxx: g++-10
bt: Release
os: ubuntu-20.04
bitlinks: static64 static32
comp: gcc14
os: ubuntu-24.04
cmkflags: -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_C_COMPILER=gcc-14
- std: 17
cxx: vs2019
bt: Release
comp: clang18
os: ubuntu-24.04
cmkflags: -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18
- std: 17
comp: vs2019
os: windows-2019
bitlinks: static64 static32
- std: 20
cxx: vs2019
bt: Release
os: windows-2019
bitlinks: static64 static32
cmkflags: -G 'Visual Studio 16 2019' -A x64
- std: 17
cxx: xcode
xcver: 15
bt: Release
comp: vs2022
os: windows-2022
cmkflags: -G 'Visual Studio 17 2022' -A x64
- std: 17
comp: xcode15
os: macos-13
bitlinks: static64
xcver: 15
cmkflags: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64
env:
BM: 'ON'
STD: ${{matrix.std}}
@@ -143,7 +130,7 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Download vars.sh
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: vars.sh
path: ./
@@ -182,47 +169,21 @@ jobs:
pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt
python -c 'import munch ; print("ok!") ; exit(0)'
echo $?
- name: set build env vars
- name: configure-------------------------------------------------
run: |
echo "NUM_JOBS_BUILD=1" >> $GITHUB_ENV
echo "CMAKE_FLAGS=\"-DPython_EXECUTABLE=$(which python)\"" >> $GITHUB_ENV
- name: check build env vars
run: |
echo NUM_JOBS_BUILD=$NUM_JOBS_BUILD
echo "CMAKE_FLAGS=\"$CMAKE_FLAGS\""
- name: shared64-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared64
- name: shared64-build
run: source .github/setenv.sh && c4_build_target shared64 ryml-bm-build
- name: shared64-run
run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-run
- name: shared64-plot
run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot
- name: static64-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static64
- name: static64-build
run: source .github/setenv.sh && c4_build_target static64 ryml-bm-build
- name: static64-run
run: source .github/setenv.sh && c4_run_target static64 ryml-bm-run
- name: static64-plot
run: source .github/setenv.sh && c4_run_target static64 ryml-bm-plot
- name: static32-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static32
- name: static32-build
run: source .github/setenv.sh && c4_build_target static32 ryml-bm-build
- name: static32-run
run: source .github/setenv.sh && c4_run_target static32 ryml-bm-run
- name: static32-plot
run: source .github/setenv.sh && c4_run_target static32 ryml-bm-plot
- name: shared32-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared32
- name: shared32-build
run: source .github/setenv.sh && c4_build_target shared32 ryml-bm-build
- name: shared32-run
run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-run
- name: shared32-plot
run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot
- name: gather benchmark results
cmake -S . -B build \
${{matrix.cmkflags}} \
-DPython_EXECUTABLE="$(which python)" \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_BENCHMARKS=ON
- name: build
run: cmake --build build --config Release --parallel --verbose --target ryml-bm-build
- name: run
run: cmake --build build --config Release --verbose --target ryml-bm-run
- name: plot
run: cmake --build build --config Release --verbose --target ryml-bm-plot
- name: gather benchmark results-------------------------------------------
run: |
set -x
source vars.sh
@@ -236,7 +197,7 @@ jobs:
mv -vf build/$bl/bm/bm-results/* $dst/.
done
- name: upload benchmark result artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ryml-benchmark_results
name: ryml-benchmark_results-${{strategy.job-index}}
path: ryml-benchmark_results/

View File

@@ -11,23 +11,19 @@ jobs:
- :: version-discover
benchmarks:
name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}}
name: bm/c++${{matrix.std}}/${{matrix.comp}}/${{matrix.bt}}
needs: gettag
:: setup-job('benchmarks')
:: setup-job('benchmarks' 'benchmarks')
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
item =: \({:std %1, :cxx %2, :bt 'Release', :os %3, :bitlinks 'static64 static32'})
include:
- ! item(11 'g++-10' 'ubuntu-20.04')
- ! item(17 'g++-10' 'ubuntu-20.04')
- ! item(20 'g++-10' 'ubuntu-20.04')
- ! item(17 'vs2019' 'windows-2019')
- ! item(20 'vs2019' 'windows-2019')
#- ! item(17 'vs2019' 'windows-2022')
#- ! item(20 'vs2019' 'windows-2022')
- {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64}
- {std: 17, comp: gcc14 , os: ubuntu-24.04, cmkflags: -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_C_COMPILER=gcc-14}
- {std: 17, comp: clang18, os: ubuntu-24.04, cmkflags: -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18}
- {std: 17, comp: vs2019 , os: windows-2019, cmkflags: -G 'Visual Studio 16 2019' -A x64}
- {std: 17, comp: vs2022 , os: windows-2022, cmkflags: -G 'Visual Studio 17 2022' -A x64}
- {std: 17, comp: xcode15, os: macos-13, xcver: 15, cmkflags: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64}
env:: -{'BM' 'ON'} + load('share/env.yaml')
steps:
- :: checkout-action
@@ -40,51 +36,43 @@ jobs:
uses: actions/setup-python@v5
with: { python-version: '3.10' }
- name: install benchmark plotting dependencies
run:: bash('benchmarks-install')
- name: set build env vars
run: |
echo "NUM_JOBS_BUILD=1" >> $GITHUB_ENV
echo "CMAKE_FLAGS=\"-DPython_EXECUTABLE=$(which python)\"" >> $GITHUB_ENV
- name: check build env vars
which python
which pip
python --version
pip --version
pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt
python -c 'import munch ; print("ok!") ; exit(0)'
echo $?
- name: configure-------------------------------------------------
run: |
echo NUM_JOBS_BUILD=$NUM_JOBS_BUILD
echo "CMAKE_FLAGS=\"$CMAKE_FLAGS\""
- name: shared64-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared64
- name: shared64-build
run: source .github/setenv.sh && c4_build_target shared64 ryml-bm-build
- name: shared64-run
run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-run
- name: shared64-plot
run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot
- name: static64-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static64
- name: static64-build
run: source .github/setenv.sh && c4_build_target static64 ryml-bm-build
- name: static64-run
run: source .github/setenv.sh && c4_run_target static64 ryml-bm-run
- name: static64-plot
run: source .github/setenv.sh && c4_run_target static64 ryml-bm-plot
- name: static32-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static32
- name: static32-build
run: source .github/setenv.sh && c4_build_target static32 ryml-bm-build
- name: static32-run
run: source .github/setenv.sh && c4_run_target static32 ryml-bm-run
- name: static32-plot
run: source .github/setenv.sh && c4_run_target static32 ryml-bm-plot
- name: shared32-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared32
- name: shared32-build
run: source .github/setenv.sh && c4_build_target shared32 ryml-bm-build
- name: shared32-run
run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-run
- name: shared32-plot
run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot
- name: gather benchmark results
run:: bash('benchmarks-run')
cmake -S . -B build \
${{matrix.cmkflags}} \
-DPython_EXECUTABLE="$(which python)" \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_BENCHMARKS=ON
- name: build
run: cmake --build build --config Release --parallel --verbose --target ryml-bm-build
- name: run
run: cmake --build build --config Release --verbose --target ryml-bm-run
- name: plot
run: cmake --build build --config Release --verbose --target ryml-bm-plot
- name: gather benchmark results-------------------------------------------
run: |
set -x
source vars.sh
echo SRC_TAG=$SRC_TAG
echo SRC_VERSION=$SRC_VERSION
desc=$SRC_TAG
for bl in ${{matrix.bitlinks}} ; do
dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g')
mkdir -p $dst
find build -name bm-results
mv -vf build/$bl/bm/bm-results/* $dst/.
done
- name: upload benchmark result artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ryml-benchmark_results
name: ryml-benchmark_results-${{strategy.job-index}}
path: ryml-benchmark_results/

View File

@@ -18,33 +18,22 @@ env:
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: null
jobs:
clang_canary:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip clang')) ||
contains(github.event.head_commit.message, 'only clang')
continue-on-error: true
canary:
if: always()
continue-on-error: false
name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
strategy:
fail-fast: false
matrix:
include:
- std: 20
cxx: clang++-17
cxx: clang++-18
bt: Debug
bitlinks: shared64 static32
- std: 20
cxx: clang++-17
bt: Release
bitlinks: shared64 static32
- std: 11
cxx: clang++-9
bt: Debug
bitlinks: shared64 static32
- std: 11
cxx: clang++-9
cxx: clang++-18
bt: Release
bitlinks: shared64 static32
env:
@@ -98,33 +87,22 @@ jobs:
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
clang_tabtokens:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip clang')) ||
contains(github.event.head_commit.message, 'only clang')
continue-on-error: true
tabtokens:
if: always()
continue-on-error: false
name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
strategy:
fail-fast: false
matrix:
include:
- std: 20
cxx: clang++-17
cxx: clang++-18
bt: Debug
bitlinks: shared64 static32
- std: 20
cxx: clang++-17
bt: Release
bitlinks: shared64 static32
- std: 11
cxx: clang++-9
bt: Debug
bitlinks: shared64 static32
- std: 11
cxx: clang++-9
cxx: clang++-18
bt: Release
bitlinks: shared64 static32
env:
@@ -179,33 +157,22 @@ jobs:
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
clang_noexceptions:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip clang')) ||
contains(github.event.head_commit.message, 'only clang')
continue-on-error: true
noexceptions:
if: always()
continue-on-error: false
name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
strategy:
fail-fast: false
matrix:
include:
- std: 20
cxx: clang++-17
cxx: clang++-18
bt: Debug
bitlinks: shared64 static32
- std: 20
cxx: clang++-17
bt: Release
bitlinks: shared64 static32
- std: 11
cxx: clang++-9
bt: Debug
bitlinks: shared64 static32
- std: 11
cxx: clang++-9
cxx: clang++-18
bt: Release
bitlinks: shared64 static32
env:
@@ -260,169 +227,201 @@ jobs:
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
clang_extended:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip clang')) ||
contains(github.event.head_commit.message, 'only clang')
continue-on-error: true
name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}
runs-on: ubuntu-latest
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
strategy:
fail-fast: false
matrix:
include:
- std: 20
cxx: 18
bits: 64
vg: 'ON'
img: 22.04
- std: 20
cxx: 18
bits: 32
vg: 'ON'
img: 22.04
- std: 17
cxx: 18
bits: 64
vg: 'ON'
img: 22.04
- std: 17
cxx: 18
bits: 32
vg: 'ON'
img: 22.04
- std: 14
cxx: 18
bits: 64
vg: 'ON'
img: 22.04
- std: 14
cxx: 18
bits: 32
vg: 'ON'
img: 22.04
- std: 11
cxx: clang++-17
bt: Debug
vg: 'on'
img: '22.04'
cxx: 18
bits: 64
vg: 'ON'
img: 22.04
- std: 11
cxx: clang++-17
bt: Release
vg: 'on'
img: '22.04'
cxx: 18
bits: 32
vg: 'ON'
img: 22.04
- std: 11
cxx: clang++-16
bt: Debug
vg: 'on'
img: '22.04'
cxx: 17
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-16
bt: Release
vg: 'on'
img: '22.04'
cxx: 17
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-15
bt: Debug
vg: 'on'
img: '22.04'
cxx: 16
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-15
bt: Release
vg: 'on'
img: '22.04'
cxx: 16
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-14
bt: Debug
vg: 'on'
img: '22.04'
cxx: 15
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-14
bt: Release
vg: 'on'
img: '22.04'
cxx: 15
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-13
bt: Debug
vg: 'on'
img: '18.04'
cxx: 14
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-13
bt: Release
vg: 'on'
img: '18.04'
cxx: 14
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: clang++-12
bt: Debug
vg: 'on'
img: '18.04'
cxx: 13
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-12
bt: Release
vg: 'on'
img: '18.04'
cxx: 13
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-11
bt: Debug
vg: 'on'
img: '18.04'
cxx: 12
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-11
bt: Release
vg: 'on'
img: '18.04'
cxx: 12
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-10
bt: Debug
vg: 'on'
img: '18.04'
cxx: 11
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-10
bt: Release
vg: 'on'
img: '18.04'
cxx: 10
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-9
bt: Debug
vg: 'on'
img: '18.04'
cxx: 10
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-9
bt: Release
vg: 'on'
img: '18.04'
cxx: 9
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-8
bt: Debug
vg: 'on'
img: '18.04'
cxx: 9
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-8
bt: Release
vg: 'on'
img: '18.04'
cxx: 8
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-7
bt: Debug
vg: 'on'
img: '18.04'
cxx: 8
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-7
bt: Release
vg: 'on'
img: '18.04'
cxx: 7
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-6.0
bt: Debug
vg: 'on'
img: '18.04'
cxx: 7
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-6.0
bt: Release
vg: 'on'
img: '18.04'
cxx: '6.0'
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-5.0
bt: Debug
vg: 'on'
img: '18.04'
cxx: '6.0'
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-5.0
bt: Release
vg: 'on'
img: '18.04'
cxx: '5.0'
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-4.0
bt: Debug
vg: 'on'
img: '18.04'
cxx: '5.0'
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-4.0
bt: Release
vg: 'on'
img: '18.04'
cxx: '4.0'
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-3.9
bt: Debug
vg: 'on'
img: '18.04'
cxx: '4.0'
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: clang++-3.9
bt: Release
vg: 'on'
img: '18.04'
cxx: '3.9'
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: '3.9'
bits: 32
vg: 'OFF'
img: 18.04
env:
STD: ${{matrix.std}}
CXX_: ${{matrix.cxx}}
@@ -481,49 +480,138 @@ jobs:
|| echo -n
# show the last commit
git log --name-status HEAD^..HEAD
- run: c4core-install ${{matrix.cxx}}
- name: show info
run: source .github/setenv.sh && c4_show_info
- name: shared64-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared64
- name: shared64-build
run: source .github/setenv.sh && c4_build_test shared64
- name: shared64-run
run: source .github/setenv.sh && c4_run_test shared64
- name: shared64-pack
run: source .github/setenv.sh && c4_package shared64
- name: static64-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static64
- name: static64-build
run: source .github/setenv.sh && c4_build_test static64
- name: static64-run
run: source .github/setenv.sh && c4_run_test static64
- name: static64-pack
run: source .github/setenv.sh && c4_package static64
- name: static32-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static32
- name: static32-build
run: source .github/setenv.sh && c4_build_test static32
- name: static32-run
run: source .github/setenv.sh && c4_run_test static32
- name: static32-pack
run: source .github/setenv.sh && c4_package static32
- name: shared32-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared32
- name: shared32-build
run: source .github/setenv.sh && c4_build_test shared32
- name: shared32-run
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
- name: install
run: c4core-install clang++-${{matrix.cxx}}
- name: '---------------------------------------------------------'
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=clang++-${{matrix.cxx}} \
-DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_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: |
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=clang++-${{matrix.cxx}} \
-DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_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: |
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=clang++-${{matrix.cxx}} \
-DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_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: |
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=clang++-${{matrix.cxx}} \
-DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_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: |
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=clang++-${{matrix.cxx}} \
-DCMAKE_C_COMPILER=clang-${{matrix.cxx}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_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: |
cmake --build build/Release --target ryml-test-run
clangsan:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip clang')) ||
contains(github.event.head_commit.message, 'only clang')
continue-on-error: true
if: always()
continue-on-error: false
name: san/${{matrix.bt}}/c++${{matrix.std}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
strategy:
fail-fast: false

View File

@@ -5,8 +5,8 @@
jobs:
#----------------------------------------------------------------------------
clang_canary:
:: setup-job('clang')
canary:
:: setup-job('clang' 'canary')
name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('22.04')
strategy:
@@ -14,16 +14,14 @@ jobs:
matrix:
item =: \({:std %1, :cxx %2, :bt %3, :bitlinks 'shared64 static32'})
include:: &include1 -[
item(20 'clang++-17' 'Debug')
item(20 'clang++-17' 'Release')
item(11 'clang++-9' 'Debug')
item(11 'clang++-9' 'Release') ]
item(20 'clang++-18' 'Debug' )
item(20 'clang++-18' 'Release') ]
env:: load('share/env.yaml')
steps:: checkout-action-docker + install-cxx + run-steps
#----------------------------------------------------------------------------
clang_tabtokens:
:: setup-job('clang')
tabtokens:
:: setup-job('clang' 'tabtokens')
name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('22.04')
strategy:
@@ -35,8 +33,8 @@ jobs:
steps:: checkout-action-docker + install-cxx + run-steps
#----------------------------------------------------------------------------
clang_noexceptions:
:: setup-job('clang')
noexceptions:
:: setup-job('clang' 'noexceptions')
name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('22.04')
strategy:
@@ -48,53 +46,67 @@ jobs:
steps:: checkout-action-docker + install-cxx + run-steps
#----------------------------------------------------------------------------
clang_extended:
:: setup-job('clang')
name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}
extended:
:: setup-job('clang' 'extended')
name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg${{matrix.vg}}
:: runs-on-docker-c4core('${{matrix.img}}')
strategy:
fail-fast: false
matrix:
item =: \({:std 11, :cxx "clang++-$a(%1)", :bt %2, :vg 'on', :img "$a(%3)"})
include:
- ! item(17 'Debug' '22.04')
- ! item(17 'Release' '22.04')
- ! item(16 'Debug' '22.04')
- ! item(16 'Release' '22.04')
# install of clang15 fails on ubuntu18.04
- ! item(15 'Debug' '22.04')
- ! item(15 'Release' '22.04')
# install of clang14 fails on ubuntu18.04
- ! item(14 'Debug' '22.04')
- ! item(14 'Release' '22.04')
- ! item(13 'Debug' '18.04')
- ! item(13 'Release' '18.04')
- ! item(12 'Debug' '18.04')
- ! item(12 'Release' '18.04')
- ! item(11 'Debug' '18.04')
- ! item(11 'Release' '18.04')
- ! item(10 'Debug' '18.04')
- ! item(10 'Release' '18.04')
- ! item( 9 'Debug' '18.04')
- ! item( 9 'Release' '18.04')
- ! item( 8 'Debug' '18.04')
- ! item( 8 'Release' '18.04')
- ! item( 7 'Debug' '18.04')
- ! item( 7 'Release' '18.04')
- ! item(6.0 'Debug' '18.04')
- ! item(6.0 'Release' '18.04')
- ! item(5.0 'Debug' '18.04')
- ! item(5.0 'Release' '18.04')
- ! item(4.0 'Debug' '18.04')
- ! item(4.0 'Release' '18.04')
- ! item(3.9 'Debug' '18.04')
- ! item(3.9 'Release' '18.04')
# with valgrind: only latest clang
- {std: 20, cxx: 18 , bits: 64, vg: ON , img: 22.04}
- {std: 20, cxx: 18 , bits: 32, vg: ON , img: 22.04}
- {std: 17, cxx: 18 , bits: 64, vg: ON , img: 22.04}
- {std: 17, cxx: 18 , bits: 32, vg: ON , img: 22.04}
- {std: 14, cxx: 18 , bits: 64, vg: ON , img: 22.04}
- {std: 14, cxx: 18 , bits: 32, vg: ON , img: 22.04}
- {std: 11, cxx: 18 , bits: 64, vg: ON , img: 22.04}
- {std: 11, cxx: 18 , bits: 32, vg: ON , img: 22.04}
# without valgrind
- {std: 11, cxx: 17 , bits: 64, vg: OFF, img: 22.04}
- {std: 11, cxx: 17 , bits: 32, vg: OFF, img: 22.04}
- {std: 11, cxx: 16 , bits: 64, vg: OFF, img: 22.04}
- {std: 11, cxx: 16 , bits: 32, vg: OFF, img: 22.04}
- {std: 11, cxx: 15 , bits: 64, vg: OFF, img: 22.04}
- {std: 11, cxx: 15 , bits: 32, vg: OFF, img: 22.04}
- {std: 11, cxx: 14 , bits: 64, vg: OFF, img: 22.04}
- {std: 11, cxx: 14 , bits: 32, vg: OFF, img: 22.04}
- {std: 11, cxx: 13 , bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: 13 , bits: 32, vg: OFF, img: 18.04}
- {std: 11, cxx: 12 , bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: 12 , bits: 32, vg: OFF, img: 18.04}
- {std: 11, cxx: 11 , bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: 10 , bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: 10 , bits: 32, vg: OFF, img: 18.04}
- {std: 11, cxx: 9 , bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: 9 , bits: 32, vg: OFF, img: 18.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.0', bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: '6.0', bits: 32, vg: OFF, img: 18.04}
- {std: 11, cxx: '5.0', bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: '5.0', bits: 32, vg: OFF, img: 18.04}
- {std: 11, cxx: '4.0', bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: '4.0', bits: 32, vg: OFF, img: 18.04}
- {std: 11, cxx: '3.9', bits: 64, vg: OFF, img: 18.04}
- {std: 11, cxx: '3.9', bits: 32, vg: OFF, img: 18.04}
env:: load('share/env.yaml')
steps:: checkout-manual + install-cxx + run-steps
steps:
- :: checkout-manual
- name: install
run: c4core-install clang++-${{matrix.cxx}}
- :: run-clang-manual-with-flags('Debug' '-m${{matrix.bits}}')
- :: run-clang-manual-with-flags('Release' '-O1 -DNDEBUG -m${{matrix.bits}}')
- :: run-clang-manual-with-flags('Release' '-O2 -DNDEBUG -m${{matrix.bits}}')
- :: 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')
:: setup-job('clang' 'clangsan')
name: san/${{matrix.bt}}/c++${{matrix.std}}
:: runs-on-docker-c4core('22.04')
strategy:

View File

@@ -19,13 +19,10 @@ env:
NUM_JOBS_BUILD: null
jobs:
clang_tidy:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip clang_tidy')) ||
contains(github.event.head_commit.message, 'only clang_tidy')
continue-on-error: true
if: always()
continue-on-error: false
name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
strategy:
fail-fast: false

View File

@@ -5,7 +5,7 @@
jobs:
clang_tidy:
:: setup-job('clang_tidy')
:: setup-job('clang_tidy' 'clang_tidy')
name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('22.04')
strategy:

View File

@@ -19,11 +19,8 @@ env:
NUM_JOBS_BUILD: null
jobs:
coverage:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip coverage')) ||
contains(github.event.head_commit.message, 'only coverage')
continue-on-error: true
if: always()
continue-on-error: false
name: coverage/c++${{matrix.std}}${{matrix.namesfx}}
runs-on: ${{matrix.os}}
strategy:
@@ -79,9 +76,9 @@ jobs:
- name: static64-run
run: source .github/setenv.sh && c4_build_target static64 ryml-coverage
- name: static64-coverage-artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-static64
name: coverage-static64-${{strategy.job-index}}
path: |
build/static64/lcov
build/static64/coverage3-final_filtered.lcov
@@ -94,9 +91,9 @@ jobs:
- name: static32-run
run: source .github/setenv.sh && c4_build_target static32 ryml-coverage
- name: static32-coverage-artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-static32-cxx${{matrix.std}}
name: coverage-static32-cxx${{matrix.std}}-${{strategy.job-index}}
path: |
build/static32/lcov
build/static32/coverage3-final_filtered.lcov

View File

@@ -5,7 +5,7 @@
jobs:
coverage:
:: setup-job('coverage')
:: setup-job('coverage' 'coverage')
name: coverage/c++${{matrix.std}}${{matrix.namesfx}}
runs-on: ${{matrix.os}}
strategy:
@@ -40,9 +40,9 @@ jobs:
- name: static64-run
run: source .github/setenv.sh && c4_build_target static64 ryml-coverage
- name: static64-coverage-artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-static64
name: coverage-static64-${{strategy.job-index}}
path: |
build/static64/lcov
build/static64/coverage3-final_filtered.lcov
@@ -61,9 +61,9 @@ jobs:
- name: static32-run
run: source .github/setenv.sh && c4_build_target static32 ryml-coverage
- name: static32-coverage-artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-static32-cxx${{matrix.std}}
name: coverage-static32-cxx${{matrix.std}}-${{strategy.job-index}}
path: |
build/static32/lcov
build/static32/coverage3-final_filtered.lcov

View File

@@ -21,7 +21,7 @@ jobs:
emscripten:
name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}}
if: ${{ false }}
continue-on-error: true
continue-on-error: false
runs-on: ${{matrix.os}}
strategy:
fail-fast: false

View File

@@ -6,7 +6,7 @@
jobs:
emscripten:
name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}}
:: setup-job('emscripten')
:: setup-job('emscripten' 'emscripten')
# this job is always causing trouble, with failures showing unreadable code
# dumps. eg https://github.com/biojppm/rapidyaml/actions/runs/10368522906
# Disabling until we can find a proper way to investigate these failures:

View File

@@ -18,36 +18,33 @@ env:
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: null
jobs:
gcc_canary:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip gcc')) ||
contains(github.event.head_commit.message, 'only gcc')
continue-on-error: true
canary:
if: always()
continue-on-error: false
name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest
strategy:
fail-fast: false
matrix:
include:
- std: 11
cxx: g++-14
cxx: g++-13
bt: Debug
bitlinks: shared64 static32
img: '22.04'
- std: 11
cxx: g++-14
cxx: g++-13
bt: Release
bitlinks: shared64 static32
img: '22.04'
- std: 20
cxx: g++-14
cxx: g++-13
bt: Debug
bitlinks: shared64 static32
img: '22.04'
- std: 20
cxx: g++-14
cxx: g++-13
bt: Release
bitlinks: shared64 static32
img: '22.04'
@@ -164,83 +161,33 @@ jobs:
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
gcc_O2:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip gcc')) ||
contains(github.event.head_commit.message, 'only gcc')
continue-on-error: true
name: gcc_O2/${{matrix.gcc}}/c++${{matrix.std}}
runs-on: ubuntu-latest
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
strategy:
fail-fast: false
matrix:
include:
- std: 11
gcc: 12
bt: Release
env:
STD: ${{matrix.std}}
CXX_: ${{matrix.gcc}}
BT: ${{matrix.bt}}
BITLINKS: ${{matrix.bitlinks}}
VG: ${{matrix.vg}}
SAN: ${{matrix.san}}
LINT: ${{matrix.lint}}
OS: ${{matrix.os}}
steps:
- name: checkout (action + docker)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- run: git config --system --add safe.directory '*'
- run: c4core-install g++-${{matrix.gcc}}
- name: show info
run: source .github/setenv.sh && c4_show_info
- name: configure
run: |
cmake -S . -B build_o2 \
-DCMAKE_CXX_COMPILER=g++-${{matrix.gcc}} \
-DCMAKE_C_COMPILER=gcc-${{matrix.gcc}} \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \
-DRYML_BUILD_TESTS:BOOL=ON \
-DRYML_DBG:BOOL=OFF
- name: build
run: cmake --build build_o2 --target ryml-test-build -j --verbose
- name: run
run: cmake --build build_o2 --target ryml-test-run
gcc_tabtokens:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip gcc')) ||
contains(github.event.head_commit.message, 'only gcc')
continue-on-error: true
tabtokens:
if: always()
continue-on-error: false
name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest
strategy:
fail-fast: false
matrix:
include:
- std: 11
cxx: g++-14
cxx: g++-13
bt: Debug
bitlinks: shared64 static32
img: '22.04'
- std: 11
cxx: g++-14
cxx: g++-13
bt: Release
bitlinks: shared64 static32
img: '22.04'
- std: 20
cxx: g++-14
cxx: g++-13
bt: Debug
bitlinks: shared64 static32
img: '22.04'
- std: 20
cxx: g++-14
cxx: g++-13
bt: Release
bitlinks: shared64 static32
img: '22.04'
@@ -358,19 +305,36 @@ jobs:
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
gcc_noexceptions:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip gcc')) ||
contains(github.event.head_commit.message, 'only gcc')
continue-on-error: true
noexceptions:
if: always()
continue-on-error: false
name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-latest
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
@@ -381,26 +345,26 @@ jobs:
bt: Release
bitlinks: shared64 static32
img: '18.04'
- std: 20
cxx: g++-14
- std: 11
cxx: g++-4.8
bt: Debug
bitlinks: shared64 static32
img: '22.04'
- std: 20
cxx: g++-14
img: '18.04'
- std: 11
cxx: g++-4.8
bt: Release
bitlinks: shared64 static32
img: '22.04'
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}}
CXXFLAGS: -fno-exceptions -fno-rtti
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: |
@@ -485,147 +449,220 @@ jobs:
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
gcc_extended:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip gcc')) ||
contains(github.event.head_commit.message, 'only gcc')
continue-on-error: true
name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}
runs-on: ubuntu-latest
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
strategy:
fail-fast: false
matrix:
include:
- std: 11
cxx: g++-14
bt: Debug
vg: 'ON'
img: '22.04'
- std: 11
cxx: g++-14
- issue: 440
std: 11
gcc: 12
bt: Release
vg: 'ON'
img: '22.04'
- std: 14
cxx: g++-14
bt: Debug
vg: 'ON'
img: '22.04'
- std: 14
cxx: g++-14
img: 22.04
cxxflags: -O2 -DNDEBUG -g
- issue: 486
std: 11
gcc: 11
bt: Release
vg: 'ON'
img: '22.04'
- std: 17
cxx: g++-14
bt: Debug
vg: 'ON'
img: '22.04'
- std: 17
cxx: g++-14
bt: Release
vg: 'ON'
img: '22.04'
img: 22.04
cxxflags: -O3 -DNDEBUG
env:
STD: ${{matrix.std}}
CXX_: ${{matrix.gcc}}
BT: ${{matrix.bt}}
BITLINKS: ${{matrix.bitlinks}}
VG: ${{matrix.vg}}
SAN: ${{matrix.san}}
LINT: ${{matrix.lint}}
OS: ${{matrix.os}}
steps:
- name: checkout (action + docker)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- run: git config --system --add safe.directory '*'
- run: c4core-install g++-${{matrix.gcc}}
- name: show info
run: source .github/setenv.sh && c4_show_info
- name: configure (issue \#${{matrix.issue}})
run: |
cmake -S . -B build \
-DCMAKE_CXX_COMPILER=g++-${{matrix.gcc}} \
-DCMAKE_C_COMPILER=gcc-${{matrix.gcc}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE="${{matrix.cxxflags}}" \
-DRYML_BUILD_TESTS=ON \
-DRYML_DBG=OFF
- name: build (issue \#${{matrix.issue}})
run: cmake --build build --target ryml-test-build --parallel --verbose
- name: run (issue \#${{matrix.issue}})
run: cmake --build build --target ryml-test-run
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
strategy:
fail-fast: false
matrix:
include:
- std: 20
cxx: g++-14
bt: Debug
cxx: 14
bits: 64
vg: 'ON'
img: '22.04'
img: 22.04
- std: 20
cxx: g++-14
bt: Release
cxx: 14
bits: 32
vg: 'ON'
img: '22.04'
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++-13
bt: Debug
img: '22.04'
cxx: 14
bits: 64
vg: 'ON'
img: 22.04
- std: 11
cxx: g++-13
bt: Release
img: '22.04'
cxx: 14
bits: 32
vg: 'ON'
img: 22.04
- std: 11
cxx: g++-12
bt: Debug
img: '22.04'
cxx: 13
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-12
bt: Release
img: '22.04'
cxx: 13
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-11
bt: Debug
img: '22.04'
cxx: 12
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-11
bt: Release
img: '22.04'
cxx: 12
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-10
bt: Debug
img: '22.04'
cxx: 11
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-10
bt: Release
img: '22.04'
cxx: 11
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-9
bt: Debug
img: '22.04'
cxx: 10
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-9
bt: Release
img: '22.04'
cxx: 10
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-8
bt: Debug
img: '18.04'
cxx: 9
bits: 64
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-8
bt: Release
img: '18.04'
cxx: 9
bits: 32
vg: 'OFF'
img: 22.04
- std: 11
cxx: g++-7
bt: Debug
img: '18.04'
cxx: 8
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-7
bt: Release
img: '18.04'
cxx: 8
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-6
bt: Debug
img: '18.04'
cxx: 7
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-6
bt: Release
img: '18.04'
cxx: 7
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-5
bt: Debug
img: '18.04'
cxx: 6
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-5
bt: Release
img: '18.04'
cxx: 6
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-4.9
bt: Debug
img: '18.04'
cxx: 5
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-4.9
bt: Release
img: '18.04'
cxx: 5
bits: 32
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-4.8
bt: Debug
img: '18.04'
cxx: 4.9
bits: 64
vg: 'OFF'
img: 18.04
- std: 11
cxx: g++-4.8
bt: Release
img: '18.04'
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}}
@@ -684,49 +721,138 @@ jobs:
|| echo -n
# show the last commit
git log --name-status HEAD^..HEAD
- run: c4core-install ${{matrix.cxx}}
- name: show info
run: source .github/setenv.sh && c4_show_info
- name: shared64-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared64
- name: shared64-build
run: source .github/setenv.sh && c4_build_test shared64
- name: shared64-run
run: source .github/setenv.sh && c4_run_test shared64
- name: shared64-pack
run: source .github/setenv.sh && c4_package shared64
- name: static64-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static64
- name: static64-build
run: source .github/setenv.sh && c4_build_test static64
- name: static64-run
run: source .github/setenv.sh && c4_run_test static64
- name: static64-pack
run: source .github/setenv.sh && c4_package static64
- name: static32-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static32
- name: static32-build
run: source .github/setenv.sh && c4_build_test static32
- name: static32-run
run: source .github/setenv.sh && c4_run_test static32
- name: static32-pack
run: source .github/setenv.sh && c4_package static32
- name: shared32-configure---------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test shared32
- name: shared32-build
run: source .github/setenv.sh && c4_build_test shared32
- name: shared32-run
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
- name: install
run: c4core-install g++-${{matrix.cxx}}
- name: '---------------------------------------------------------'
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}}" \
-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: |
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}}" \
-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: |
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}}" \
-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: |
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}}" \
-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: |
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}}" \
-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: |
cmake --build build/Release --target ryml-test-run
gccsan:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip gcc')) ||
contains(github.event.head_commit.message, 'only gcc')
continue-on-error: true
if: always()
continue-on-error: false
name: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
strategy:
fail-fast: false
@@ -848,12 +974,9 @@ jobs:
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
arm:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip gcc')) ||
contains(github.event.head_commit.message, 'only gcc')
continue-on-error: true
runs-on: ubuntu-latest
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}}
strategy:

View File

@@ -6,20 +6,20 @@
jobs:
#----------------------------------------------------------------------------
gcc_canary:
:: setup-job('gcc')
canary:
:: setup-job('gcc' 'canary')
name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('${{matrix.img}}')
strategy:
fail-fast: false
matrix:
item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3
:bitlinks 'shared64 static32', :img "$a(%4)"})
item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :bitlinks 'shared64 static32', :img "$a(%4)"})
include: &include1
- ! item(11 14 'Debug' '22.04')
- ! item(11 14 'Release' '22.04')
- ! item(20 14 'Debug' '22.04')
- ! item(20 14 'Release' '22.04')
# 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')
@@ -28,37 +28,8 @@ jobs:
steps:: checkout-manual + install-cxx + run-steps
#----------------------------------------------------------------------------
gcc_O2: # see https://github.com/biojppm/rapidyaml/issues/440
:: setup-job('gcc')
name: gcc_O2/${{matrix.gcc}}/c++${{matrix.std}}
:: runs-on-docker-c4core('22.04')
strategy:
fail-fast: false
matrix:
include:
- {std: 11, gcc: 12 , bt: Release}
env:: load('share/env.yaml') + {'CXX_' '${{matrix.gcc}}'}
steps:
- :: checkout-action-docker
- run: c4core-install g++-${{matrix.gcc}}
- name: show info
run: source .github/setenv.sh && c4_show_info
- name: configure
run: |
cmake -S . -B build_o2 \
-DCMAKE_CXX_COMPILER=g++-${{matrix.gcc}} \
-DCMAKE_C_COMPILER=gcc-${{matrix.gcc}} \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \
-DRYML_BUILD_TESTS:BOOL=ON \
-DRYML_DBG:BOOL=OFF
- name: build
run: cmake --build build_o2 --target ryml-test-build -j --verbose
- name: run
run: cmake --build build_o2 --target ryml-test-run
#----------------------------------------------------------------------------
gcc_tabtokens:
:: setup-job('gcc')
tabtokens:
:: setup-job('gcc' 'tabtokens')
name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('${{matrix.img}}')
strategy:
@@ -69,71 +40,103 @@ jobs:
steps:: checkout-manual + install-cxx + run-steps
#----------------------------------------------------------------------------
gcc_noexceptions:
:: setup-job('gcc')
noexceptions:
:: setup-job('gcc' 'noexceptions')
name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('${{matrix.img}}')
strategy:
fail-fast: false
matrix:
item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3
:bitlinks 'shared64 static32', :img "$a(%4)"})
include:
- ! item(11 5 'Debug' '18.04')
- ! item(11 5 'Release' '18.04')
- ! item(20 14 'Debug' '22.04')
- ! item(20 14 'Release' '22.04')
env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + load('share/env.yaml')
include: *include1
env:: load('share/env.yaml') + {'CXXFLAGS' '-fno-exceptions -fno-rtti'}
steps:: checkout-manual + install-cxx + run-steps
#----------------------------------------------------------------------------
gcc_extended:
:: setup-job('gcc')
name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}
misbuild:
:: setup-job('gcc' 'misbuild')
name: misbuild#${{matrix.issue}}/gcc${{matrix.gcc}}/c++${{matrix.std}}
:: runs-on-docker-c4core('${{matrix.img}}')
strategy:
fail-fast: false
matrix:
item-vg =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :vg 'ON', :img %4})
item =: \({:std 11, :cxx "g++-$a(%1)", :bt %2 :img %3})
include:
# VALGRIND
- ! item-vg(11 14 'Debug' '22.04')
- ! item-vg(11 14 'Release' '22.04')
- ! item-vg(14 14 'Debug' '22.04')
- ! item-vg(14 14 'Release' '22.04')
- ! item-vg(17 14 'Debug' '22.04')
- ! item-vg(17 14 'Release' '22.04')
- ! item-vg(20 14 'Debug' '22.04')
- ! item-vg(20 14 'Release' '22.04')
- ! item(13 'Debug' '22.04')
- ! item(13 'Release' '22.04')
- ! item(12 'Debug' '22.04')
- ! item(12 'Release' '22.04')
- ! item(11 'Debug' '22.04')
- ! item(11 'Release' '22.04')
- ! item(10 'Debug' '22.04')
- ! item(10 'Release' '22.04')
- ! item( 9 'Debug' '22.04')
- ! item( 9 'Release' '22.04')
- ! item( 8 'Debug' '18.04')
- ! item( 8 'Release' '18.04')
- ! item( 7 'Debug' '18.04')
- ! item( 7 'Release' '18.04')
- ! item( 6 'Debug' '18.04')
- ! item( 6 'Release' '18.04')
- ! item( 5 'Debug' '18.04')
- ! item( 5 'Release' '18.04')
- ! item(4.9 'Debug' '18.04')
- ! item(4.9 'Release' '18.04')
- ! item(4.8 'Debug' '18.04')
- ! item(4.8 'Release' '18.04')
- {issue: 440, std: 11, gcc: 12 , bt: Release, img: 22.04, cxxflags: -O2 -DNDEBUG -g}
- {issue: 486, std: 11, gcc: 11 , bt: Release, img: 22.04, cxxflags: -O3 -DNDEBUG}
env:: load('share/env.yaml') + {'CXX_' '${{matrix.gcc}}'}
steps:
- :: checkout-action-docker
- run: c4core-install g++-${{matrix.gcc}}
- name: show info
run: source .github/setenv.sh && c4_show_info
- name: configure (issue \#${{matrix.issue}})
run: |
cmake -S . -B build \
-DCMAKE_CXX_COMPILER=g++-${{matrix.gcc}} \
-DCMAKE_C_COMPILER=gcc-${{matrix.gcc}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE="${{matrix.cxxflags}}" \
-DRYML_BUILD_TESTS=ON \
-DRYML_DBG=OFF
- name: build (issue \#${{matrix.issue}})
run: cmake --build build --target ryml-test-build --parallel --verbose
- name: run (issue \#${{matrix.issue}})
run: cmake --build build --target ryml-test-run
#----------------------------------------------------------------------------
extended:
:: setup-job('gcc' 'extended')
name: extended/${{matrix.cxx}}/${{matrix.bits}}bit/c++${{matrix.std}}/vg${{matrix.vg}}
:: runs-on-docker-c4core('${{matrix.img}}')
strategy:
fail-fast: false
matrix:
include:
# with valgrind: only latest gcc
- {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}
# without valgrind
- {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}
- {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:: load('share/env.yaml')
steps:: checkout-manual + install-cxx + run-steps
steps:
- :: checkout-manual
- name: install
run: c4core-install g++-${{matrix.cxx}}
- :: run-gcc-manual-with-flags('Debug' '-m${{matrix.bits}}')
- :: run-gcc-manual-with-flags('Release' '-O1 -DNDEBUG -m${{matrix.bits}}')
- :: run-gcc-manual-with-flags('Release' '-O2 -DNDEBUG -m${{matrix.bits}}')
- :: run-gcc-manual-with-flags('Release' '-O3 -DNDEBUG -m${{matrix.bits}}')
- :: run-gcc-manual-with-flags('Release' '-Os -DNDEBUG -m${{matrix.bits}}')
#----------------------------------------------------------------------------
gccsan:
:: setup-job('gcc')
:: setup-job('gcc' 'gccsan')
name: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}}
:: runs-on-docker-c4core('22.04')
strategy:
@@ -149,7 +152,7 @@ jobs:
#----------------------------------------------------------------------------
arm:
:: setup-job('gcc') + runs-on-docker-c4core('18.04')
:: setup-job('gcc' 'arm') + runs-on-docker-c4core('18.04')
name: arm/c++${{matrix.std}}/${{matrix.bt}}
strategy:
fail-fast: false

View File

@@ -18,13 +18,16 @@ env:
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: null
jobs:
log-github-event:
name: log github event
runs-on: ubuntu-24.04
steps:
- name: log github event
run: echo "${{toJSON(github.event)}}"
check_workflows:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip infra')) ||
contains(github.event.head_commit.message, 'only infra')
continue-on-error: true
runs-on: ubuntu-22.04
if: always()
continue-on-error: false
runs-on: ubuntu-24.04
steps:
- name: checkout (action)
uses: actions/checkout@v4
@@ -37,6 +40,8 @@ jobs:
run: make -C .github/workflows build
- name: test workflows
run: |
wc --version
wc --help
make -C .github/workflows test
status=$?
if [ $status != 0 ] ; then

View File

@@ -4,11 +4,16 @@
:: workflow-setup()
jobs:
log-github-event:
name: log github event
runs-on: ubuntu-24.04
steps:
- name: log github event
run: echo "${{toJSON(github.event)}}"
#----------------------------------------------------------------------------
check_workflows:
:: setup-job('infra')
runs-on: ubuntu-22.04
:: setup-job('infra' 'check_workflows')
runs-on: ubuntu-24.04
steps:
- :: checkout-action
- name: install ys
@@ -17,6 +22,8 @@ jobs:
run: make -C .github/workflows build
- name: test workflows
run: |
wc --version
wc --help
make -C .github/workflows test
status=$?
if [ $status != 0 ] ; then

View File

@@ -19,11 +19,8 @@ env:
NUM_JOBS_BUILD: null
jobs:
macosx:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip macosx')) ||
contains(github.event.head_commit.message, 'only macosx')
continue-on-error: true
if: always()
continue-on-error: false
runs-on: macos-13
strategy:
fail-fast: false

View File

@@ -5,7 +5,7 @@
jobs:
macosx:
:: setup-job('macosx')
:: setup-job('macosx' 'macosx')
runs-on: macos-13
strategy:
fail-fast: false

View File

@@ -19,11 +19,8 @@ env:
NUM_JOBS_BUILD: null
jobs:
rarearchs:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip rarearchs')) ||
contains(github.event.head_commit.message, 'only rarearchs')
continue-on-error: true
if: always()
continue-on-error: false
name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-22.04
strategy:

View File

@@ -5,7 +5,7 @@
jobs:
rarearchs:
:: setup-job('rarearchs')
:: setup-job('rarearchs' 'rarearchs')
name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-22.04
strategy:

View File

@@ -24,10 +24,7 @@ env:
NUM_JOBS_BUILD: null
jobs:
gettag:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip release')) ||
contains(github.event.head_commit.message, 'only release')
if: always()
continue-on-error: false
runs-on: ubuntu-latest
steps:
@@ -70,7 +67,7 @@ jobs:
export SRC_VERSION=$SRC_VERSION
EOF
- name: Save vars.sh
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: vars.sh
path: ./vars.sh
@@ -93,10 +90,7 @@ jobs:
- name: Verify vars.sh
run: env | grep SRC
src:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip release')) ||
contains(github.event.head_commit.message, 'only release')
if: always()
continue-on-error: false
needs: gettag
runs-on: ubuntu-latest
@@ -107,7 +101,7 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Download vars.sh
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: vars.sh
path: ./
@@ -150,15 +144,12 @@ jobs:
python --version
python tools/amalgamate.py assets/$id.hpp
- name: Save source artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: assets
path: assets
name: assets-src
path: assets/
cpp:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip release')) ||
contains(github.event.head_commit.message, 'only release')
if: always()
continue-on-error: false
name: cpp/${{matrix.config.os}}/${{matrix.config.gen}}
needs: gettag
@@ -206,7 +197,7 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Download vars.sh
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: vars.sh
path: ./
@@ -248,15 +239,12 @@ jobs:
[ ! -f $asset_src ] && exit 1
cp -fav $asset_src $asset_dst
- name: Save artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: assets
path: assets
name: assets-${{matrix.config.sfxp}}
path: assets/
python_src:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip release')) ||
contains(github.event.head_commit.message, 'only release')
if: always()
continue-on-error: false
name: python/src
runs-on: ubuntu-latest
@@ -282,17 +270,14 @@ jobs:
sdist=`echo $sdist_orig | sed 's:\.zip:-python_src.zip:'`
mv -fv $sdist_orig $sdist
- name: Save artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
name: dist-python_src
path: dist/
python_wheels:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip release')) ||
contains(github.event.head_commit.message, 'only release')
if: always()
continue-on-error: false
name: python/${{matrix.config.cibw_pyv}}/${{matrix.config.osname}}/${{matrix.config.cibw_arch}}
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
env:
CMAKE_FLAGS: ${{matrix.config.cmakeflags}} -DRYML_DEV=OFF -DRYML_BUILD_API=ON -DRYML_API_TESTS=OFF -DRYML_API_BENCHMARKS=OFF
@@ -306,84 +291,112 @@ jobs:
cibw_pyv: 312
cibw_arch: x86_64
cibw_platform: manylinux_x86_64
name: python/3.12/linux/x86_64
sfx: python3.12_linuxx86_64
osname: linux
os: ubuntu-20.04
- pythonv: '3.12'
cibw_pyv: 312
cibw_arch: i686
cibw_platform: manylinux_i686
name: python/3.12/linux/i686
sfx: python3.12_linuxi686
osname: linux
os: ubuntu-20.04
- pythonv: '3.11'
cibw_pyv: 311
cibw_arch: x86_64
cibw_platform: manylinux_x86_64
name: python/3.11/linux/x86_64
sfx: python3.11_linuxx86_64
osname: linux
os: ubuntu-20.04
- pythonv: '3.11'
cibw_pyv: 311
cibw_arch: i686
cibw_platform: manylinux_i686
name: python/3.11/linux/i686
sfx: python3.11_linuxi686
osname: linux
os: ubuntu-20.04
- pythonv: '3.10'
cibw_pyv: 310
cibw_arch: x86_64
cibw_platform: manylinux_x86_64
name: python/3.10/linux/x86_64
sfx: python3.10_linuxx86_64
osname: linux
os: ubuntu-20.04
- pythonv: '3.10'
cibw_pyv: 310
cibw_arch: i686
cibw_platform: manylinux_i686
name: python/3.10/linux/i686
sfx: python3.10_linuxi686
osname: linux
os: ubuntu-20.04
- pythonv: '3.9'
cibw_pyv: 39
cibw_arch: x86_64
cibw_platform: manylinux_x86_64
name: python/3.9/linux/x86_64
sfx: python3.9_linuxx86_64
osname: linux
os: ubuntu-20.04
- pythonv: '3.9'
cibw_pyv: 39
cibw_arch: i686
cibw_platform: manylinux_i686
name: python/3.9/linux/i686
sfx: python3.9_linuxi686
osname: linux
os: ubuntu-20.04
- pythonv: '3.8'
cibw_pyv: 38
cibw_arch: x86_64
cibw_platform: manylinux_x86_64
name: python/3.8/linux/x86_64
sfx: python3.8_linuxx86_64
osname: linux
os: ubuntu-20.04
- pythonv: '3.8'
cibw_pyv: 38
cibw_arch: i686
cibw_platform: manylinux_i686
name: python/3.8/linux/i686
sfx: python3.8_linuxi686
osname: linux
os: ubuntu-20.04
- pythonv: '3.7'
cibw_pyv: 37
cibw_arch: x86_64
cibw_platform: manylinux_x86_64
name: python/3.7/linux/x86_64
sfx: python3.7_linuxx86_64
osname: linux
os: ubuntu-20.04
- pythonv: '3.7'
cibw_pyv: 37
cibw_arch: i686
cibw_platform: manylinux_i686
name: python/3.7/linux/i686
sfx: python3.7_linuxi686
osname: linux
os: ubuntu-20.04
- pythonv: '3.6'
cibw_pyv: 36
cibw_arch: x86_64
cibw_platform: manylinux_x86_64
name: python/3.6/linux/x86_64
sfx: python3.6_linuxx86_64
osname: linux
os: ubuntu-20.04
- pythonv: '3.6'
cibw_pyv: 36
cibw_arch: i686
cibw_platform: manylinux_i686
name: python/3.6/linux/i686
sfx: python3.6_linuxi686
osname: linux
os: ubuntu-20.04
steps:
@@ -395,12 +408,14 @@ jobs:
- name: create wheel
uses: pypa/cibuildwheel@v2.17
- name: rename wheelhouse -> dist
run: mv -fv wheelhouse dist; ls -lFhp dist/
run: mv -fv wheelhouse dist
- name: Verify artifacts
run: ls -lFhp dist/
- name: Save artifacts for publishing to PyPI
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
name: dist-${{matrix.config.sfx}}
path: dist/
- name: install python ${{matrix.config.pythonv}}
uses: actions/setup-python@v5
with:
@@ -427,11 +442,8 @@ jobs:
python -m pytest -vvv api/python/tests
pip uninstall -y -v rapidyaml
done
release:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip release')) ||
contains(github.event.head_commit.message, 'only release')
merge_artifacts:
if: always()
continue-on-error: false
runs-on: ubuntu-latest
needs:
@@ -440,25 +452,34 @@ jobs:
- python_src
- python_wheels
steps:
- name: Merge assets artifacts
uses: actions/upload-artifact/merge@v4
with:
name: assets
pattern: assets-*
separate-directories: true
delete-merged: true
- name: Merge dist artifacts
uses: actions/upload-artifact/merge@v4
with:
name: dist
pattern: dist-*
separate-directories: true
delete-merged: true
release:
if: always()
continue-on-error: false
runs-on: ubuntu-latest
needs:
- merge_artifacts
steps:
- name: checkout (action)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Gather artifacts - ./assets
uses: actions/download-artifact@v3
with:
name: assets
path: assets
- name: Gather artifacts - ./dist
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Verify existing artifacts
run: ls -lFhp assets/ dist/
- name: Download vars.sh
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: vars.sh
path: ./
@@ -480,6 +501,22 @@ jobs:
run: echo 'nothing to do'
- name: Verify vars.sh
run: env | grep SRC
- name: Verify existing artifacts
run: |
ls -lFhp .
ls -lFhp assets*/ dist*/ || echo 'none found'
- name: Gather artifacts - ./assets
uses: actions/download-artifact@v4
with:
pattern: assets
- name: Gather artifacts - ./dist
uses: actions/download-artifact@v4
with:
pattern: dist
- name: Verify existing artifacts
run: |
ls -lFhp .
ls -lFhp assets*/ dist*/ || echo 'none found'
- name: Move Python packages to assets folder
if: contains(github.ref, 'tags/v')
run: mv -fv dist/*src.zip assets/.

View File

@@ -24,7 +24,7 @@ env:
jobs:
gettag:
:: setup-job('release')
:: setup-job('release' 'gettag')
continue-on-error: false
runs-on: ubuntu-latest
steps:
@@ -34,7 +34,7 @@ jobs:
#----------------------------------------------------------------------------
# create source packages
src:
:: setup-job('release')
:: setup-job('release' 'src')
continue-on-error: false
needs: gettag
runs-on: ubuntu-latest
@@ -49,13 +49,13 @@ jobs:
- name: Create source packages
run:: bash('release-create-source-packages')
- name: Save source artifacts
uses: actions/upload-artifact@v3
with: {name: assets, path: assets}
uses: actions/upload-artifact@v4
with: {name: assets-src, path: assets/}
#----------------------------------------------------------------------------
# create c++ packages
cpp:
:: setup-job('release')
:: setup-job('release' 'cpp')
continue-on-error: false
name: cpp/${{matrix.config.os}}/${{matrix.config.gen}}
needs: gettag
@@ -108,8 +108,8 @@ jobs:
- name: shared64-normalize
run:: bash('release-shared-normalize')
- name: Save artifacts
uses: actions/upload-artifact@v3
with: {name: assets, path: assets}
uses: actions/upload-artifact@v4
with: {name: 'assets-${{matrix.config.sfxp}}', path: assets/}
#----------------------------------------------------------------------------
# create python packages
@@ -117,7 +117,7 @@ jobs:
# github.com/pikepdf/pikepdf/blob/master/.github/workflows/build_wheels.yml
python_src:
:: setup-job('release')
:: setup-job('release' 'python_src')
continue-on-error: false
name: python/src
runs-on: ubuntu-latest
@@ -131,33 +131,30 @@ jobs:
- name: normalize src package names
run:: bash('release-normalize')
- name: Save artifacts
uses: actions/upload-artifact@v3
with: {name: dist, path: dist}
uses: actions/upload-artifact@v4
with: {name: dist-python_src, path: dist/}
python_wheels:
:: setup-job('release')
:: setup-job('release' 'python_wheels')
continue-on-error: false
name::
-'python/${{matrix.config.cibw_pyv}}/' +
'${{matrix.config.osname}}/${{matrix.config.cibw_arch}}'
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
env:
CMAKE_FLAGS:
${{matrix.config.cmakeflags}} -DRYML_DEV=OFF -DRYML_BUILD_API=ON
-DRYML_API_TESTS=OFF -DRYML_API_BENCHMARKS=OFF
CIBW_BUILD:
cp${{matrix.config.cibw_pyv}}-${{matrix.config.cibw_platform}}
CMAKE_FLAGS: ${{matrix.config.cmakeflags}} -DRYML_DEV=OFF -DRYML_BUILD_API=ON -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}}
strategy:
fail-fast: false
matrix:
# Local function to expand python entries:
python =:
fn(*w)::
pythonv:: w.0
cibw_pyv:: w.1
cibw_arch:: w.2
cibw_platform:: w.3
fn(a0 a1 a2 a3)::
pythonv:: a0
cibw_pyv:: a1
cibw_arch:: a2
cibw_platform:: a3
name:: "python/$a0/linux/$a2"
sfx:: "python$a0_linux$a2" # suffix
osname: linux
os: ubuntu-20.04
config:
@@ -250,45 +247,89 @@ jobs:
- name: create wheel
uses: pypa/cibuildwheel@v2.17
- name: rename wheelhouse -> dist
run:
mv -fv wheelhouse dist;
ls -lFhp dist/
run: mv -fv wheelhouse dist
- name: Verify artifacts
run: ls -lFhp dist/
- name: Save artifacts for publishing to PyPI
uses: actions/upload-artifact@v3
with: {name: dist, path: dist}
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: test with python ${{matrix.config.pythonv}}
run:: bash('release-test-with-python')
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 ; print("python:", sys.version, struct.calcsize("P") * 8, "bits")'
pip --version
pip install -v -r requirements.txt
pip install -v -r api/python/requirements.txt
for whl in dist/* ; do
pip install -v $whl
pip show -f rapidyaml
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"))'
python -m pytest -vvv api/python/tests
pip uninstall -y -v rapidyaml
done
#----------------------------------------------------------------------------
merge_artifacts:
:: setup-job('release' 'release')
runs-on: ubuntu-latest
needs: [src, cpp, python_src, python_wheels]
steps:
- name: Merge assets artifacts
uses: actions/upload-artifact/merge@v4
with:
name: assets
pattern: assets-*
separate-directories: true
delete-merged: true
- name: Merge dist artifacts
uses: actions/upload-artifact/merge@v4
with:
name: dist
pattern: dist-*
separate-directories: true
delete-merged: true
#----------------------------------------------------------------------------
release:
:: setup-job('release')
:: setup-job('release' 'release')
continue-on-error: false
runs-on: ubuntu-latest
needs:
- src
- cpp
- python_src
- python_wheels
needs: [merge_artifacts]
steps:
- :: checkout-action
- name: Gather artifacts - ./assets
uses: actions/download-artifact@v3
with: {name: assets, path: assets}
- name: Gather artifacts - ./dist
uses: actions/download-artifact@v3
with: {name: dist, path: dist}
- name: Verify existing artifacts
run: ls -lFhp assets/ dist/
# Github
- :: version-get-vars
# artifacts
- name: Verify existing artifacts
run: |
ls -lFhp .
ls -lFhp assets*/ dist*/ || echo 'none found'
- name: Gather artifacts - ./assets
uses: actions/download-artifact@v4
with: {pattern: assets}
- name: Gather artifacts - ./dist
uses: actions/download-artifact@v4
with: {pattern: dist}
- name: Verify existing artifacts
run: |
ls -lFhp .
ls -lFhp assets*/ dist*/ || echo 'none found'
- name: Move Python packages to assets folder
if: contains(github.ref, 'tags/v')
run: mv -fv dist/*src.zip assets/.
# Github
- name: Create Github Release
if: contains(github.ref, 'tags/v')
id: create_release

View File

@@ -19,11 +19,8 @@ env:
NUM_JOBS_BUILD: null
jobs:
samples:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip samples')) ||
contains(github.event.head_commit.message, 'only samples')
continue-on-error: true
if: always()
continue-on-error: false
runs-on: ${{matrix.os}}
strategy:
fail-fast: false

View File

@@ -5,7 +5,7 @@
jobs:
samples:
:: setup-job('samples')
:: setup-job('samples' 'samples')
runs-on: ${{matrix.os}}
strategy:
fail-fast: false

View File

@@ -18,116 +18,283 @@ env:
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: null
jobs:
vs:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip windows')) ||
contains(github.event.head_commit.message, 'only windows')
continue-on-error: true
name: ${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ${{matrix.os}}
vsdebug:
if: always()
continue-on-error: false
name: ${{matrix.name}}bit/c++${{matrix.std}}/debug
runs-on: windows-${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- std: 11
cxx: vs2019
bt: Debug
os: windows-2019
bitlinks: shared64 static32
name: vs2019/64
os: 2019
gen: Visual Studio 16 2019
arch: x64
- std: 11
cxx: vs2019
bt: Release
os: windows-2019
bitlinks: shared64 static32
name: vs2019/32
os: 2019
gen: Visual Studio 16 2019
arch: Win32
- std: 17
cxx: vs2019
bt: Debug
os: windows-2019
bitlinks: shared64 static32
name: vs2019/64
os: 2019
gen: Visual Studio 16 2019
arch: x64
- std: 17
cxx: vs2019
bt: Release
os: windows-2019
bitlinks: shared64 static32
name: vs2019/32
os: 2019
gen: Visual Studio 16 2019
arch: Win32
- std: 11
cxx: vs2022
bt: Debug
os: windows-2022
bitlinks: shared64 static32
name: vs2022/64
os: 2022
gen: Visual Studio 17 2022
arch: x64
- std: 11
cxx: vs2022
bt: Release
os: windows-2022
bitlinks: shared64 static32
name: vs2022/32
os: 2022
gen: Visual Studio 17 2022
arch: Win32
- std: 17
cxx: vs2022
bt: Debug
os: windows-2022
bitlinks: shared64 static32
name: vs2022/64
os: 2022
gen: Visual Studio 17 2022
arch: x64
- std: 17
cxx: vs2022
bt: Release
os: windows-2022
bitlinks: shared64 static32
name: vs2022/32
os: 2022
gen: Visual Studio 17 2022
arch: Win32
- std: 20
cxx: vs2022
bt: Debug
os: windows-2022
bitlinks: shared64 static32
name: vs2022/64
os: 2022
gen: Visual Studio 17 2022
arch: x64
- std: 20
cxx: vs2022
bt: Release
os: windows-2022
bitlinks: shared64 static32
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}}
name: vs2022/32
os: 2022
gen: Visual Studio 17 2022
arch: Win32
steps:
- name: checkout (action)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: install requirements
run: source .github/reqs.sh && c4_install_test_requirements $OS
- 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: '---------------------------------------------------------'
run: |
echo "Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=ON"
- name: 'configure Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=ON'
run: |
rm -rf build/Debug
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/Debug \
-G "${{matrix.gen}}" -A ${{matrix.arch}} \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS_DEBUG=" /MDd /Zi /Ob0 /Od /RTC1" \
-DCMAKE_C_FLAGS_DEBUG=" /MDd /Zi /Ob0 /Od /RTC1" \
-DBUILD_SHARED_LIBS=ON \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name: 'build Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=ON'
run: |
cmake --build build/Debug --target ryml-test-build --parallel --verbose
- name: 'run Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=ON'
run: |
cmake --build build/Debug --target ryml-test-run
- name: '---------------------------------------------------------'
run: |
echo "Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=OFF"
- name: 'configure Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=OFF'
run: |
rm -rf build/Debug
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/Debug \
-G "${{matrix.gen}}" -A ${{matrix.arch}} \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS_DEBUG=" /MDd /Zi /Ob0 /Od /RTC1" \
-DCMAKE_C_FLAGS_DEBUG=" /MDd /Zi /Ob0 /Od /RTC1" \
-DBUILD_SHARED_LIBS=OFF \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name: 'build Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=OFF'
run: |
cmake --build build/Debug --target ryml-test-build --parallel --verbose
- name: 'run Debug ::: /MDd /Zi /Ob0 /Od /RTC1 shared=OFF'
run: |
cmake --build build/Debug --target ryml-test-run
- name: '---------------------------------------------------------'
run: |
echo "Release ::: /MD /Os /DNDEBUG shared=OFF"
- name: 'configure Release ::: /MD /Os /DNDEBUG shared=OFF'
run: |
rm -rf build/Release
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/Release \
-G "${{matrix.gen}}" -A ${{matrix.arch}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE=" /MD /Os /DNDEBUG" \
-DCMAKE_C_FLAGS_RELEASE=" /MD /Os /DNDEBUG" \
-DBUILD_SHARED_LIBS=OFF \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name: 'build Release ::: /MD /Os /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-build --parallel --verbose
- name: 'run Release ::: /MD /Os /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-run
vsrelease:
if: always()
continue-on-error: false
name: ${{matrix.name}}bit/c++${{matrix.std}}/release
runs-on: windows-${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- std: 11
name: vs2019/64
os: 2019
gen: Visual Studio 16 2019
arch: x64
- std: 11
name: vs2019/32
os: 2019
gen: Visual Studio 16 2019
arch: Win32
- std: 17
name: vs2019/64
os: 2019
gen: Visual Studio 16 2019
arch: x64
- std: 17
name: vs2019/32
os: 2019
gen: Visual Studio 16 2019
arch: Win32
- std: 11
name: vs2022/64
os: 2022
gen: Visual Studio 17 2022
arch: x64
- std: 11
name: vs2022/32
os: 2022
gen: Visual Studio 17 2022
arch: Win32
- std: 17
name: vs2022/64
os: 2022
gen: Visual Studio 17 2022
arch: x64
- std: 17
name: vs2022/32
os: 2022
gen: Visual Studio 17 2022
arch: Win32
- std: 20
name: vs2022/64
os: 2022
gen: Visual Studio 17 2022
arch: x64
- std: 20
name: vs2022/32
os: 2022
gen: Visual Studio 17 2022
arch: Win32
steps:
- name: checkout (action)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: '---------------------------------------------------------'
run: |
echo "Release ::: /MD /O1 /Ob1 /DNDEBUG shared=OFF"
- name: 'configure Release ::: /MD /O1 /Ob1 /DNDEBUG shared=OFF'
run: |
rm -rf build/Release
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/Release \
-G "${{matrix.gen}}" -A ${{matrix.arch}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE=" /MD /O1 /Ob1 /DNDEBUG" \
-DCMAKE_C_FLAGS_RELEASE=" /MD /O1 /Ob1 /DNDEBUG" \
-DBUILD_SHARED_LIBS=OFF \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name: 'build Release ::: /MD /O1 /Ob1 /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-build --parallel --verbose
- name: 'run Release ::: /MD /O1 /Ob1 /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-run
- name: '---------------------------------------------------------'
run: |
echo "Release ::: /MD /O2 /Ob2 /DNDEBUG shared=OFF"
- name: 'configure Release ::: /MD /O2 /Ob2 /DNDEBUG shared=OFF'
run: |
rm -rf build/Release
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/Release \
-G "${{matrix.gen}}" -A ${{matrix.arch}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE=" /MD /O2 /Ob2 /DNDEBUG" \
-DCMAKE_C_FLAGS_RELEASE=" /MD /O2 /Ob2 /DNDEBUG" \
-DBUILD_SHARED_LIBS=OFF \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name: 'build Release ::: /MD /O2 /Ob2 /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-build --parallel --verbose
- name: 'run Release ::: /MD /O2 /Ob2 /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-run
- name: '---------------------------------------------------------'
run: |
echo "Release ::: /MD /O3 /Ob3 /DNDEBUG shared=OFF"
- name: 'configure Release ::: /MD /O3 /Ob3 /DNDEBUG shared=OFF'
run: |
rm -rf build/Release
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/Release \
-G "${{matrix.gen}}" -A ${{matrix.arch}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE=" /MD /O3 /Ob3 /DNDEBUG" \
-DCMAKE_C_FLAGS_RELEASE=" /MD /O3 /Ob3 /DNDEBUG" \
-DBUILD_SHARED_LIBS=OFF \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name: 'build Release ::: /MD /O3 /Ob3 /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-build --parallel --verbose
- name: 'run Release ::: /MD /O3 /Ob3 /DNDEBUG shared=OFF'
run: |
cmake --build build/Release --target ryml-test-run

View File

@@ -1,114 +1,41 @@
!yamlscript/v0:
!yamlscript/v0: # data mode
:: use(common)
:: workflow-setup()
jobs:
vs:
:: setup-job('windows')
name: ${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ${{matrix.os}}
items =::
runs-on: windows-${{matrix.os}}
strategy:
fail-fast: false
matrix:
item =: \({:std %1, :cxx "vs$a(%2)", :bt %3, :os "windows-$a(%4)",
:bitlinks 'shared64 static32'})
include:
# vs2017 is only availble in windows-2016
#- ! item(11 2017 'Debug' 2016)
#- ! item(11 2017 'Release' 2016)
#- ! item(14 2017 'Debug' 2016)
#- ! item(14 2017 'Release' 2016)
- ! item(11 2019 'Debug' 2019)
- ! item(11 2019 'Release' 2019)
- ! item(17 2019 'Debug' 2019)
- ! item(17 2019 'Release' 2019)
- ! item(11 2022 'Debug' 2022)
- ! item(11 2022 'Release' 2022)
- ! item(17 2022 'Debug' 2022)
- ! item(17 2022 'Release' 2022)
- ! item(20 2022 'Debug' 2022)
- ! item(20 2022 'Release' 2022)
env:: load('share/env.yaml')
steps:
- :: checkout-action
- name: install requirements
run: source .github/reqs.sh && c4_install_test_requirements $OS
- :: run-steps
- {std: 11, name: vs2019/64, os: 2019, gen: Visual Studio 16 2019, arch: x64}
- {std: 11, name: vs2019/32, os: 2019, gen: Visual Studio 16 2019, arch: Win32}
- {std: 17, name: vs2019/64, os: 2019, gen: Visual Studio 16 2019, arch: x64}
- {std: 17, name: vs2019/32, os: 2019, gen: Visual Studio 16 2019, arch: Win32}
- {std: 11, name: vs2022/64, os: 2022, gen: Visual Studio 17 2022, arch: x64}
- {std: 11, name: vs2022/32, os: 2022, gen: Visual Studio 17 2022, arch: Win32}
- {std: 17, name: vs2022/64, os: 2022, gen: Visual Studio 17 2022, arch: x64}
- {std: 17, name: vs2022/32, os: 2022, gen: Visual Studio 17 2022, arch: Win32}
- {std: 20, name: vs2022/64, os: 2022, gen: Visual Studio 17 2022, arch: x64}
- {std: 20, name: vs2022/32, os: 2022, gen: Visual Studio 17 2022, arch: Win32}
# TODO:
# mingw:
# name: mingw/${{matrix.platform}}/c++${{matrix.std}}/${{matrix.bt}}
# if: |
# (!contains(github.event.head_commit.message, 'skip all')) ||
# (!contains(github.event.head_commit.message, 'skip windows')) ||
# contains(github.event.head_commit.message, 'only windows')
#
# continue-on-error: true
# runs-on: ${{matrix.os}}
#
# strategy:
# fail-fast: false
# matrix:
# include:
# - {std: 11, platform: x86, cxx: i686-w64-mingw32-g++, bt: Debug,
# os: windows-latest, bitlinks: shared32 static32}
# - {std: 11, platform: x64, cxx: x86_64-w64-mingw32-g++, bt: Debug,
# os: windows-latest, bitlinks: shared64 static64}
# - {std: 11, platform: x86, cxx: i686-w64-mingw32-g++, bt: Release,
# os: windows-latest, bitlinks: shared32 static32}
# - {std: 11, platform: x64, cxx: x86_64-w64-mingw32-g++, bt: Release,
# os: windows-latest, bitlinks: shared64 static64}
# - {std: 17, platform: x86, cxx: i686-w64-mingw32-g++, bt: Debug,
# os: windows-latest, bitlinks: shared32 static32}
# - {std: 17, platform: x64, cxx: x86_64-w64-mingw32-g++, bt: Debug,
# os: windows-latest, bitlinks: shared64 static64}
# - {std: 17, platform: x86, cxx: i686-w64-mingw32-g++, bt: Release,
# os: windows-latest, bitlinks: shared32 static32}
# - {std: 17, platform: x64, cxx: x86_64-w64-mingw32-g++, bt: Release,
# os: windows-latest, bitlinks: shared64 static64}
#
# env:: load('share/env.yaml')
#
# steps:
# - name: checkout
# uses: actions/checkout@v4
# with: {submodules: recursive}
# - name: install requirements
# run: source .github/reqs.sh && c4_install_test_requirements $OS
# - name: install mingw
# uses: egor-tensin/setup-mingw@v2
# with:
# platform: ${{matrix.platform}}
# - 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: 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: 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
jobs:
vsdebug:
:: setup-job('windows' 'vsdebug')
name: ${{matrix.name}}bit/c++${{matrix.std}}/debug
:: items
steps:
- :: checkout-action # generator architecture buildtype shared cflags
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Debug' 'ON' '/MDd /Zi /Ob0 /Od /RTC1')
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Debug' 'OFF' '/MDd /Zi /Ob0 /Od /RTC1')
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Release' 'OFF' '/MD /Os /DNDEBUG')
vsrelease:
:: setup-job('windows' 'vsrelease')
name: ${{matrix.name}}bit/c++${{matrix.std}}/release
:: items
steps:
- :: checkout-action # generator architecture buildtype shared cflags
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Release' 'OFF' '/MD /O1 /Ob1 /DNDEBUG')
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Release' 'OFF' '/MD /O2 /Ob2 /DNDEBUG')
- :: run-vs-manual-with-flags('${{matrix.gen}}' '${{matrix.arch}}' 'Release' 'OFF' '/MD /O3 /Ob3 /DNDEBUG')

View File

@@ -7,8 +7,8 @@ defn workflow-setup(name=nil overrides={})::
name:: name
defaults:
run:
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
# Use a bash shell so we can use the same syntax for environment
# variable access regardless of the host operating system
shell: bash -e -x {0}
on::
merge _ overrides::
@@ -31,18 +31,28 @@ defn bash(name):
#----------------------------------------------------------
defn setup-job(name)::
# if: always() # https://stackoverflow.com/a/62112985/721703
if:: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip $name')) ||
contains(github.event.head_commit.message, 'only $name')
continue-on-error: true
defn setup-job(workflowname jobname)::
if: always() # https://stackoverflow.com/a/62112985/721703
#if:: |
# ${{
# (
# !contains(github.event.head_commit.message, '[skip all]')
# &&
# !contains(github.event.head_commit.message, '[skip $workflowname]')
# &&
# !contains(github.event.head_commit.message, '[skip $workflowname.$jobname]')
# )
# ||
# contains(github.event.head_commit.message, '[only $workflowname]')
# ||
# contains(github.event.head_commit.message, '[only $workflowname.$jobname]')
# }}
continue-on-error: false
#----------------------------------------------------------
defn runs-on-docker-c4core(which)::
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:: "ghcr.io/biojppm/c4core/ubuntu$which:latest"
@@ -172,7 +182,7 @@ version-discover =::
export SRC_VERSION=$SRC_VERSION
EOF
- name: Save vars.sh
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with: {name: vars.sh, path: ./vars.sh}
- name: Show vars.sh
run: cat vars.sh
@@ -185,7 +195,7 @@ version-discover =::
version-get-vars =::
- name: Download vars.sh
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with: {name: vars.sh, path: ./}
- name: Show vars.sh
run: cat vars.sh
@@ -237,3 +247,78 @@ run-steps =::
run: source .github/setenv.sh && c4_run_test shared32
- name: shared32-pack
run: source .github/setenv.sh && c4_package shared32
#----------------------------------------------------------
defn run-gcc-manual-with-flags(buildtype flags=""):
run-manual-with-flags('g++' 'gcc' buildtype flags)
defn run-clang-manual-with-flags(buildtype flags=""):
run-manual-with-flags('clang++' 'clang' buildtype flags)
defn run-manual-with-flags(cxx cc buildtype flags="")::
# $(buildtype:uc)
# also in that case you could $uc(buildtype)
# $(<expr>) is the more general syntax for any expr
# $name and ${name} for simple var expansion
# those are the 4 interpolation forms
- name:: "---------------------------------------------------------"
run:: |
echo "$buildtype ::: $flags"
- name:: "configure $buildtype ::: $flags"
run:: |
rm -rf build/$buildtype
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/$buildtype \
-DCMAKE_CXX_COMPILER=$cxx-${{matrix.cxx}} \
-DCMAKE_C_COMPILER=$cc-${{matrix.cxx}} \
-DCMAKE_BUILD_TYPE=$buildtype \
-DCMAKE_CXX_FLAGS_$(buildtype:uc)="$flags" \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_VALGRIND=${{matrix.vg}} \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name:: "build $buildtype ::: $flags"
run:: |
cmake --build build/$buildtype --target ryml-test-build --parallel --verbose
- name:: "run $buildtype ::: $flags"
run:: |
cmake --build build/$buildtype --target ryml-test-run
defn run-vs-manual-with-flags(gen arch buildtype shared flags="")::
- name:: "---------------------------------------------------------"
run:: |
echo "$buildtype ::: $flags shared=$shared"
- name:: "configure $buildtype ::: $flags shared=$shared"
# WATCHOUT: the flags require a leading space, or
# git bash will interpret the first / as the root path
# and wrongly expand it to c:/Program Files/git/
run:: |
rm -rf build/$buildtype
export C4_EXTERN_DIR=`pwd`/build/extern
cmake -S . -B build/$buildtype \
-G "$gen" -A $arch \
-DCMAKE_BUILD_TYPE=$buildtype \
-DCMAKE_CXX_FLAGS_$(buildtype:uc)=" $flags" \
-DCMAKE_C_FLAGS_$(buildtype:uc)=" $flags" \
-DBUILD_SHARED_LIBS=$shared \
-DC4_CXX_STANDARD=${{matrix.std}} \
-DRYML_CXX_STANDARD=${{matrix.std}} \
-DRYML_BUILD_TESTS=ON \
-DRYML_DEV=ON \
-DRYML_BUILD_BENCHMARKS=OFF \
-DRYML_DBG=OFF
- name:: "build $buildtype ::: $flags shared=$shared"
run:: |
cmake --build build/$buildtype --target ryml-test-build --parallel --verbose
- name:: "run $buildtype ::: $flags shared=$shared"
run:: |
cmake --build build/$buildtype --target ryml-test-run

View File

@@ -95,6 +95,12 @@ c4_download_remote_proj(rapidjson rapidjson_dir
GIT_REPOSITORY https://github.com/Tencent/rapidjson
GIT_TAG version1.1.0)
set(RYML_RAPIDJSON_INC_DIR ${rapidjson_dir}/include)
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/rapidjson.was.patched)
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "cd ${rapidjson_dir} ; git --git-dir= apply ${CMAKE_CURRENT_LIST_DIR}/rapidjson.fix.diff"
COMMAND git --git-dir= apply ${CMAKE_CURRENT_LIST_DIR}/rapidjson.fix.diff
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/rapidjson.was.patched
WORKING_DIRECTORY ${rapidjson_dir})
endif()
# sajson is header only
set(sajson_dir ${_ed}/sajson)

13
bm/rapidjson.fix.diff Normal file
View File

@@ -0,0 +1,13 @@
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
index e3e20dfb..2b6ccad9 100644
--- a/include/rapidjson/document.h
+++ b/include/rapidjson/document.h
@@ -316,7 +316,7 @@ struct GenericStringRef {
GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+ //GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
//! implicit conversion to plain CharType pointer
operator const Ch *() const { return s; }

View File

@@ -299,10 +299,10 @@ if(RYML_TEST_FUZZ)
function(ryml_add_fuzz_test name)
c4_add_executable(ryml-test-fuzz-${name}
SOURCES
test_fuzz/test_fuzz_common.hpp
test_fuzz/test_fuzz_${name}.cpp
test_fuzz/test_fuzz_main.cpp
${ARGN}
test_fuzz/test_fuzz_common.hpp
test_fuzz/test_fuzz_${name}.cpp
test_fuzz/test_fuzz_main.cpp
${ARGN}
INC_DIRS ${CMAKE_CURRENT_LIST_DIR}
LIBS ryml c4fs
FOLDER test/fuzz)
@@ -315,6 +315,7 @@ if(RYML_TEST_FUZZ)
string(REPLACE "/" "_" fuzz_name "${file}")
add_test(NAME ryml-test-fuzz-${name_}-${fuzz_name}
COMMAND ${tgtexe} ${dir}/${file})
set_tests_properties(ryml-test-fuzz-${name_}-${fuzz_name} PROPERTIES TIMEOUT 10)
endfunction()
foreach(fuzz_file ${fuzz_files})
ryml_add_fuzz_test_file(${name} ${corpus_artifacts_dir} ${fuzz_file})