From 909fec4604b9e812b369924b7b944ff54fdf44c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Fri, 27 Dec 2024 18:39:36 -0500 Subject: [PATCH 01/22] Generate GHA workflow files from originals Moved original .github/workflows/*.yml files to a new dir called .github/workflows-ys/ Added a Makefile to the new directory. Running `make build` from there will generate the workflows/*.yml files from workflows-src/*.yml files using YAMLScript. Plain YAML files are valid YAMLScript, so these newly generated files should work the same. The generated files have no comments and are formatted according to ys default rules. From here forward, changes to the workflows-src files should not produce any changes to the workflow files. This allows us to progressively refactor the workflow-src files and be sure no bad side effects have happened. --- .github/workflows-src/Makefile | 22 + .github/workflows-src/README.md | 17 + .github/workflows-src/benchmarks.yml | 147 ++++ .github/workflows-src/clang.yml | 325 ++++++++ .github/workflows-src/clang_tidy.yml | 73 ++ .github/workflows-src/codeql.yml | 44 ++ .github/workflows-src/coverage.yml | 101 +++ .github/workflows-src/emscripten.yml | 75 ++ .github/workflows-src/gcc.yml | 427 +++++++++++ .github/workflows-src/install.yml | 105 +++ .github/workflows-src/macosx.yml | 74 ++ .github/workflows-src/rarearchs.yml | 123 +++ .github/workflows-src/release.yml | 371 +++++++++ .github/workflows-src/samples.yml | 60 ++ .github/workflows-src/windows.yml | 130 ++++ .github/workflows/benchmarks.yml | 277 ++++--- .github/workflows/clang.yml | 797 +++++++++++++------- .github/workflows/clang_tidy.yml | 145 ++-- .github/workflows/codeql.yml | 54 +- .github/workflows/coverage.yml | 146 ++-- .github/workflows/emscripten.yml | 112 +-- .github/workflows/gcc.yml | 1043 +++++++++++++++++--------- .github/workflows/install.yml | 343 +++++++-- .github/workflows/macosx.yml | 153 ++-- .github/workflows/rarearchs.yml | 229 +++--- .github/workflows/release.yml | 679 +++++++++-------- .github/workflows/samples.yml | 88 ++- .github/workflows/windows.yml | 206 ++--- 28 files changed, 4781 insertions(+), 1585 deletions(-) create mode 100644 .github/workflows-src/Makefile create mode 100644 .github/workflows-src/README.md create mode 100644 .github/workflows-src/benchmarks.yml create mode 100644 .github/workflows-src/clang.yml create mode 100644 .github/workflows-src/clang_tidy.yml create mode 100644 .github/workflows-src/codeql.yml create mode 100644 .github/workflows-src/coverage.yml create mode 100644 .github/workflows-src/emscripten.yml create mode 100644 .github/workflows-src/gcc.yml create mode 100644 .github/workflows-src/install.yml create mode 100644 .github/workflows-src/macosx.yml create mode 100644 .github/workflows-src/rarearchs.yml create mode 100644 .github/workflows-src/release.yml create mode 100644 .github/workflows-src/samples.yml create mode 100644 .github/workflows-src/windows.yml diff --git a/.github/workflows-src/Makefile b/.github/workflows-src/Makefile new file mode 100644 index 000000000..3934221b2 --- /dev/null +++ b/.github/workflows-src/Makefile @@ -0,0 +1,22 @@ +SHELL := bash + +SRC_FILES := $(wildcard *.yml) +TARGET_FILES := $(SRC_FILES:%=../workflows/%) + +YS_VERSION := 0.1.87 +YS_PREFIX := /tmp/rapidyaml +YS := $(YS_PREFIX)/bin/ys-$(YS_VERSION) + + +default: + +build: $(TARGET_FILES) + +../workflows/%: % $(YS) + @echo "# DO NOT EDIT - GENERATED FROM .github/workflows-ys/$<" > $@ + @echo >> $@ + $(YS) -Y $< >> $@ + +$(YS): + curl -s https://yamlscript.org/install | \ + BIN=1 VERSION=$(YS_VERSION) PREFIX=$(YS_PREFIX) bash diff --git a/.github/workflows-src/README.md b/.github/workflows-src/README.md new file mode 100644 index 000000000..09ed302c7 --- /dev/null +++ b/.github/workflows-src/README.md @@ -0,0 +1,17 @@ +.github/workflows +================= + +Source files for generating `.github/workflows/*.yml` files. + + +## Synopsis + +```bash +$ make build +``` + + +## Description + +Edit files in this directory and run `make build` to generate the files used by +GitHub Actions. diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml new file mode 100644 index 000000000..dbe9f5cba --- /dev/null +++ b/.github/workflows-src/benchmarks.yml @@ -0,0 +1,147 @@ +name: benchmarks + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +jobs: + + gettag: + runs-on: ubuntu-latest + steps: + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run: | + # https://github.community/t/how-to-get-just-the-tag-name/16241/11 + SRC_TAG=${GITHUB_REF#refs/tags/} + SRC_VERSION=${GITHUB_REF#refs/tags/v} + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: | + set -x + branch_name=${GITHUB_REF#refs/heads/} + # builds triggered from PRs have the branch_name like this: refs/pull/150/merge + # so filter to eg pr0150_merge + branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` + # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar + branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` + git config --global --add safe.directory $(pwd) + SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 + SRC_VERSION="${branch_name}-${SRC_TAG}" + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Verify vars.sh + run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + - name: Save vars.sh + uses: actions/upload-artifact@v3 + with: {name: vars.sh, path: ./vars.sh} + + benchmarks: + name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{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 + 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} + # + - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} + - {std: 20, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} + #- {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} + #- {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} + # + - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} + env: {BM: ON, 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: + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: Install python 3.10 for plotting + uses: actions/setup-python@v5 + with: { python-version: '3.10' } + - name: install benchmark plotting dependencies + run: | + 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: shared64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run} + - {name: shared64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot} + - name: static64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run} + - {name: static64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot} + - name: static32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run} + - {name: static32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot} + - name: shared32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run} + - {name: shared32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot} + - name: gather benchmark results + run: | + set -x + source vars.sh + echo SRC_TAG=$SRC_TAG + echo SRC_VERSION=$SRC_VERSION + desc=$SRC_TAG + for bl in ${{matrix.bitlinks}} ; do + dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g') + mkdir -p $dst + find build -name bm-results + mv -vf build/$bl/bm/bm-results/* $dst/. + done + - name: upload benchmark result artifacts + uses: actions/upload-artifact@v3 + with: + name: ryml-benchmark_results + path: ryml-benchmark_results/ diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml new file mode 100644 index 000000000..bca66f6c4 --- /dev/null +++ b/.github/workflows-src/clang.yml @@ -0,0 +1,325 @@ +name: clang + +defaults: + #if: "!contains(github.event.head_commit.message, 'skip ci')" # SKIP + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +jobs: + + #---------------------------------------------------------------------------- + clang_canary: + name: clang_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 20, cxx: clang++-17 , 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, bt: Release, 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}}"} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - 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} + + #---------------------------------------------------------------------------- + clang_tabtokens: + name: clang_tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 20, cxx: clang++-17 , 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, bt: Release, bitlinks: shared64 static32} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", + CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", + VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - run: c4core-install $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} + + #---------------------------------------------------------------------------- + clang_noexceptions: + name: clang_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 20, cxx: clang++-17 , 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 , bt: Release, bitlinks: shared64 static32} + env: {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, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - 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} + + #---------------------------------------------------------------------------- + clang_extended: + name: clang_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: clang++-17 , bt: Debug , vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-17 , bt: Release, vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-16 , bt: Debug , vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-16 , bt: Release, vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-15 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 + - {std: 11, cxx: clang++-15 , bt: Release, vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 + - {std: 11, cxx: clang++-14 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 + - {std: 11, cxx: clang++-14 , bt: Release, vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 + - {std: 11, cxx: clang++-13 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-13 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-12 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-12 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-11 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-11 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-10 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-10 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-9 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-9 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-8 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-8 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-7 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-7 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-6.0, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-6.0, bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-5.0, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-5.0, bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-4.0, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-4.0, bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-3.9, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-3.9, bt: Release, vg: on, img: ubuntu18.04} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #... so we checkout manually: + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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} + + #---------------------------------------------------------------------------- + clangsan: + name: clang/${{matrix.bt}}/c++${{matrix.std}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 11, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 11, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 11, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - 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} + + #---------------------------------------------------------------------------- +# # https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/ +# static_analysis: +# continue-on-error: true +# if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct +# runs-on: ${{matrix.os}} +# strategy: +# fail-fast: false +# matrix: +# include: +# # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism +# - {std: 11, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 11, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# - {std: 14, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 14, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# - {std: 17, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# - {std: 20, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} +# steps: +# - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} +# - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 +# - {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: clang-tidy, run: cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*" ../path/to/source} +# - {name: cppcheck, run: cmake "-DCMAKE_CXX_CPPCHECK=/usr/bin/cppcheck;--std=c++11" ../path/to/source} +# - {name: cpplint, run: cmake "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=179" ..} +# - {name: include-what-you-use, run: cmake "-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu;--transitive_includes_only" ..} +# - {name: link-what-you-use, run: cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..} diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml new file mode 100644 index 000000000..ef5c6ccf2 --- /dev/null +++ b/.github/workflows-src/clang_tidy.yml @@ -0,0 +1,73 @@ +name: clang_tidy + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +jobs: + + #---------------------------------------------------------------------------- + clang_tidy: + name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + # clang tidy takes a long time, so don't do multiple bits/linktypes + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared64} + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared32} + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static64} + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static32} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared64} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared32} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static64} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: 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}}"} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - 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} diff --git a/.github/workflows-src/codeql.yml b/.github/workflows-src/codeql.yml new file mode 100644 index 000000000..6e0d59a3d --- /dev/null +++ b/.github/workflows-src/codeql.yml @@ -0,0 +1,44 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: "41 14 * * 5" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ cpp ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql.yml + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows-src/coverage.yml b/.github/workflows-src/coverage.yml new file mode 100644 index 000000000..d2e7872c3 --- /dev/null +++ b/.github/workflows-src/coverage.yml @@ -0,0 +1,101 @@ +name: coverage + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +jobs: + + #---------------------------------------------------------------------------- + coverage: + name: coverage/c++${{matrix.std}}${{matrix.cmk}} + 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 + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} + - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} + # test also with the debug code enabled + - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} + - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} + 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}}", + CMAKE_FLAGS: "${{matrix.cmk}}", + CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}", + COVERALLS_REPO_TOKEN: "${{secrets.COVERALLS_REPO_TOKEN}}", + # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + # https://docs.coveralls.io/parallel-build-webhook + #COVERALLS_PARALLEL: true + } + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {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: 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_build_target static64 ryml-coverage} + - name: static64-coverage-artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage-static64 + path: | + build/static64/lcov/ + build/static64/coverage3-final_filtered.lcov + - {name: static64-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static64 codecov} + # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + #- {name: static64-submit-coveralls, run: "if [ \"${{matrix.std}}\" == \"17\" ] ; then ( source .github/setenv.sh && c4_submit_coverage static64 coveralls ) ; fi" } + - 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_build_target static32 ryml-coverage} + - name: static32-coverage-artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage-static32-cxx${{matrix.std}} + path: | + build/static32/lcov + build/static32/coverage3-final_filtered.lcov + - {name: static32-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static32 codecov} + # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + #- {name: static32-submit-coveralls, run: source .github/setenv.sh && c4_submit_coverage static32 coveralls} + + # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + # https://github.com/lemurheavy/coveralls-public/issues/1665 + #coveralls_finish: + # needs: [coverage] + # runs-on: ubuntu-latest + # steps: + # - name: coveralls-notify + # #continue-on-error: true + # uses: coverallsapp/github-action@master + # with: + # github-token: ${{ secrets.github_token }} + # parallel-finished: true + diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml new file mode 100644 index 000000000..313d52422 --- /dev/null +++ b/.github/workflows-src/emscripten.yml @@ -0,0 +1,75 @@ +name: emscripten + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: '-DRYML_TEST_SUITE=OFF' + NUM_JOBS_BUILD: # 4 + EMSCRIPTEN_CACHE_FOLDER: 'emsdk-cache' + +jobs: + + #---------------------------------------------------------------------------- + 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: + if: ${{ false }} + #if: | + # (!contains(github.event.head_commit.message, 'skip all')) || + # (!contains(github.event.head_commit.message, 'skip emscripten')) || + # contains(github.event.head_commit.message, 'only emscripten') + name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + include: + #- {std: 11, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 11, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} + #- {std: 20, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 20, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} + #- {std: 11, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 11, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} + #- {std: 20, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 20, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: 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}}" + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: setup emscripten cache + id: cache-system-libraries + uses: actions/cache@v4 + with: {path: "${{env.EMSCRIPTEN_CACHE_FOLDER}}", key: "${{matrix.emver}}-${{runner.os}}"} + - name: setup emscripten + uses: mymindstorm/setup-emsdk@v11 + with: {version: "${{matrix.emver}}", actions-cache-folder: "${{env.EMSCRIPTEN_CACHE_FOLDER}}"} + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - 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} diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml new file mode 100644 index 000000000..de2b2d09b --- /dev/null +++ b/.github/workflows-src/gcc.yml @@ -0,0 +1,427 @@ +name: gcc + +defaults: + #if: "!contains(github.event.head_commit.message, 'skip ci')" # SKIP + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +jobs: + + #---------------------------------------------------------------------------- + gcc_canary: + name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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} + + #---------------------------------------------------------------------------- + gcc_O2: # see https://github.com/biojppm/rapidyaml/issues/440 + name: gcc_O2/${{matrix.cxx}}/c++${{matrix.std}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + 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, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - 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: + name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", + CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", + VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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} + + #---------------------------------------------------------------------------- + gcc_noexceptions: + name: gcc_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: g++-5, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-5, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 20, cxx: g++-14, bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14, bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + env: {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: + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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} + + #---------------------------------------------------------------------------- + gcc_extended: + name: gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + # VALGRIND + - {std: 11, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 11, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + - {std: 14, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 14, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + - {std: 17, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 17, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + - {std: 20, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 20, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + # + - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-11 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-11 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-10 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-10 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-9 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-9 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-8 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-8 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-7 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-7 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-6 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-6 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-4.9, bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-4.9, bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Release, img: ubuntu18.04} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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} + + #---------------------------------------------------------------------------- + gccsan: + name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 11, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 11, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 11, cxx: g++-14, bt: ubsan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: ubsan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: ubsan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: ubsan, bitlinks: static64} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - 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} + + #---------------------------------------------------------------------------- + arm: + continue-on-error: true + if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + runs-on: ubuntu-latest + container: ghcr.io/biojppm/c4core/ubuntu18.04:latest # use the docker image + strategy: + fail-fast: false + matrix: + include: + # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism + - {std: 11, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 11, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 14, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 14, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 17, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 17, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + env: {TOOLCHAIN: "${{matrix.toolchain}}", STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - name: install gcc-arm-linux-gnueabihf + run: | + c4core-install arm-linux-gnueabihf + c4core-install qemu + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test arm + - {name: build, run: source .github/setenv.sh && c4_build_test arm} + - {name: run, run: source .github/setenv.sh && c4_run_test arm} + - {name: pack, run: source .github/setenv.sh && c4_package arm} diff --git a/.github/workflows-src/install.yml b/.github/workflows-src/install.yml new file mode 100644 index 000000000..e72f670ac --- /dev/null +++ b/.github/workflows-src/install.yml @@ -0,0 +1,105 @@ +name: test_install + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: + NUM_JOBS_BUILD: # 4 + +jobs: + + #---------------------------------------------------------------------------- + install_tests: + if: | + (!contains(github.event.head_commit.message, 'skip all')) || + (!contains(github.event.head_commit.message, 'skip test_install')) || + contains(github.event.head_commit.message, 'only test_install') + name: ${{matrix.name}}/${{matrix.bt}} + continue-on-error: true + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + include: + - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + # + - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + # + - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: , commonvars: } + - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: , commonvars: } + - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: , commonvars: } + - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } + - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: , commonvars: } + - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } + env: + CXX_: "${{matrix.cxx}}" + BT: "${{matrix.bt}}" + OS: "${{matrix.os}}" + BDIR: "build/${{matrix.name}}-${{matrix.bt}}" + IDIR: "install/${{matrix.name}}-${{matrix.bt}}" + PDIR: "prefix/${{matrix.name}}-${{matrix.bt}}" + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {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: Install python 3.9 + uses: actions/setup-python@v5 + with: { python-version: 3.9 } + - name: preinstall + run: | + if [ "${{matrix.sdir}}" == "test/test_install" ] ; then + mkdir -p $BDIR-staging + cmake -S . -B $BDIR-staging -DCMAKE_INSTALL_PREFIX=$PDIR -DCMAKE_BUILD_TYPE=${{matrix.bt}} ${{matrix.gen}} ${{matrix.commonvars}} + cmake --build $BDIR-staging --config ${{matrix.bt}} --target ${{matrix.tgt}} -j + cmake --build $BDIR-staging --config ${{matrix.bt}} --target install + fi + - name: configure + run: | + mkdir -p $BDIR + mkdir -p $IDIR + cmake -S ${{matrix.sdir}} -B $BDIR \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=OFF \ + -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ + -DCMAKE_INSTALL_PREFIX=$IDIR \ + ${{matrix.gen}} \ + ${{matrix.vars}} \ + ${{matrix.commonvars}} + - name: build + run: | + cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j + - name: run + run: | + cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml new file mode 100644 index 000000000..a3fee8efe --- /dev/null +++ b/.github/workflows-src/macosx.yml @@ -0,0 +1,74 @@ +name: macosx + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +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 + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 11, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} + # + - {std: 11, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 11, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {name: xcode, uses: maxim-lobanov/setup-xcode@v1, with: {xcode-version: "${{matrix.xcver}}" }} + - {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: 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} diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml new file mode 100644 index 000000000..5b799bb76 --- /dev/null +++ b/.github/workflows-src/rarearchs.yml @@ -0,0 +1,123 @@ +name: rarearchs + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +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') + name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} + continue-on-error: true + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + - {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04} + - {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04} + - {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04} + - {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04} + - {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04} + - {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04} + # + - {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04} + - {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04} + - {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04} + - {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04} + - {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04} + # + - {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04} + - {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04} + - {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04} + - {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04} + - {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04} + - {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04} + # + #- {std: 11, bt: Debug , arch: armv6 , distro: bullseye} + #- {std: 11, bt: Release, arch: armv6 , distro: bullseye} + #- {std: 14, bt: Debug , arch: armv6 , distro: bullseye} + #- {std: 14, bt: Release, arch: armv6 , distro: bullseye} + #- {std: 17, bt: Debug , arch: armv6 , distro: bullseye} + #- {std: 17, bt: Release, arch: armv6 , distro: bullseye} + # + #- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04} + #- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04} + #- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04} + #- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04} + #- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04} + #- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: test + uses: uraimo/run-on-arch-action@v2.7.2 + with: + arch: ${{matrix.arch}} + distro: ${{matrix.distro}} + install: | + set -x + start_time=$SECONDS + time apt-get update -y + time apt-get install -y \ + git \ + build-essential + # arm platforms need an up-to-date cmake: + # https://gitlab.kitware.com/cmake/cmake/-/issues/20568 + if [ "${{matrix.arch}}" == "armv6" ] || [ "${{matrix.arch}}" == "armv7" ] ; then + time apt-get install -y \ + gpg \ + wget \ + apt-transport-https + wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null + time apt-get update -y + rm /usr/share/keyrings/kitware-archive-keyring.gpg + time apt-get install kitware-archive-keyring + time apt-get update -y + fi + time apt-get install -y cmake cmake-data + cmake --version + echo "install took $((SECONDS - start_time))" + run: | + set -x + start_time=$SECONDS + uname -a + pwd + ls -lFhp . + # + bdir=build_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} + idir=install_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} + mkdir -p $bdir + # + time cmake -S . -B $bdir \ + -DCMAKE_INSTALL_PREFIX=$idir \ + -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DCXX_STANDARD=${{matrix.std}} \ + -DRYML_DEV=ON \ + -DRYML_TEST_SUITE=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_SANITIZE=OFF \ + -DRYML_LINT=OFF \ + -DRYML_VALGRIND=OFF + # + time cmake --build $bdir -j 3 --target ryml-test-build + # + time cmake --build $bdir -j 3 --target ryml-test-run + echo "run took $((SECONDS - start_time))" diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml new file mode 100644 index 000000000..c64856df1 --- /dev/null +++ b/.github/workflows-src/release.yml @@ -0,0 +1,371 @@ +name: release + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + tags: + - v0.* + - v1.* + - v2.* + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PKG_NAME: rapidyaml- + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=OFF + NUM_JOBS_BUILD: # 4 + + +# useful to iterate when fixing the release: +# ver=0.2.1 ; ( set -x ; git tag -d v$ver ; git push origin :v$ver ) ; (set -x ; set -e ; tbump --only-patch --non-interactive $ver ; git add -u ; git commit --amend --no-edit ; git tag --annotate --message "v$ver" "v$ver" ; git push -f --tags origin ) + +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') + runs-on: ubuntu-latest + steps: + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run: | + # https://github.community/t/how-to-get-just-the-tag-name/16241/11 + SRC_TAG=${GITHUB_REF#refs/tags/} + SRC_VERSION=${GITHUB_REF#refs/tags/v} + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: | + set -x + branch_name=${GITHUB_REF#refs/heads/} + # builds triggered from PRs have the branch_name like this: refs/pull/150/merge + # so filter to eg pr0150_merge + branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` + # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar + branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` + SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 + SRC_VERSION="${branch_name}-${SRC_TAG}" + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Verify vars.sh + run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + - name: Save vars.sh + uses: actions/upload-artifact@v3 + with: {name: vars.sh, path: ./vars.sh} + + #---------------------------------------------------------------------------- + # create source packages + 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') + needs: gettag + runs-on: ubuntu-latest + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - name: Install python 3.9 + uses: actions/setup-python@v5 + with: { python-version: 3.9 } + - name: Install requirements + run: | + sudo -E pip install git-archive-all + - name: Create source packages + run: | + pwd + ls -lFhp + source vars.sh + echo SRC_TAG=$SRC_TAG + echo SRC_VERSION=$SRC_VERSION + id=${PROJ_PKG_NAME}${SRC_VERSION} + name=${id}-src + mkdir -p assets + git-archive-all --prefix $name assets/$name.tgz + git-archive-all --prefix $name assets/$name.zip + python --version + python tools/amalgamate.py assets/$id.hpp + - name: Save source artifacts + uses: actions/upload-artifact@v3 + with: {name: assets, path: assets} + + #---------------------------------------------------------------------------- + # create c++ packages + 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') + name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} + needs: gettag + runs-on: ${{matrix.config.os}} + env: {DEV: OFF, BT: Release, OS: "${{matrix.config.os}}", CXX_: "${{matrix.config.cxx}}", GEN: "${{matrix.config.gen}}"} + strategy: + fail-fast: false + matrix: + config: + # name of the artifact | suffix (gen) | suffix (package) | cpack gen | mime type | os | cxx + - {name: Ubuntu 22.04 deb , sfxg: unix64.deb, sfxp: ubuntu-22.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-22.04 } + - {name: Ubuntu 20.04 deb , sfxg: unix64.deb, sfxp: ubuntu-20.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-20.04 } + #- {name: Ubuntu 18.04 deb , sfxg: unix64.deb, sfxp: ubuntu-18.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-18.04 } + - {name: Windows VS2019 zip, sfxg: win64.zip , sfxp: windows-vs2019.zip , gen: ZIP , mime: zip , os: windows-2019, cxx: vs2019} + - {name: MacOSX sh , sfxg: apple64.sh, sfxp: macosx-xcode.sh , gen: STGZ , mime: x-sh , os: macos-13 , cxx: xcode } + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - {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_target shared64} + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 $GEN + - name: shared64-normalize + run: | + set -x + source vars.sh + mkdir -p assets + asset_src=`ls -1 ./build/shared64/*-${{matrix.config.sfxg}}` + asset_dst=./assets/${PROJ_PKG_NAME}${SRC_VERSION}-${{matrix.config.sfxp}} + [ ! -f $asset_src ] && exit 1 + cp -fav $asset_src $asset_dst + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: {name: assets, path: assets} + + #---------------------------------------------------------------------------- + # create python packages + # adapted from https://github.com/pikepdf/pikepdf/blob/master/.github/workflows/build_wheels.yml + + 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') + name: python/src + runs-on: ubuntu-latest + steps: + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: install python 3.9 + uses: actions/setup-python@v5 + with: { python-version: 3.9 } + - name: package python src packages + run: | + python --version + pip install -v -r requirements.txt + python setup.py sdist --formats=zip + - name: normalize src package names + run: | + sdist_orig=`find dist -type f -name 'rapidyaml-*.zip'` + [ ! -f $sdist_orig ] && exit 1 + sdist=`echo $sdist_orig | sed 's:\.zip:-python_src.zip:'` + mv -fv $sdist_orig $sdist + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: {name: dist, path: dist} + + python_wheels: + if: | + (!contains(github.event.head_commit.message, 'skip all')) || + (!contains(github.event.head_commit.message, 'skip release')) || + contains(github.event.head_commit.message, 'only release') + name: python/${{matrix.config.cibw_pyv}}/${{matrix.config.osname}}/${{matrix.config.cibw_arch}} + 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}}" + CIBW_ARCHS: "${{matrix.config.cibw_arch}}" + strategy: + fail-fast: false + matrix: + config: + # the 3-digit versions NEED to be quoted to prevent the version being read as float. (!) + #- {pythonv: '3.13', cibw_pyv: 313, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + #- {pythonv: '3.13', cibw_pyv: 313, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + - {pythonv: '3.12', cibw_pyv: 312, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + - {pythonv: '3.12', cibw_pyv: 312, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + - {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + - {pythonv: '3.11', cibw_pyv: 311, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + - {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + - {pythonv: '3.10', cibw_pyv: 310, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + - {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + - {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + - {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + - {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + - {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + - {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + - {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} + - {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + # the windows builds are disabled because they are causing problems and preventing the release. + # the problems are related to CMakeExtension forcing the use of Ninja + # which does not play well with the -G 'Visual Studio...' option used below. + # fixing this looks like it will be time-intensive. + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + ## macosx builds are generating a SIGSEGV when importing. (!) + ## https://github.com/biojppm/rapidyaml/actions/runs/3062528713/jobs/4943611397#step:7:269 + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + steps: + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: create wheel + uses: pypa/cibuildwheel@v2.17 + - name: rename wheelhouse -> dist + run: | + mv -fv wheelhouse dist + ls -lFhp dist/ + - name: Save artifacts for publishing to PyPI + uses: actions/upload-artifact@v3 + with: {name: dist, 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: | + 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 + + + #---------------------------------------------------------------------------- + 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') + runs-on: ubuntu-latest + needs: + - src + - cpp + - python_src + - python_wheels + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - 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/ + ls -lFhp dist/ + # + # Github + - name: Restore vars.sh + if: contains(github.ref, 'tags/v') + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - name: Save vars for following steps + if: contains(github.ref, 'tags/v') + id: vars + run: | + source vars.sh + version_body=${{github.workspace}}/changelog/$SRC_VERSION.md + if [ ! -f $version_body ] ; then + echo "version body file was not found: $version_body" + exit 1 + fi + echo "VERSION=$SRC_VERSION >> $GITHUB_OUTPUT" + echo "VERSION_BODY=$version_body >> $GITHUB_OUTPUT" + - name: Move Python packages to assets folder + if: contains(github.ref, 'tags/v') + run: mv -fv dist/*src.zip assets/. + - name: Create Github Release + if: contains(github.ref, 'tags/v') + id: create_release + uses: actions/create-release@v1 + env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } + with: + tag_name: ${{github.ref}} + release_name: Release ${{steps.vars.outputs.VERSION}} + body_path: ${{steps.vars.outputs.VERSION_BODY}} + draft: true + prerelease: ${{contains(github.ref, 'rc')}} + - name: Upload assets to Github Release + if: contains(github.ref, 'tags/v') + uses: dwenegar/upload-release-assets@v1 + env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } + with: + release_id: ${{steps.create_release.outputs.id}} + assets_path: ./assets/ + # + # PyPI (test) + - name: Publish python packages to test PyPI + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + repository_url: https://test.pypi.org/legacy/ + user: __token__ + password: ${{secrets.PYPI_TOKEN_TEST}} + verbose: true + skip_existing: true + # + # PyPI (production) + - name: Publish python packages to production PyPI + if: contains(github.ref, 'tags/v') + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{secrets.PYPI_TOKEN}} + verbose: true diff --git a/.github/workflows-src/samples.yml b/.github/workflows-src/samples.yml new file mode 100644 index 000000000..e811d8346 --- /dev/null +++ b/.github/workflows-src/samples.yml @@ -0,0 +1,60 @@ +name: samples + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + +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 + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + include: + - {bt: Debug , os: ubuntu-20.04} + - {bt: Release, os: ubuntu-20.04} + - {bt: Debug , os: windows-2019} + - {bt: Release, os: windows-2019} + - {bt: Debug , os: macos-latest} + - {bt: Release, os: macos-latest} + 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}}", + CMANY: ON, RYMLSHA: "${{github.event.pull_request.head.sha}}" } + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0 } } # use fetch-depth to ensure all tags are fetched + - {name: python3, uses: actions/setup-python@v5, with: {python-version: 3.9}} + - {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: singleheader, run: cd samples/singleheader && ./run.sh $BT } + - {name: singleheaderlib-static, run: cd samples/singleheaderlib && ./run_static.sh $BT } + - {name: singleheaderlib-shared, run: cd samples/singleheaderlib && ./run_shared.sh $BT } + - {name: add_subdirectory, run: cd samples/add_subdirectory && ./run.sh $BT } + - {name: find_package, run: cd samples/find_package && ./run.sh $BT } + - {name: custom_c4core, run: cd samples/custom_c4core && ./run.sh $BT } + - {name: fetch_content, run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA } diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml new file mode 100644 index 000000000..3fa2d1618 --- /dev/null +++ b/.github/workflows-src/windows.yml @@ -0,0 +1,130 @@ +name: windows + +defaults: + run: + # 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: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +jobs: + vs: + name: ${{matrix.cxx}}/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: + # vs2017 is only availble in windows-2016 + #- {std: 11, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} + #- {std: 11, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} + #- {std: 14, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} + #- {std: 14, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} + # + - {std: 11, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} + - {std: 11, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} + - {std: 17, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} + - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} + # + - {std: 11, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} + - {std: 11, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} + - {std: 17, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} + - {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} + - {std: 20, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} + - {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}}"} + steps: + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {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: 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} + +# 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: {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, 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} diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index dbe9f5cba..c7f261867 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,68 +1,65 @@ -name: benchmarks +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/benchmarks.yml +name: benchmarks defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - - + NUM_JOBS_BUILD: null jobs: - gettag: runs-on: ubuntu-latest steps: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - name: Variables (from tag) - if: contains(github.ref, 'tags/v') - run: | - # https://github.community/t/how-to-get-just-the-tag-name/16241/11 - SRC_TAG=${GITHUB_REF#refs/tags/} - SRC_VERSION=${GITHUB_REF#refs/tags/v} - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF - - name: Variables (from commit, no tag) - if: ${{ !contains(github.ref, 'tags/v') }} - run: | - set -x - branch_name=${GITHUB_REF#refs/heads/} - # builds triggered from PRs have the branch_name like this: refs/pull/150/merge - # so filter to eg pr0150_merge - branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` - # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar - branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` - git config --global --add safe.directory $(pwd) - SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 - SRC_VERSION="${branch_name}-${SRC_TAG}" - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF - - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - - name: Save vars.sh - uses: actions/upload-artifact@v3 - with: {name: vars.sh, path: ./vars.sh} - + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run: | + # https://github.community/t/how-to-get-just-the-tag-name/16241/11 + SRC_TAG=${GITHUB_REF#refs/tags/} + SRC_VERSION=${GITHUB_REF#refs/tags/v} + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: | + set -x + branch_name=${GITHUB_REF#refs/heads/} + # builds triggered from PRs have the branch_name like this: refs/pull/150/merge + # so filter to eg pr0150_merge + branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` + # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar + branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` + git config --global --add safe.directory $(pwd) + SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 + SRC_VERSION="${branch_name}-${SRC_TAG}" + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Verify vars.sh + run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + - name: Save vars.sh + uses: actions/upload-artifact@v3 + with: + name: vars.sh + path: ./vars.sh benchmarks: name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}} needs: gettag @@ -76,72 +73,122 @@ jobs: 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} - # - - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} - - {std: 20, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} - #- {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} - #- {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} - # - - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} - env: {BM: ON, STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + - 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 + - std: 17 + cxx: vs2019 + bt: Release + os: windows-2019 + bitlinks: static64 static32 + - std: 20 + cxx: vs2019 + bt: Release + os: windows-2019 + bitlinks: static64 static32 + - std: 17 + cxx: xcode + xcver: 15 + bt: Release + os: macos-13 + bitlinks: static64 + env: + BM: 'ON' + 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: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: Install python 3.10 for plotting - uses: actions/setup-python@v5 - with: { python-version: '3.10' } - - name: install benchmark plotting dependencies - run: | - 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: shared64-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run} - - {name: shared64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot} - - name: static64-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run} - - {name: static64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot} - - name: static32-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run} - - {name: static32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot} - - name: shared32-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run} - - {name: shared32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot} - - name: gather benchmark results - run: | - set -x - source vars.sh - echo SRC_TAG=$SRC_TAG - echo SRC_VERSION=$SRC_VERSION - desc=$SRC_TAG - for bl in ${{matrix.bitlinks}} ; do - dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g') - mkdir -p $dst - find build -name bm-results - mv -vf build/$bl/bm/bm-results/* $dst/. - done - - name: upload benchmark result artifacts - uses: actions/upload-artifact@v3 - with: - name: ryml-benchmark_results - path: ryml-benchmark_results/ + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: install requirements + run: source .github/reqs.sh && c4_install_test_requirements $OS + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: + name: vars.sh + path: ./ + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: Install python 3.10 for plotting + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: install benchmark plotting dependencies + run: | + 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: shared64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run + - name: shared64-plot + run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot + - name: static64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run + - name: static64-plot + run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot + - name: static32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run + - name: static32-plot + run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot + - name: shared32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run + - name: shared32-plot + run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot + - name: gather benchmark results + run: | + set -x + source vars.sh + echo SRC_TAG=$SRC_TAG + echo SRC_VERSION=$SRC_VERSION + desc=$SRC_TAG + for bl in ${{matrix.bitlinks}} ; do + dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g') + mkdir -p $dst + find build -name bm-results + mv -vf build/$bl/bm/bm-results/* $dst/. + done + - name: upload benchmark result artifacts + uses: actions/upload-artifact@v3 + with: + name: ryml-benchmark_results + path: ryml-benchmark_results/ diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index bca66f6c4..c4a12e8f5 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -1,325 +1,592 @@ -name: clang +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/clang.yml +name: clang defaults: - #if: "!contains(github.event.head_commit.message, 'skip ci')" # SKIP run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - - + NUM_JOBS_BUILD: null jobs: - - #---------------------------------------------------------------------------- clang_canary: name: clang_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: fail-fast: false matrix: include: - - {std: 20, cxx: clang++-17 , 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, bt: Release, 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}}"} + - std: 20 + cxx: clang++-17 + 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 + bt: Release + 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}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - run: git config --system --add safe.directory '*' + - run: c4core-install ${{matrix.cxx}} + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: shared64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared64 + - name: shared64-build + run: source .github/setenv.sh && c4_build_test shared64 + - name: shared64-run + run: source .github/setenv.sh && c4_run_test shared64 + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 + - name: static64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static64 + - name: static64-build + run: source .github/setenv.sh && c4_build_test static64 + - name: static64-run + run: source .github/setenv.sh && c4_run_test static64 + - name: static64-pack + run: source .github/setenv.sh && c4_package static64 + - name: static32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static32 + - name: static32-build + run: source .github/setenv.sh && c4_build_test static32 + - name: static32-run + run: source .github/setenv.sh && c4_run_test static32 + - name: static32-pack + run: source .github/setenv.sh && c4_package static32 + - name: shared32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared32 + - name: shared32-build + run: source .github/setenv.sh && c4_build_test shared32 + - name: shared32-run + run: source .github/setenv.sh && c4_run_test shared32 + - name: shared32-pack + run: source .github/setenv.sh && c4_package shared32 clang_tabtokens: name: clang_tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: fail-fast: false matrix: include: - - {std: 20, cxx: clang++-17 , 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, bt: Release, bitlinks: shared64 static32} - env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", - CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", - VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + - std: 20 + cxx: clang++-17 + 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 + bt: Release + bitlinks: shared64 static32 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - run: c4core-install $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: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - run: git config --system --add safe.directory '*' + - run: c4core-install $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 clang_noexceptions: name: clang_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: fail-fast: false matrix: include: - - {std: 20, cxx: clang++-17 , 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 , bt: Release, bitlinks: shared64 static32} - env: {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}}"} + - std: 20 + cxx: clang++-17 + 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 + bt: Release + bitlinks: shared64 static32 + env: + 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, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - run: git config --system --add safe.directory '*' + - run: c4core-install ${{matrix.cxx}} + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: shared64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared64 + - name: shared64-build + run: source .github/setenv.sh && c4_build_test shared64 + - name: shared64-run + run: source .github/setenv.sh && c4_run_test shared64 + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 + - name: static64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static64 + - name: static64-build + run: source .github/setenv.sh && c4_build_test static64 + - name: static64-run + run: source .github/setenv.sh && c4_run_test static64 + - name: static64-pack + run: source .github/setenv.sh && c4_package static64 + - name: static32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static32 + - name: static32-build + run: source .github/setenv.sh && c4_build_test static32 + - name: static32-run + run: source .github/setenv.sh && c4_run_test static32 + - name: static32-pack + run: source .github/setenv.sh && c4_package static32 + - name: shared32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared32 + - name: shared32-build + run: source .github/setenv.sh && c4_build_test shared32 + - name: shared32-run + run: source .github/setenv.sh && c4_run_test shared32 + - name: shared32-pack + run: source .github/setenv.sh && c4_package shared32 clang_extended: name: clang_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest strategy: fail-fast: false matrix: include: - - {std: 11, cxx: clang++-17 , bt: Debug , vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-17 , bt: Release, vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-16 , bt: Debug , vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-16 , bt: Release, vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-15 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: clang++-15 , bt: Release, vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: clang++-14 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: clang++-14 , bt: Release, vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: clang++-13 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-13 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-12 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-12 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-11 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-11 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-10 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-10 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-9 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-9 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-8 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-8 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-7 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-7 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-6.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-6.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-5.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-5.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-4.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-4.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-3.9, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-3.9, bt: Release, vg: on, img: ubuntu18.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}}"} + - std: 11 + cxx: clang++-17 + bt: Debug + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-17 + bt: Release + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-16 + bt: Debug + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-16 + bt: Release + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-15 + bt: Debug + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-15 + bt: Release + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-14 + bt: Debug + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-14 + bt: Release + vg: 'on' + img: ubuntu22.04 + - std: 11 + cxx: clang++-13 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-13 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-12 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-12 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-11 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-11 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-10 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-10 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-9 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-9 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-8 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-8 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-7 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-7 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-6.0 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-6.0 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-5.0 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-5.0 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-4.0 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-4.0 + bt: Release + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-3.9 + bt: Debug + vg: 'on' + img: ubuntu18.04 + - std: 11 + cxx: clang++-3.9 + bt: Release + vg: 'on' + img: ubuntu18.04 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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 clangsan: name: clang/${{matrix.bt}}/c++${{matrix.std}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: fail-fast: false matrix: include: - - {std: 11, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - 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}}"} + - std: 11 + cxx: clang++-17 + bt: asan + bitlinks: static64 + - std: 14 + cxx: clang++-17 + bt: asan + bitlinks: static64 + - std: 17 + cxx: clang++-17 + bt: asan + bitlinks: static64 + - std: 20 + cxx: clang++-17 + bt: asan + bitlinks: static64 + - std: 11 + cxx: clang++-17 + bt: lsan + bitlinks: static64 + - std: 14 + cxx: clang++-17 + bt: lsan + bitlinks: static64 + - std: 17 + cxx: clang++-17 + bt: lsan + bitlinks: static64 + - std: 20 + cxx: clang++-17 + bt: lsan + bitlinks: static64 + - std: 11 + cxx: clang++-17 + bt: tsan + bitlinks: static64 + - std: 14 + cxx: clang++-17 + bt: tsan + bitlinks: static64 + - std: 17 + cxx: clang++-17 + bt: tsan + bitlinks: static64 + - std: 20 + cxx: clang++-17 + bt: tsan + bitlinks: static64 + - std: 11 + cxx: clang++-17 + bt: ubsan + bitlinks: static64 + - std: 14 + cxx: clang++-17 + bt: ubsan + bitlinks: static64 + - std: 17 + cxx: clang++-17 + bt: ubsan + bitlinks: static64 + - std: 20 + cxx: clang++-17 + bt: ubsan + bitlinks: static64 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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} - - #---------------------------------------------------------------------------- -# # https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/ -# static_analysis: -# continue-on-error: true -# if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct -# runs-on: ${{matrix.os}} -# strategy: -# fail-fast: false -# matrix: -# include: -# # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism -# - {std: 11, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 11, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 14, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 14, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 17, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 20, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} -# steps: -# - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} -# - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 -# - {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: clang-tidy, run: cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*" ../path/to/source} -# - {name: cppcheck, run: cmake "-DCMAKE_CXX_CPPCHECK=/usr/bin/cppcheck;--std=c++11" ../path/to/source} -# - {name: cpplint, run: cmake "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=179" ..} -# - {name: include-what-you-use, run: cmake "-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu;--transitive_includes_only" ..} -# - {name: link-what-you-use, run: cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..} + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - run: git config --system --add safe.directory '*' + - run: c4core-install ${{matrix.cxx}} + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: shared64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared64 + - name: shared64-build + run: source .github/setenv.sh && c4_build_test shared64 + - name: shared64-run + run: source .github/setenv.sh && c4_run_test shared64 + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 + - name: static64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static64 + - name: static64-build + run: source .github/setenv.sh && c4_build_test static64 + - name: static64-run + run: source .github/setenv.sh && c4_run_test static64 + - name: static64-pack + run: source .github/setenv.sh && c4_package static64 + - name: static32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static32 + - name: static32-build + run: source .github/setenv.sh && c4_build_test static32 + - name: static32-run + run: source .github/setenv.sh && c4_run_test static32 + - name: static32-pack + run: source .github/setenv.sh && c4_package static32 + - name: shared32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared32 + - name: shared32-build + run: source .github/setenv.sh && c4_build_test shared32 + - name: shared32-run + run: source .github/setenv.sh && c4_run_test shared32 + - name: shared32-pack + run: source .github/setenv.sh && c4_package shared32 diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index ef5c6ccf2..0a6b1da44 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -1,73 +1,120 @@ -name: clang_tidy +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/clang_tidy.yml +name: clang_tidy defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - - + NUM_JOBS_BUILD: null jobs: - - #---------------------------------------------------------------------------- clang_tidy: name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: fail-fast: false matrix: include: - # clang tidy takes a long time, so don't do multiple bits/linktypes - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static32} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: 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}}"} + - std: 11 + cxx: clang++-17 + bt: Debug + lint: clang-tidy + bitlinks: shared64 + - std: 11 + cxx: clang++-17 + bt: Debug + lint: clang-tidy + bitlinks: shared32 + - std: 11 + cxx: clang++-17 + bt: Debug + lint: clang-tidy + bitlinks: static64 + - std: 11 + cxx: clang++-17 + bt: Debug + lint: clang-tidy + bitlinks: static32 + - std: 11 + cxx: clang++-17 + bt: ReleaseWithDebInfo + lint: clang-tidy + bitlinks: shared64 + - std: 11 + cxx: clang++-17 + bt: ReleaseWithDebInfo + lint: clang-tidy + bitlinks: shared32 + - std: 11 + cxx: clang++-17 + bt: ReleaseWithDebInfo + lint: clang-tidy + bitlinks: static64 + - std: 11 + cxx: clang++-17 + bt: ReleaseWithDebInfo + lint: clang-tidy + bitlinks: 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}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - run: git config --system --add safe.directory '*' + - run: c4core-install ${{matrix.cxx}} + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: shared64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared64 + - name: shared64-build + run: source .github/setenv.sh && c4_build_test shared64 + - name: shared64-run + run: source .github/setenv.sh && c4_run_test shared64 + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 + - name: static64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static64 + - name: static64-build + run: source .github/setenv.sh && c4_build_test static64 + - name: static64-run + run: source .github/setenv.sh && c4_run_test static64 + - name: static64-pack + run: source .github/setenv.sh && c4_package static64 + - name: static32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static32 + - name: static32-build + run: source .github/setenv.sh && c4_build_test static32 + - name: static32-run + run: source .github/setenv.sh && c4_run_test static32 + - name: static32-pack + run: source .github/setenv.sh && c4_package static32 + - name: shared32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared32 + - name: shared32-build + run: source .github/setenv.sh && c4_build_test shared32 + - name: shared32-run + run: source .github/setenv.sh && c4_run_test shared32 + - name: shared32-pack + run: source .github/setenv.sh && c4_package shared32 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6e0d59a3d..1f56aae31 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,13 +1,15 @@ -name: "CodeQL" +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/codeql.yml -on: +name: CodeQL +'on': push: - branches: [ "master" ] + branches: + - master pull_request: - branches: [ "master" ] + branches: + - master schedule: - - cron: "41 14 * * 5" - + - cron: 41 14 * * 5 jobs: analyze: name: Analyze @@ -16,29 +18,25 @@ jobs: actions: read contents: read security-events: write - strategy: fail-fast: false matrix: - language: [ cpp ] - + language: + - cpp steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - config-file: ./.github/codeql.yml - queries: +security-and-quality - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{ matrix.language }}" + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql.yml + queries: +security-and-quality + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: /language:${{ matrix.language }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d2e7872c3..e008cbfb5 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,31 +1,23 @@ -name: coverage +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/coverage.yml +name: coverage defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - - + NUM_JOBS_BUILD: null jobs: - - #---------------------------------------------------------------------------- coverage: name: coverage/c++${{matrix.std}}${{matrix.cmk}} if: | @@ -38,64 +30,72 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} - - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} - # test also with the debug code enabled - - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} - - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} - 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}}", - CMAKE_FLAGS: "${{matrix.cmk}}", - CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}", - COVERALLS_REPO_TOKEN: "${{secrets.COVERALLS_REPO_TOKEN}}", - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - # https://docs.coveralls.io/parallel-build-webhook - #COVERALLS_PARALLEL: true - } + - std: 11 + cxx: g++-9 + bt: Coverage + os: ubuntu-20.04 + - std: 17 + cxx: g++-9 + bt: Coverage + os: ubuntu-20.04 + - std: 11 + cxx: g++-9 + bt: Coverage + os: ubuntu-20.04 + cmk: -DRYML_DBG=ON + - std: 17 + cxx: g++-9 + bt: Coverage + os: ubuntu-20.04 + cmk: -DRYML_DBG=ON + 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}} + CMAKE_FLAGS: ${{matrix.cmk}} + CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} + COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {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: 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_build_target static64 ryml-coverage} - - name: static64-coverage-artifacts - uses: actions/upload-artifact@v3 - with: - name: coverage-static64 - path: | - build/static64/lcov/ - build/static64/coverage3-final_filtered.lcov - - {name: static64-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static64 codecov} - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - #- {name: static64-submit-coveralls, run: "if [ \"${{matrix.std}}\" == \"17\" ] ; then ( source .github/setenv.sh && c4_submit_coverage static64 coveralls ) ; fi" } - - 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_build_target static32 ryml-coverage} - - name: static32-coverage-artifacts - uses: actions/upload-artifact@v3 - with: - name: coverage-static32-cxx${{matrix.std}} - path: | - build/static32/lcov - build/static32/coverage3-final_filtered.lcov - - {name: static32-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static32 codecov} - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - #- {name: static32-submit-coveralls, run: source .github/setenv.sh && c4_submit_coverage static32 coveralls} - - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - # https://github.com/lemurheavy/coveralls-public/issues/1665 - #coveralls_finish: - # needs: [coverage] - # runs-on: ubuntu-latest - # steps: - # - name: coveralls-notify - # #continue-on-error: true - # uses: coverallsapp/github-action@master - # with: - # github-token: ${{ secrets.github_token }} - # parallel-finished: true - + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - 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: 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_build_target static64 ryml-coverage + - name: static64-coverage-artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage-static64 + path: | + build/static64/lcov/ + build/static64/coverage3-final_filtered.lcov + - name: static64-submit-codecov + run: source .github/setenv.sh && c4_submit_coverage static64 codecov + - 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_build_target static32 ryml-coverage + - name: static32-coverage-artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage-static32-cxx${{matrix.std}} + path: | + build/static32/lcov + build/static32/coverage3-final_filtered.lcov + - name: static32-submit-codecov + run: source .github/setenv.sh && c4_submit_coverage static32 codecov diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 313d52422..f321cee0d 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -1,40 +1,26 @@ -name: emscripten +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/emscripten.yml +name: emscripten defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: '-DRYML_TEST_SUITE=OFF' - NUM_JOBS_BUILD: # 4 - EMSCRIPTEN_CACHE_FOLDER: 'emsdk-cache' - + CMAKE_FLAGS: -DRYML_TEST_SUITE=OFF + NUM_JOBS_BUILD: null + EMSCRIPTEN_CACHE_FOLDER: emsdk-cache jobs: - - #---------------------------------------------------------------------------- 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: if: ${{ false }} - #if: | - # (!contains(github.event.head_commit.message, 'skip all')) || - # (!contains(github.event.head_commit.message, 'skip emscripten')) || - # contains(github.event.head_commit.message, 'only emscripten') name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true runs-on: ${{matrix.os}} @@ -42,34 +28,60 @@ jobs: fail-fast: false matrix: include: - #- {std: 11, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 11, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 20, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 20, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 11, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 11, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 20, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 20, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} + - std: 11 + cxx: em++ + emver: 2.0.34 + bt: Release + os: ubuntu-latest + bitlinks: static32 + - std: 20 + cxx: em++ + emver: 2.0.34 + bt: Release + os: ubuntu-latest + bitlinks: static32 + - std: 11 + cxx: em++ + emver: 3.0.0 + bt: Release + os: ubuntu-latest + bitlinks: static32 + - std: 20 + cxx: em++ + emver: 3.0.0 + bt: Release + os: ubuntu-latest + bitlinks: 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}}" + 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, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: setup emscripten cache - id: cache-system-libraries - uses: actions/cache@v4 - with: {path: "${{env.EMSCRIPTEN_CACHE_FOLDER}}", key: "${{matrix.emver}}-${{runner.os}}"} - - name: setup emscripten - uses: mymindstorm/setup-emsdk@v11 - with: {version: "${{matrix.emver}}", actions-cache-folder: "${{env.EMSCRIPTEN_CACHE_FOLDER}}"} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - 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: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: setup emscripten cache + id: cache-system-libraries + uses: actions/cache@v4 + with: + path: ${{env.EMSCRIPTEN_CACHE_FOLDER}} + key: ${{matrix.emver}}-${{runner.os}} + - name: setup emscripten + uses: mymindstorm/setup-emsdk@v11 + with: + version: ${{matrix.emver}} + actions-cache-folder: ${{env.EMSCRIPTEN_CACHE_FOLDER}} + - name: show info + run: source .github/setenv.sh && c4_show_info + - 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 diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index de2b2d09b..32af4108e 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -1,427 +1,768 @@ -name: gcc +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/gcc.yml +name: gcc defaults: - #if: "!contains(github.event.head_commit.message, 'skip ci')" # SKIP run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - - + NUM_JOBS_BUILD: null jobs: - - #---------------------------------------------------------------------------- gcc_canary: name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest strategy: fail-fast: false matrix: include: - - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.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}}"} + - std: 11 + cxx: g++-14 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 11 + cxx: g++-14 + bt: Release + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 20 + cxx: g++-14 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 20 + cxx: g++-14 + bt: Release + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 11 + cxx: g++-5 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 11 + cxx: g++-5 + bt: Release + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 11 + cxx: g++-4.8 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 11 + cxx: g++-4.8 + bt: Release + bitlinks: shared64 static32 + img: ubuntu18.04 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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} - - #---------------------------------------------------------------------------- - gcc_O2: # see https://github.com/biojppm/rapidyaml/issues/440 + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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 + gcc_O2: name: gcc_O2/${{matrix.cxx}}/c++${{matrix.std}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + 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}}"} + - 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, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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 - - #---------------------------------------------------------------------------- + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - 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: name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest strategy: fail-fast: false matrix: include: - - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", - CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", - VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + - std: 11 + cxx: g++-14 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 11 + cxx: g++-14 + bt: Release + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 20 + cxx: g++-14 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 20 + cxx: g++-14 + bt: Release + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 11 + cxx: g++-5 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 11 + cxx: g++-5 + bt: Release + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 11 + cxx: g++-4.8 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 11 + cxx: g++-4.8 + bt: Release + bitlinks: shared64 static32 + img: ubuntu18.04 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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 gcc_noexceptions: name: gcc_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest strategy: fail-fast: false matrix: include: - - {std: 11, cxx: g++-5, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 20, cxx: g++-14, bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - env: {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}}"} + - std: 11 + cxx: g++-5 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 11 + cxx: g++-5 + bt: Release + bitlinks: shared64 static32 + img: ubuntu18.04 + - std: 20 + cxx: g++-14 + bt: Debug + bitlinks: shared64 static32 + img: ubuntu22.04 + - std: 20 + cxx: g++-14 + bt: Release + bitlinks: shared64 static32 + img: ubuntu22.04 + env: + 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: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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 gcc_extended: name: gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest strategy: fail-fast: false matrix: include: - # VALGRIND - - {std: 11, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 11, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - # - - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-11 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-11 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-10 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-10 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-9 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-9 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-8 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-8 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-7 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-7 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-6 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-6 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-4.9, bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-4.9, bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, img: ubuntu18.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}}"} + - std: 11 + cxx: g++-14 + bt: Debug + vg: 'ON' + img: ubuntu22.04 + - std: 11 + cxx: g++-14 + bt: Release + vg: 'ON' + img: ubuntu22.04 + - std: 14 + cxx: g++-14 + bt: Debug + vg: 'ON' + img: ubuntu22.04 + - std: 14 + cxx: g++-14 + bt: Release + vg: 'ON' + img: ubuntu22.04 + - std: 17 + cxx: g++-14 + bt: Debug + vg: 'ON' + img: ubuntu22.04 + - std: 17 + cxx: g++-14 + bt: Release + vg: 'ON' + img: ubuntu22.04 + - std: 20 + cxx: g++-14 + bt: Debug + vg: 'ON' + img: ubuntu22.04 + - std: 20 + cxx: g++-14 + bt: Release + vg: 'ON' + img: ubuntu22.04 + - std: 11 + cxx: g++-13 + bt: Debug + img: ubuntu22.04 + - std: 11 + cxx: g++-13 + bt: Release + img: ubuntu22.04 + - std: 11 + cxx: g++-13 + bt: Debug + img: ubuntu22.04 + - std: 11 + cxx: g++-13 + bt: Release + img: ubuntu22.04 + - std: 11 + cxx: g++-11 + bt: Debug + img: ubuntu22.04 + - std: 11 + cxx: g++-11 + bt: Release + img: ubuntu22.04 + - std: 11 + cxx: g++-10 + bt: Debug + img: ubuntu22.04 + - std: 11 + cxx: g++-10 + bt: Release + img: ubuntu22.04 + - std: 11 + cxx: g++-9 + bt: Debug + img: ubuntu22.04 + - std: 11 + cxx: g++-9 + bt: Release + img: ubuntu22.04 + - std: 11 + cxx: g++-8 + bt: Debug + img: ubuntu18.04 + - std: 11 + cxx: g++-8 + bt: Release + img: ubuntu18.04 + - std: 11 + cxx: g++-7 + bt: Debug + img: ubuntu18.04 + - std: 11 + cxx: g++-7 + bt: Release + img: ubuntu18.04 + - std: 11 + cxx: g++-6 + bt: Debug + img: ubuntu18.04 + - std: 11 + cxx: g++-6 + bt: Release + img: ubuntu18.04 + - std: 11 + cxx: g++-5 + bt: Debug + img: ubuntu18.04 + - std: 11 + cxx: g++-5 + bt: Release + img: ubuntu18.04 + - std: 11 + cxx: g++-4.9 + bt: Debug + img: ubuntu18.04 + - std: 11 + cxx: g++-4.9 + bt: Release + img: ubuntu18.04 + - std: 11 + cxx: g++-4.8 + bt: Debug + img: ubuntu18.04 + - std: 11 + cxx: g++-4.8 + bt: Release + img: ubuntu18.04 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - 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 gccsan: name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: fail-fast: false matrix: include: - - {std: 11, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: ubsan, bitlinks: static64} - 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}}"} + - std: 11 + cxx: g++-14 + bt: asan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: asan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: asan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: asan + bitlinks: static64 + - std: 11 + cxx: g++-14 + bt: lsan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: lsan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: lsan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: lsan + bitlinks: static64 + - std: 11 + cxx: g++-14 + bt: tsan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: tsan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: tsan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: tsan + bitlinks: static64 + - std: 11 + cxx: g++-14 + bt: ubsan + bitlinks: static64 + - std: 14 + cxx: g++-14 + bt: ubsan + bitlinks: static64 + - std: 17 + cxx: g++-14 + bt: ubsan + bitlinks: static64 + - std: 20 + cxx: g++-14 + bt: ubsan + bitlinks: static64 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - run: git config --system --add safe.directory '*' + - run: c4core-install ${{matrix.cxx}} + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: shared64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared64 + - name: shared64-build + run: source .github/setenv.sh && c4_build_test shared64 + - name: shared64-run + run: source .github/setenv.sh && c4_run_test shared64 + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 + - name: static64-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static64 + - name: static64-build + run: source .github/setenv.sh && c4_build_test static64 + - name: static64-run + run: source .github/setenv.sh && c4_run_test static64 + - name: static64-pack + run: source .github/setenv.sh && c4_package static64 + - name: static32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test static32 + - name: static32-build + run: source .github/setenv.sh && c4_build_test static32 + - name: static32-run + run: source .github/setenv.sh && c4_run_test static32 + - name: static32-pack + run: source .github/setenv.sh && c4_package static32 + - name: shared32-configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test shared32 + - name: shared32-build + run: source .github/setenv.sh && c4_build_test shared32 + - name: shared32-run + run: source .github/setenv.sh && c4_run_test shared32 + - name: shared32-pack + run: source .github/setenv.sh && c4_package shared32 arm: continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu18.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu18.04:latest strategy: fail-fast: false matrix: include: - # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism - - {std: 11, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 11, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 14, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 14, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 17, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 17, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - env: {TOOLCHAIN: "${{matrix.toolchain}}", STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + - std: 11 + bt: Debug + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + cxx: arm-linux-gnueabihf-gcc + os: ubuntu-20.04 + - std: 11 + bt: Release + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + cxx: arm-linux-gnueabihf-gcc + os: ubuntu-20.04 + - std: 14 + bt: Debug + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + cxx: arm-linux-gnueabihf-gcc + os: ubuntu-20.04 + - std: 14 + bt: Release + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + cxx: arm-linux-gnueabihf-gcc + os: ubuntu-20.04 + - std: 17 + bt: Debug + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + cxx: arm-linux-gnueabihf-gcc + os: ubuntu-20.04 + - std: 17 + bt: Release + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake + cxx: arm-linux-gnueabihf-gcc + os: ubuntu-20.04 + env: + TOOLCHAIN: ${{matrix.toolchain}} + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - name: install gcc-arm-linux-gnueabihf - run: | - c4core-install arm-linux-gnueabihf - c4core-install qemu - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test arm - - {name: build, run: source .github/setenv.sh && c4_build_test arm} - - {name: run, run: source .github/setenv.sh && c4_run_test arm} - - {name: pack, run: source .github/setenv.sh && c4_package arm} + - name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + - name: install gcc-arm-linux-gnueabihf + run: | + c4core-install arm-linux-gnueabihf + c4core-install qemu + - name: show info + run: source .github/setenv.sh && c4_show_info + - name: configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test arm + - name: build + run: source .github/setenv.sh && c4_build_test arm + - name: run + run: source .github/setenv.sh && c4_run_test arm + - name: pack + run: source .github/setenv.sh && c4_package arm diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index e72f670ac..206006df8 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -1,30 +1,23 @@ -name: test_install +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/install.yml +name: test_install defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: - NUM_JOBS_BUILD: # 4 - + CMAKE_FLAGS: null + NUM_JOBS_BUILD: null jobs: - - #---------------------------------------------------------------------------- install_tests: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -37,69 +30,265 @@ jobs: fail-fast: false matrix: include: - - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - # - - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - # - - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: , commonvars: } - - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: , commonvars: } - - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: , commonvars: } - - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } - - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: , commonvars: } - - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } + - name: find_package/linux + sdir: test/test_install + os: ubuntu-20.04 + cxx: g++-10 + gen: -DCMAKE_CXX_COMPILER=g++-10 + tgt: all + bt: Release + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: null + - name: find_package/linux + sdir: test/test_install + os: ubuntu-20.04 + cxx: g++-10 + gen: -DCMAKE_CXX_COMPILER=g++-10 + tgt: all + bt: Debug + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: null + - name: find_package/linux/libcxx + sdir: test/test_install + os: ubuntu-20.04 + cxx: clang++-9 + gen: -DCMAKE_CXX_COMPILER=clang++-9 + tgt: all + bt: Release + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: -DRYML_USE_LIBCXX=ON + - name: find_package/linux/libcxx + sdir: test/test_install + os: ubuntu-20.04 + cxx: clang++-9 + gen: -DCMAKE_CXX_COMPILER=clang++-9 + tgt: all + bt: Debug + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: -DRYML_USE_LIBCXX=ON + - name: find_package/macos + sdir: test/test_install + os: macos-13 + cxx: xcode + gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 + tgt: ALL_BUILD + bt: Release + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: null + - name: find_package/macos + sdir: test/test_install + os: macos-13 + cxx: xcode + gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 + tgt: ALL_BUILD + bt: Debug + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: null + - name: find_package/win + sdir: test/test_install + os: windows-2019 + cxx: vs2019 + gen: -G 'Visual Studio 16 2019' -A x64 + tgt: ALL_BUILD + bt: Release + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: null + - name: find_package/win + sdir: test/test_install + os: windows-2019 + cxx: vs2019 + gen: -G 'Visual Studio 16 2019' -A x64 + tgt: ALL_BUILD + bt: Debug + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + commonvars: null + - name: find_library/linux + sdir: test/test_install + os: ubuntu-20.04 + cxx: g++-10 + gen: -DCMAKE_CXX_COMPILER=g++-10 + tgt: all + bt: Release + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: null + - name: find_library/linux + sdir: test/test_install + os: ubuntu-20.04 + cxx: g++-10 + gen: -DCMAKE_CXX_COMPILER=g++-10 + tgt: all + bt: Debug + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: null + - name: find_library/linux/libcxx + sdir: test/test_install + os: ubuntu-20.04 + cxx: clang++-9 + gen: -DCMAKE_CXX_COMPILER=clang++-9 + tgt: all + bt: Release + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: -DRYML_USE_LIBCXX=ON + - name: find_library/linux/libcxx + sdir: test/test_install + os: ubuntu-20.04 + cxx: clang++-9 + gen: -DCMAKE_CXX_COMPILER=clang++-9 + tgt: all + bt: Debug + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: -DRYML_USE_LIBCXX=ON + - name: find_library/macos + sdir: test/test_install + os: macos-13 + cxx: xcode + gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 + tgt: ALL_BUILD + bt: Release + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: null + - name: find_library/macos + sdir: test/test_install + os: macos-13 + cxx: xcode + gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 + tgt: ALL_BUILD + bt: Debug + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: null + - name: find_library/win + sdir: test/test_install + os: windows-2019 + cxx: vs2019 + gen: -G 'Visual Studio 16 2019' -A x64 + tgt: ALL_BUILD + bt: Release + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: null + - name: find_library/win + sdir: test/test_install + os: windows-2019 + cxx: vs2019 + gen: -G 'Visual Studio 16 2019' -A x64 + tgt: ALL_BUILD + bt: Debug + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + commonvars: null + - name: singleheader/linux + sdir: test/test_singleheader + os: ubuntu-20.04 + cxx: g++-10 + gen: -DCMAKE_CXX_COMPILER=g++-10 + tgt: all + bt: Release + vars: null + commonvars: null + - name: singleheader/linux + sdir: test/test_singleheader + os: ubuntu-20.04 + cxx: g++-10 + gen: -DCMAKE_CXX_COMPILER=g++-10 + tgt: all + bt: Debug + vars: null + commonvars: null + - name: singleheader/linux/libcxx + sdir: test/test_singleheader + os: ubuntu-20.04 + cxx: clang++-9 + gen: -DCMAKE_CXX_COMPILER=clang++-9 + tgt: all + bt: Release + vars: null + commonvars: -DRYML_USE_LIBCXX=ON + - name: singleheader/linux/libcxx + sdir: test/test_singleheader + os: ubuntu-20.04 + cxx: clang++-9 + gen: -DCMAKE_CXX_COMPILER=clang++-9 + tgt: all + bt: Debug + vars: null + commonvars: -DRYML_USE_LIBCXX=ON + - name: singleheader/macos + sdir: test/test_singleheader + os: macos-13 + cxx: xcode + gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 + tgt: ALL_BUILD + bt: Release + vars: null + commonvars: null + - name: singleheader/macos + sdir: test/test_singleheader + os: macos-13 + cxx: xcode + gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 + tgt: ALL_BUILD + bt: Debug + vars: null + commonvars: null + - name: singleheader/win + sdir: test/test_singleheader + os: windows-2019 + cxx: vs2019 + gen: -G 'Visual Studio 16 2019' -A x64 + tgt: ALL_BUILD + bt: Release + vars: null + commonvars: null + - name: singleheader/win + sdir: test/test_singleheader + os: windows-2019 + cxx: vs2019 + gen: -G 'Visual Studio 16 2019' -A x64 + tgt: ALL_BUILD + bt: Debug + vars: null + commonvars: null env: - CXX_: "${{matrix.cxx}}" - BT: "${{matrix.bt}}" - OS: "${{matrix.os}}" - BDIR: "build/${{matrix.name}}-${{matrix.bt}}" - IDIR: "install/${{matrix.name}}-${{matrix.bt}}" - PDIR: "prefix/${{matrix.name}}-${{matrix.bt}}" + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + OS: ${{matrix.os}} + BDIR: build/${{matrix.name}}-${{matrix.bt}} + IDIR: install/${{matrix.name}}-${{matrix.bt}} + PDIR: prefix/${{matrix.name}}-${{matrix.bt}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {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: Install python 3.9 - uses: actions/setup-python@v5 - with: { python-version: 3.9 } - - name: preinstall - run: | - if [ "${{matrix.sdir}}" == "test/test_install" ] ; then - mkdir -p $BDIR-staging - cmake -S . -B $BDIR-staging -DCMAKE_INSTALL_PREFIX=$PDIR -DCMAKE_BUILD_TYPE=${{matrix.bt}} ${{matrix.gen}} ${{matrix.commonvars}} - cmake --build $BDIR-staging --config ${{matrix.bt}} --target ${{matrix.tgt}} -j - cmake --build $BDIR-staging --config ${{matrix.bt}} --target install - fi - - name: configure - run: | - mkdir -p $BDIR - mkdir -p $IDIR - cmake -S ${{matrix.sdir}} -B $BDIR \ - -DRYML_BUILD_TESTS=ON \ - -DRYML_VALGRIND=OFF \ - -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ - -DCMAKE_INSTALL_PREFIX=$IDIR \ - ${{matrix.gen}} \ - ${{matrix.vars}} \ - ${{matrix.commonvars}} - - name: build - run: | - cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j - - name: run - run: | - cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - 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: Install python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: preinstall + run: | + if [ "${{matrix.sdir}}" == "test/test_install" ] ; then + mkdir -p $BDIR-staging + cmake -S . -B $BDIR-staging -DCMAKE_INSTALL_PREFIX=$PDIR -DCMAKE_BUILD_TYPE=${{matrix.bt}} ${{matrix.gen}} ${{matrix.commonvars}} + cmake --build $BDIR-staging --config ${{matrix.bt}} --target ${{matrix.tgt}} -j + cmake --build $BDIR-staging --config ${{matrix.bt}} --target install + fi + - name: configure + run: | + mkdir -p $BDIR + mkdir -p $IDIR + cmake -S ${{matrix.sdir}} -B $BDIR \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=OFF \ + -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ + -DCMAKE_INSTALL_PREFIX=$IDIR \ + ${{matrix.gen}} \ + ${{matrix.vars}} \ + ${{matrix.commonvars}} + - name: build + run: | + cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j + - name: run + run: | + cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml index a3fee8efe..d3768b5e7 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/macosx.yml @@ -1,31 +1,23 @@ -name: macosx +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/macosx.yml +name: macosx defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - - + NUM_JOBS_BUILD: null jobs: - - #---------------------------------------------------------------------------- macosx: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -37,38 +29,105 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 11, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} - # - - {std: 11, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 11, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} - 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}}"} + - std: 11 + cxx: xcode + xcver: 15 + bt: Debug + os: macos-13 + bitlinks: shared64 static64 + - std: 11 + cxx: xcode + xcver: 15 + bt: Release + os: macos-13 + bitlinks: shared64 static64 + - std: 17 + cxx: xcode + xcver: 15 + bt: Debug + os: macos-13 + bitlinks: shared64 static64 + - std: 17 + cxx: xcode + xcver: 15 + bt: Release + os: macos-13 + bitlinks: shared64 static64 + - std: 11 + cxx: xcode + xcver: 14 + bt: Debug + os: macos-13 + bitlinks: shared64 static64 + - std: 11 + cxx: xcode + xcver: 14 + bt: Release + os: macos-13 + bitlinks: shared64 static64 + - std: 17 + cxx: xcode + xcver: 14 + bt: Debug + os: macos-13 + bitlinks: shared64 static64 + - std: 17 + cxx: xcode + xcver: 14 + bt: Release + os: macos-13 + bitlinks: shared64 static64 + env: + STD: ${{matrix.std}} + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + BITLINKS: ${{matrix.bitlinks}} + VG: ${{matrix.vg}} + SAN: ${{matrix.san}} + LINT: ${{matrix.lint}} + OS: ${{matrix.os}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {name: xcode, uses: maxim-lobanov/setup-xcode@v1, with: {xcode-version: "${{matrix.xcver}}" }} - - {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: 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} + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{matrix.xcver}} + - 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: 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 diff --git a/.github/workflows/rarearchs.yml b/.github/workflows/rarearchs.yml index 5b799bb76..d7b22e7a8 100644 --- a/.github/workflows/rarearchs.yml +++ b/.github/workflows/rarearchs.yml @@ -1,21 +1,17 @@ -name: rarearchs +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/rarearchs.yml +name: rarearchs defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - jobs: rarearchs: if: | @@ -29,95 +25,136 @@ jobs: fail-fast: false matrix: include: - - {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04} + - std: 11 + bt: Debug + arch: aarch64 + distro: ubuntu20.04 + - std: 11 + bt: Release + arch: aarch64 + distro: ubuntu20.04 + - std: 14 + bt: Debug + arch: aarch64 + distro: ubuntu20.04 + - std: 14 + bt: Release + arch: aarch64 + distro: ubuntu20.04 + - std: 17 + bt: Debug + arch: aarch64 + distro: ubuntu20.04 + - std: 17 + bt: Release + arch: aarch64 + distro: ubuntu20.04 + - std: 11 + bt: Debug + arch: ppc64le + distro: ubuntu20.04 + - std: 11 + bt: Release + arch: ppc64le + distro: ubuntu20.04 + - std: 14 + bt: Debug + arch: ppc64le + distro: ubuntu20.04 + - std: 14 + bt: Release + arch: ppc64le + distro: ubuntu20.04 + - std: 17 + bt: Debug + arch: ppc64le + distro: ubuntu20.04 + - std: 17 + bt: Release + arch: ppc64le + distro: ubuntu20.04 + - std: 11 + bt: Debug + arch: s390x + distro: ubuntu20.04 + - std: 11 + bt: Release + arch: s390x + distro: ubuntu20.04 + - std: 14 + bt: Debug + arch: s390x + distro: ubuntu20.04 + - std: 14 + bt: Release + arch: s390x + distro: ubuntu20.04 + - std: 17 + bt: Debug + arch: s390x + distro: ubuntu20.04 + - std: 17 + bt: Release + arch: s390x + distro: ubuntu20.04 + steps: + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: test + uses: uraimo/run-on-arch-action@v2.7.2 + with: + arch: ${{matrix.arch}} + distro: ${{matrix.distro}} + install: | + set -x + start_time=$SECONDS + time apt-get update -y + time apt-get install -y \ + git \ + build-essential + # arm platforms need an up-to-date cmake: + # https://gitlab.kitware.com/cmake/cmake/-/issues/20568 + if [ "${{matrix.arch}}" == "armv6" ] || [ "${{matrix.arch}}" == "armv7" ] ; then + time apt-get install -y \ + gpg \ + wget \ + apt-transport-https + wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null + time apt-get update -y + rm /usr/share/keyrings/kitware-archive-keyring.gpg + time apt-get install kitware-archive-keyring + time apt-get update -y + fi + time apt-get install -y cmake cmake-data + cmake --version + echo "install took $((SECONDS - start_time))" + run: | + set -x + start_time=$SECONDS + uname -a + pwd + ls -lFhp . # - - {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04} + bdir=build_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} + idir=install_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} + mkdir -p $bdir # - - {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04} + time cmake -S . -B $bdir \ + -DCMAKE_INSTALL_PREFIX=$idir \ + -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DCXX_STANDARD=${{matrix.std}} \ + -DRYML_DEV=ON \ + -DRYML_TEST_SUITE=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_SANITIZE=OFF \ + -DRYML_LINT=OFF \ + -DRYML_VALGRIND=OFF # - #- {std: 11, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 11, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 14, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 14, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 17, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 17, bt: Release, arch: armv6 , distro: bullseye} + time cmake --build $bdir -j 3 --target ryml-test-build # - #- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04} - steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: test - uses: uraimo/run-on-arch-action@v2.7.2 - with: - arch: ${{matrix.arch}} - distro: ${{matrix.distro}} - install: | - set -x - start_time=$SECONDS - time apt-get update -y - time apt-get install -y \ - git \ - build-essential - # arm platforms need an up-to-date cmake: - # https://gitlab.kitware.com/cmake/cmake/-/issues/20568 - if [ "${{matrix.arch}}" == "armv6" ] || [ "${{matrix.arch}}" == "armv7" ] ; then - time apt-get install -y \ - gpg \ - wget \ - apt-transport-https - wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null - echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null - time apt-get update -y - rm /usr/share/keyrings/kitware-archive-keyring.gpg - time apt-get install kitware-archive-keyring - time apt-get update -y - fi - time apt-get install -y cmake cmake-data - cmake --version - echo "install took $((SECONDS - start_time))" - run: | - set -x - start_time=$SECONDS - uname -a - pwd - ls -lFhp . - # - bdir=build_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} - idir=install_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} - mkdir -p $bdir - # - time cmake -S . -B $bdir \ - -DCMAKE_INSTALL_PREFIX=$idir \ - -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DCXX_STANDARD=${{matrix.std}} \ - -DRYML_DEV=ON \ - -DRYML_TEST_SUITE=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_SANITIZE=OFF \ - -DRYML_LINT=OFF \ - -DRYML_VALGRIND=OFF - # - time cmake --build $bdir -j 3 --target ryml-test-build - # - time cmake --build $bdir -j 3 --target ryml-test-run - echo "run took $((SECONDS - start_time))" + time cmake --build $bdir -j 3 --target ryml-test-run + echo "run took $((SECONDS - start_time))" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c64856df1..8c4811353 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,38 +1,28 @@ -name: release +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/release.yml +name: release defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: tags: - - v0.* - - v1.* - - v2.* + - v0.* + - v1.* + - v2.* branches: - - master + - master pull_request: branches: - - master - + - master env: PROJ_PKG_NAME: rapidyaml- PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=OFF - NUM_JOBS_BUILD: # 4 - - -# useful to iterate when fixing the release: -# ver=0.2.1 ; ( set -x ; git tag -d v$ver ; git push origin :v$ver ) ; (set -x ; set -e ; tbump --only-patch --non-interactive $ver ; git add -u ; git commit --amend --no-edit ; git tag --annotate --message "v$ver" "v$ver" ; git push -f --tags origin ) - + NUM_JOBS_BUILD: null jobs: - gettag: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -40,42 +30,44 @@ jobs: contains(github.event.head_commit.message, 'only release') runs-on: ubuntu-latest steps: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - name: Variables (from tag) - if: contains(github.ref, 'tags/v') - run: | - # https://github.community/t/how-to-get-just-the-tag-name/16241/11 - SRC_TAG=${GITHUB_REF#refs/tags/} - SRC_VERSION=${GITHUB_REF#refs/tags/v} - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF - - name: Variables (from commit, no tag) - if: ${{ !contains(github.ref, 'tags/v') }} - run: | - set -x - branch_name=${GITHUB_REF#refs/heads/} - # builds triggered from PRs have the branch_name like this: refs/pull/150/merge - # so filter to eg pr0150_merge - branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` - # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar - branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` - SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 - SRC_VERSION="${branch_name}-${SRC_TAG}" - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF - - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - - name: Save vars.sh - uses: actions/upload-artifact@v3 - with: {name: vars.sh, path: ./vars.sh} - - #---------------------------------------------------------------------------- - # create source packages + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run: | + # https://github.community/t/how-to-get-just-the-tag-name/16241/11 + SRC_TAG=${GITHUB_REF#refs/tags/} + SRC_VERSION=${GITHUB_REF#refs/tags/v} + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: | + set -x + branch_name=${GITHUB_REF#refs/heads/} + # builds triggered from PRs have the branch_name like this: refs/pull/150/merge + # so filter to eg pr0150_merge + branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` + # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar + branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` + SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 + SRC_VERSION="${branch_name}-${SRC_TAG}" + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Verify vars.sh + run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + - name: Save vars.sh + uses: actions/upload-artifact@v3 + with: + name: vars.sh + path: ./vars.sh src: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -84,36 +76,41 @@ jobs: needs: gettag runs-on: ubuntu-latest steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - name: Install python 3.9 - uses: actions/setup-python@v5 - with: { python-version: 3.9 } - - name: Install requirements - run: | - sudo -E pip install git-archive-all - - name: Create source packages - run: | - pwd - ls -lFhp - source vars.sh - echo SRC_TAG=$SRC_TAG - echo SRC_VERSION=$SRC_VERSION - id=${PROJ_PKG_NAME}${SRC_VERSION} - name=${id}-src - mkdir -p assets - git-archive-all --prefix $name assets/$name.tgz - git-archive-all --prefix $name assets/$name.zip - python --version - python tools/amalgamate.py assets/$id.hpp - - name: Save source artifacts - uses: actions/upload-artifact@v3 - with: {name: assets, path: assets} - - #---------------------------------------------------------------------------- - # create c++ packages + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: + name: vars.sh + path: ./ + - name: Install python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install requirements + run: | + sudo -E pip install git-archive-all + - name: Create source packages + run: | + pwd + ls -lFhp + source vars.sh + echo SRC_TAG=$SRC_TAG + echo SRC_VERSION=$SRC_VERSION + id=${PROJ_PKG_NAME}${SRC_VERSION} + name=${id}-src + mkdir -p assets + git-archive-all --prefix $name assets/$name.tgz + git-archive-all --prefix $name assets/$name.zip + python --version + python tools/amalgamate.py assets/$id.hpp + - name: Save source artifacts + uses: actions/upload-artifact@v3 + with: + name: assets + path: assets cpp: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -122,46 +119,76 @@ jobs: name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} needs: gettag runs-on: ${{matrix.config.os}} - env: {DEV: OFF, BT: Release, OS: "${{matrix.config.os}}", CXX_: "${{matrix.config.cxx}}", GEN: "${{matrix.config.gen}}"} + env: + DEV: 'OFF' + BT: Release + OS: ${{matrix.config.os}} + CXX_: ${{matrix.config.cxx}} + GEN: ${{matrix.config.gen}} strategy: fail-fast: false matrix: config: - # name of the artifact | suffix (gen) | suffix (package) | cpack gen | mime type | os | cxx - - {name: Ubuntu 22.04 deb , sfxg: unix64.deb, sfxp: ubuntu-22.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-22.04 } - - {name: Ubuntu 20.04 deb , sfxg: unix64.deb, sfxp: ubuntu-20.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-20.04 } - #- {name: Ubuntu 18.04 deb , sfxg: unix64.deb, sfxp: ubuntu-18.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-18.04 } - - {name: Windows VS2019 zip, sfxg: win64.zip , sfxp: windows-vs2019.zip , gen: ZIP , mime: zip , os: windows-2019, cxx: vs2019} - - {name: MacOSX sh , sfxg: apple64.sh, sfxp: macosx-xcode.sh , gen: STGZ , mime: x-sh , os: macos-13 , cxx: xcode } + - name: Ubuntu 22.04 deb + sfxg: unix64.deb + sfxp: ubuntu-22.04.deb + gen: DEB + mime: vnd.debian.binary-package + os: ubuntu-22.04 + - name: Ubuntu 20.04 deb + sfxg: unix64.deb + sfxp: ubuntu-20.04.deb + gen: DEB + mime: vnd.debian.binary-package + os: ubuntu-20.04 + - name: Windows VS2019 zip + sfxg: win64.zip + sfxp: windows-vs2019.zip + gen: ZIP + mime: zip + os: windows-2019 + cxx: vs2019 + - name: MacOSX sh + sfxg: apple64.sh + sfxp: macosx-xcode.sh + gen: STGZ + mime: x-sh + os: macos-13 + cxx: xcode steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - {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_target shared64} - - name: shared64-pack - run: source .github/setenv.sh && c4_package shared64 $GEN - - name: shared64-normalize - run: | - set -x - source vars.sh - mkdir -p assets - asset_src=`ls -1 ./build/shared64/*-${{matrix.config.sfxg}}` - asset_dst=./assets/${PROJ_PKG_NAME}${SRC_VERSION}-${{matrix.config.sfxp}} - [ ! -f $asset_src ] && exit 1 - cp -fav $asset_src $asset_dst - - name: Save artifacts - uses: actions/upload-artifact@v3 - with: {name: assets, path: assets} - - #---------------------------------------------------------------------------- - # create python packages - # adapted from https://github.com/pikepdf/pikepdf/blob/master/.github/workflows/build_wheels.yml - + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: + name: vars.sh + path: ./ + - 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_target shared64 + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 $GEN + - name: shared64-normalize + run: | + set -x + source vars.sh + mkdir -p assets + asset_src=`ls -1 ./build/shared64/*-${{matrix.config.sfxg}}` + asset_dst=./assets/${PROJ_PKG_NAME}${SRC_VERSION}-${{matrix.config.sfxp}} + [ ! -f $asset_src ] && exit 1 + cp -fav $asset_src $asset_dst + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: + name: assets + path: assets python_src: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -170,26 +197,31 @@ jobs: name: python/src runs-on: ubuntu-latest steps: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - name: install python 3.9 - uses: actions/setup-python@v5 - with: { python-version: 3.9 } - - name: package python src packages - run: | - python --version - pip install -v -r requirements.txt - python setup.py sdist --formats=zip - - name: normalize src package names - run: | - sdist_orig=`find dist -type f -name 'rapidyaml-*.zip'` - [ ! -f $sdist_orig ] && exit 1 - sdist=`echo $sdist_orig | sed 's:\.zip:-python_src.zip:'` - mv -fv $sdist_orig $sdist - - name: Save artifacts - uses: actions/upload-artifact@v3 - with: {name: dist, path: dist} - + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: install python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: package python src packages + run: | + python --version + pip install -v -r requirements.txt + python setup.py sdist --formats=zip + - name: normalize src package names + run: | + sdist_orig=`find dist -type f -name 'rapidyaml-*.zip'` + [ ! -f $sdist_orig ] && exit 1 + sdist=`echo $sdist_orig | sed 's:\.zip:-python_src.zip:'` + mv -fv $sdist_orig $sdist + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: + name: dist + path: dist python_wheels: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -198,96 +230,140 @@ jobs: name: python/${{matrix.config.cibw_pyv}}/${{matrix.config.osname}}/${{matrix.config.cibw_arch}} 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}}" - CIBW_ARCHS: "${{matrix.config.cibw_arch}}" + 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: config: - # the 3-digit versions NEED to be quoted to prevent the version being read as float. (!) - #- {pythonv: '3.13', cibw_pyv: 313, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - #- {pythonv: '3.13', cibw_pyv: 313, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.12', cibw_pyv: 312, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.12', cibw_pyv: 312, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.11', cibw_pyv: 311, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.10', cibw_pyv: 310, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - # the windows builds are disabled because they are causing problems and preventing the release. - # the problems are related to CMakeExtension forcing the use of Ninja - # which does not play well with the -G 'Visual Studio...' option used below. - # fixing this looks like it will be time-intensive. - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - ## macosx builds are generating a SIGSEGV when importing. (!) - ## https://github.com/biojppm/rapidyaml/actions/runs/3062528713/jobs/4943611397#step:7:269 - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + - pythonv: '3.12' + cibw_pyv: 312 + cibw_arch: x86_64 + cibw_platform: manylinux_x86_64 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.12' + cibw_pyv: 312 + cibw_arch: i686 + cibw_platform: manylinux_i686 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.11' + cibw_pyv: 311 + cibw_arch: x86_64 + cibw_platform: manylinux_x86_64 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.11' + cibw_pyv: 311 + cibw_arch: i686 + cibw_platform: manylinux_i686 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.10' + cibw_pyv: 310 + cibw_arch: x86_64 + cibw_platform: manylinux_x86_64 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.10' + cibw_pyv: 310 + cibw_arch: i686 + cibw_platform: manylinux_i686 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.9' + cibw_pyv: 39 + cibw_arch: x86_64 + cibw_platform: manylinux_x86_64 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.9' + cibw_pyv: 39 + cibw_arch: i686 + cibw_platform: manylinux_i686 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.8' + cibw_pyv: 38 + cibw_arch: x86_64 + cibw_platform: manylinux_x86_64 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.8' + cibw_pyv: 38 + cibw_arch: i686 + cibw_platform: manylinux_i686 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.7' + cibw_pyv: 37 + cibw_arch: x86_64 + cibw_platform: manylinux_x86_64 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.7' + cibw_pyv: 37 + cibw_arch: i686 + cibw_platform: manylinux_i686 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.6' + cibw_pyv: 36 + cibw_arch: x86_64 + cibw_platform: manylinux_x86_64 + osname: linux + os: ubuntu-20.04 + - pythonv: '3.6' + cibw_pyv: 36 + cibw_arch: i686 + cibw_platform: manylinux_i686 + osname: linux + os: ubuntu-20.04 steps: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - name: create wheel - uses: pypa/cibuildwheel@v2.17 - - name: rename wheelhouse -> dist - run: | - mv -fv wheelhouse dist - ls -lFhp dist/ - - name: Save artifacts for publishing to PyPI - uses: actions/upload-artifact@v3 - with: {name: dist, 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: | - 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 - - - #---------------------------------------------------------------------------- + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: create wheel + uses: pypa/cibuildwheel@v2.17 + - name: rename wheelhouse -> dist + run: | + mv -fv wheelhouse dist + ls -lFhp dist/ + - name: Save artifacts for publishing to PyPI + uses: actions/upload-artifact@v3 + with: + name: dist + path: dist + - 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: | + 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 release: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -295,77 +371,82 @@ jobs: contains(github.event.head_commit.message, 'only release') runs-on: ubuntu-latest needs: - - src - - cpp - - python_src - - python_wheels + - src + - cpp + - python_src + - python_wheels steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - 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/ - ls -lFhp dist/ - # - # Github - - name: Restore vars.sh - if: contains(github.ref, 'tags/v') - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - name: Save vars for following steps - if: contains(github.ref, 'tags/v') - id: vars - run: | - source vars.sh - version_body=${{github.workspace}}/changelog/$SRC_VERSION.md - if [ ! -f $version_body ] ; then - echo "version body file was not found: $version_body" - exit 1 - fi - echo "VERSION=$SRC_VERSION >> $GITHUB_OUTPUT" - echo "VERSION_BODY=$version_body >> $GITHUB_OUTPUT" - - name: Move Python packages to assets folder - if: contains(github.ref, 'tags/v') - run: mv -fv dist/*src.zip assets/. - - name: Create Github Release - if: contains(github.ref, 'tags/v') - id: create_release - uses: actions/create-release@v1 - env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } - with: - tag_name: ${{github.ref}} - release_name: Release ${{steps.vars.outputs.VERSION}} - body_path: ${{steps.vars.outputs.VERSION_BODY}} - draft: true - prerelease: ${{contains(github.ref, 'rc')}} - - name: Upload assets to Github Release - if: contains(github.ref, 'tags/v') - uses: dwenegar/upload-release-assets@v1 - env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } - with: - release_id: ${{steps.create_release.outputs.id}} - assets_path: ./assets/ - # - # PyPI (test) - - name: Publish python packages to test PyPI - uses: pypa/gh-action-pypi-publish@v1.4.2 - with: - repository_url: https://test.pypi.org/legacy/ - user: __token__ - password: ${{secrets.PYPI_TOKEN_TEST}} - verbose: true - skip_existing: true - # - # PyPI (production) - - name: Publish python packages to production PyPI - if: contains(github.ref, 'tags/v') - uses: pypa/gh-action-pypi-publish@v1.4.2 - with: - user: __token__ - password: ${{secrets.PYPI_TOKEN}} - verbose: true + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - 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/ + ls -lFhp dist/ + - name: Restore vars.sh + if: contains(github.ref, 'tags/v') + uses: actions/download-artifact@v3 + with: + name: vars.sh + path: ./ + - name: Save vars for following steps + if: contains(github.ref, 'tags/v') + id: vars + run: | + source vars.sh + version_body=${{github.workspace}}/changelog/$SRC_VERSION.md + if [ ! -f $version_body ] ; then + echo "version body file was not found: $version_body" + exit 1 + fi + echo "VERSION=$SRC_VERSION >> $GITHUB_OUTPUT" + echo "VERSION_BODY=$version_body >> $GITHUB_OUTPUT" + - name: Move Python packages to assets folder + if: contains(github.ref, 'tags/v') + run: mv -fv dist/*src.zip assets/. + - name: Create Github Release + if: contains(github.ref, 'tags/v') + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + tag_name: ${{github.ref}} + release_name: Release ${{steps.vars.outputs.VERSION}} + body_path: ${{steps.vars.outputs.VERSION_BODY}} + draft: true + prerelease: ${{contains(github.ref, 'rc')}} + - name: Upload assets to Github Release + if: contains(github.ref, 'tags/v') + uses: dwenegar/upload-release-assets@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + release_id: ${{steps.create_release.outputs.id}} + assets_path: ./assets/ + - name: Publish python packages to test PyPI + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + repository_url: https://test.pypi.org/legacy/ + user: __token__ + password: ${{secrets.PYPI_TOKEN_TEST}} + verbose: true + skip_existing: true + - name: Publish python packages to production PyPI + if: contains(github.ref, 'tags/v') + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{secrets.PYPI_TOKEN}} + verbose: true diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index e811d8346..b4a0e59c4 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -1,30 +1,23 @@ -name: samples +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/samples.yml +name: samples defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - + NUM_JOBS_BUILD: null jobs: - - #---------------------------------------------------------------------------- samples: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -36,25 +29,54 @@ jobs: fail-fast: false matrix: include: - - {bt: Debug , os: ubuntu-20.04} - - {bt: Release, os: ubuntu-20.04} - - {bt: Debug , os: windows-2019} - - {bt: Release, os: windows-2019} - - {bt: Debug , os: macos-latest} - - {bt: Release, os: macos-latest} - 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}}", - CMANY: ON, RYMLSHA: "${{github.event.pull_request.head.sha}}" } + - bt: Debug + os: ubuntu-20.04 + - bt: Release + os: ubuntu-20.04 + - bt: Debug + os: windows-2019 + - bt: Release + os: windows-2019 + - bt: Debug + os: macos-latest + - bt: Release + os: macos-latest + 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}} + CMANY: 'ON' + RYMLSHA: ${{github.event.pull_request.head.sha}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0 } } # use fetch-depth to ensure all tags are fetched - - {name: python3, uses: actions/setup-python@v5, with: {python-version: 3.9}} - - {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: singleheader, run: cd samples/singleheader && ./run.sh $BT } - - {name: singleheaderlib-static, run: cd samples/singleheaderlib && ./run_static.sh $BT } - - {name: singleheaderlib-shared, run: cd samples/singleheaderlib && ./run_shared.sh $BT } - - {name: add_subdirectory, run: cd samples/add_subdirectory && ./run.sh $BT } - - {name: find_package, run: cd samples/find_package && ./run.sh $BT } - - {name: custom_c4core, run: cd samples/custom_c4core && ./run.sh $BT } - - {name: fetch_content, run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA } + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: python3 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - 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: singleheader + run: cd samples/singleheader && ./run.sh $BT + - name: singleheaderlib-static + run: cd samples/singleheaderlib && ./run_static.sh $BT + - name: singleheaderlib-shared + run: cd samples/singleheaderlib && ./run_shared.sh $BT + - name: add_subdirectory + run: cd samples/add_subdirectory && ./run.sh $BT + - name: find_package + run: cd samples/find_package && ./run.sh $BT + - name: custom_c4core + run: cd samples/custom_c4core && ./run.sh $BT + - name: fetch_content + run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3fa2d1618..9de18800d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,28 +1,22 @@ -name: windows +# DO NOT EDIT - GENERATED FROM .github/workflows-ys/windows.yml +name: windows defaults: run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: +'on': + workflow_dispatch: null push: branches: - master pull_request: branches: - master - env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - - + NUM_JOBS_BUILD: null jobs: vs: name: ${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} @@ -36,95 +30,103 @@ jobs: fail-fast: false matrix: include: - # vs2017 is only availble in windows-2016 - #- {std: 11, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} - #- {std: 11, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} - #- {std: 14, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} - #- {std: 14, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} - # - - {std: 11, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} - - {std: 11, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} - - {std: 17, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} - - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} - # - - {std: 11, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 11, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} - - {std: 17, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} - - {std: 20, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {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}}"} + - std: 11 + cxx: vs2019 + bt: Debug + os: windows-2019 + bitlinks: shared64 static32 + - std: 11 + cxx: vs2019 + bt: Release + os: windows-2019 + bitlinks: shared64 static32 + - std: 17 + cxx: vs2019 + bt: Debug + os: windows-2019 + bitlinks: shared64 static32 + - std: 17 + cxx: vs2019 + bt: Release + os: windows-2019 + bitlinks: shared64 static32 + - std: 11 + cxx: vs2022 + bt: Debug + os: windows-2022 + bitlinks: shared64 static32 + - std: 11 + cxx: vs2022 + bt: Release + os: windows-2022 + bitlinks: shared64 static32 + - std: 17 + cxx: vs2022 + bt: Debug + os: windows-2022 + bitlinks: shared64 static32 + - std: 17 + cxx: vs2022 + bt: Release + os: windows-2022 + bitlinks: shared64 static32 + - std: 20 + cxx: vs2022 + bt: Debug + os: windows-2022 + bitlinks: shared64 static32 + - 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}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {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: 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} - -# 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: {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, 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} + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - 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: 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 From b672a7f3689f3a18d6f03d57ca94b019299aa4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Thu, 2 Jan 2025 15:05:35 -0500 Subject: [PATCH 02/22] Add Makefile and README.md to .github/workflows-src/ --- .github/workflows-src/Makefile | 19 +++++++++++++++---- .github/workflows-src/README.md | 8 +++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows-src/Makefile b/.github/workflows-src/Makefile index 3934221b2..becbb14c2 100644 --- a/.github/workflows-src/Makefile +++ b/.github/workflows-src/Makefile @@ -1,22 +1,33 @@ SHELL := bash -SRC_FILES := $(wildcard *.yml) -TARGET_FILES := $(SRC_FILES:%=../workflows/%) - YS_VERSION := 0.1.87 YS_PREFIX := /tmp/rapidyaml YS := $(YS_PREFIX)/bin/ys-$(YS_VERSION) +SOURCE_FILES := $(wildcard *.yml) +TARGET_FILES := $(SOURCE_FILES:%=../workflows/%) + +export PATH := $(YS_PREFIX)/bin:$(PATH) +export YSPATH := $(shell pwd -P)/ys + default: build: $(TARGET_FILES) +test: force build + @git diff --exit-code ../workflows && \ + echo -e '\nPASS - No normative changes to .github/workflows' + +force: + touch *.yml + ../workflows/%: % $(YS) @echo "# DO NOT EDIT - GENERATED FROM .github/workflows-ys/$<" > $@ @echo >> $@ - $(YS) -Y $< >> $@ + ys -Y $< >> $@ +# Auto install a specific version of ys (under /tmp): $(YS): curl -s https://yamlscript.org/install | \ BIN=1 VERSION=$(YS_VERSION) PREFIX=$(YS_PREFIX) bash diff --git a/.github/workflows-src/README.md b/.github/workflows-src/README.md index 09ed302c7..862aead87 100644 --- a/.github/workflows-src/README.md +++ b/.github/workflows-src/README.md @@ -8,10 +8,16 @@ Source files for generating `.github/workflows/*.yml` files. ```bash $ make build +$ make test ``` ## Description Edit files in this directory and run `make build` to generate the files used by -GitHub Actions. +GitHub Actions (the files in `.github/workflows/`). + +Running `make test` runs `make build` and shows the diff in the +`.github/workflows/` directory. +If you are only refactoring the source files, you should see no diff when you +run this. From 3e2b8b6eaaf95f5e574f62964d74a549b3e0ffe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Thu, 2 Jan 2025 15:32:54 -0500 Subject: [PATCH 03/22] Add standard workflow-setup to start of each yml --- .github/workflows-src/benchmarks.yml | 19 +++---------------- .github/workflows-src/clang.yml | 20 +++----------------- .github/workflows-src/clang_tidy.yml | 19 +++---------------- .github/workflows-src/coverage.yml | 19 +++---------------- .github/workflows-src/emscripten.yml | 19 +++---------------- .github/workflows-src/gcc.yml | 20 +++----------------- .github/workflows-src/install.yml | 19 +++---------------- .github/workflows-src/macosx.yml | 19 +++---------------- .github/workflows-src/rarearchs.yml | 19 +++---------------- .github/workflows-src/release.yml | 27 +++++++-------------------- .github/workflows-src/samples.yml | 19 +++---------------- .github/workflows-src/windows.yml | 19 +++---------------- .github/workflows-src/ys/common.ys | 19 +++++++++++++++++++ 13 files changed, 59 insertions(+), 198 deletions(-) create mode 100644 .github/workflows-src/ys/common.ys diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index dbe9f5cba..147d80df2 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -1,20 +1,7 @@ -name: benchmarks +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index bca66f6c4..a44406912 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -1,21 +1,7 @@ -name: clang +!yamlscript/v0: -defaults: - #if: "!contains(github.event.head_commit.message, 'skip ci')" # SKIP - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index ef5c6ccf2..beaa8c729 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -1,20 +1,7 @@ -name: clang_tidy +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/coverage.yml b/.github/workflows-src/coverage.yml index d2e7872c3..c96ad9f78 100644 --- a/.github/workflows-src/coverage.yml +++ b/.github/workflows-src/coverage.yml @@ -1,20 +1,7 @@ -name: coverage +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml index 313d52422..1a6d0c5f6 100644 --- a/.github/workflows-src/emscripten.yml +++ b/.github/workflows-src/emscripten.yml @@ -1,20 +1,7 @@ -name: emscripten +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index de2b2d09b..752a3d491 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -1,21 +1,7 @@ -name: gcc +!yamlscript/v0: -defaults: - #if: "!contains(github.event.head_commit.message, 'skip ci')" # SKIP - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/install.yml b/.github/workflows-src/install.yml index e72f670ac..2e426cd6a 100644 --- a/.github/workflows-src/install.yml +++ b/.github/workflows-src/install.yml @@ -1,20 +1,7 @@ -name: test_install +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup('test_install') env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index a3fee8efe..5d3642912 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -1,20 +1,7 @@ -name: macosx +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index 5b799bb76..076a5808f 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -1,20 +1,7 @@ -name: rarearchs +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() jobs: rarearchs: diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index c64856df1..bf66b9f05 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -1,24 +1,11 @@ -name: release +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - tags: - - v0.* - - v1.* - - v2.* - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: + workflow-setup 'release':: + push: + tags: [v0.*, v1.*, v2.*] + branches: [master] env: PROJ_PKG_NAME: rapidyaml- diff --git a/.github/workflows-src/samples.yml b/.github/workflows-src/samples.yml index e811d8346..46c9e227e 100644 --- a/.github/workflows-src/samples.yml +++ b/.github/workflows-src/samples.yml @@ -1,20 +1,7 @@ -name: samples +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index 3fa2d1618..125f537c8 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -1,20 +1,7 @@ -name: windows +!yamlscript/v0: -defaults: - run: - # 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: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 - workflow_dispatch: - push: - branches: - - master - pull_request: - branches: - - master +:: use(common) +:: workflow-setup() env: PROJ_PFX_TARGET: ryml- diff --git a/.github/workflows-src/ys/common.ys b/.github/workflows-src/ys/common.ys new file mode 100644 index 000000000..9e914c996 --- /dev/null +++ b/.github/workflows-src/ys/common.ys @@ -0,0 +1,19 @@ +!yamlscript/v0 + +defn workflow-setup(name=nil overrides={}):: + name =: name || FILE.replace(/.*\//).replace(/\.yml$/) + + 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 + shell: bash -e -x {0} + on:: + merge _ overrides:: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: [master] + pull_request: + branches: [master] From 74b7c4227fd0937e8e76f2fffa2a90f1364ec693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Thu, 2 Jan 2025 16:35:17 -0500 Subject: [PATCH 04/22] DRY up massive duplication in steps --- .github/workflows-src/clang.yml | 114 ++----------------- .github/workflows-src/clang_tidy.yml | 24 +--- .github/workflows-src/gcc.yml | 125 +-------------------- .github/workflows-src/macosx.yml | 23 +--- .github/workflows-src/share/gcc-setup.yaml | 20 ++++ .github/workflows-src/share/steps.yaml | 23 ++++ .github/workflows-src/windows.yml | 23 +--- .github/workflows/macosx.yml | 16 +-- .github/workflows/windows.yml | 16 +-- 9 files changed, 77 insertions(+), 307 deletions(-) create mode 100644 .github/workflows-src/share/gcc-setup.yaml create mode 100644 .github/workflows-src/share/steps.yaml diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index a44406912..90224aa18 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -2,6 +2,7 @@ :: use(common) :: workflow-setup() +common-steps =: load('share/steps.yaml') env: PROJ_PFX_TARGET: ryml- @@ -30,29 +31,8 @@ jobs: env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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} + - run: git config --system --add safe.directory '*' + - :: common-steps #---------------------------------------------------------------------------- clang_tabtokens: @@ -76,27 +56,7 @@ jobs: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - run: c4core-install $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} + - :: common-steps.drop(1) #---------------------------------------------------------------------------- clang_noexceptions: @@ -118,27 +78,7 @@ jobs: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - 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} + - :: common-steps.drop(1) #---------------------------------------------------------------------------- clang_extended: @@ -200,27 +140,7 @@ jobs: git reset --hard FETCH_HEAD git submodule update --init --recursive - 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} + - :: common-steps.drop(1) #---------------------------------------------------------------------------- clangsan: @@ -254,27 +174,7 @@ jobs: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - 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} + - :: common-steps.drop(1) #---------------------------------------------------------------------------- # # https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/ diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index beaa8c729..a86f3ae6e 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -2,6 +2,7 @@ :: use(common) :: workflow-setup() +common-steps =: load('share/steps.yaml') env: PROJ_PFX_TARGET: ryml- @@ -36,25 +37,4 @@ jobs: steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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} + - :: common-steps diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index 752a3d491..5537401db 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -2,6 +2,8 @@ :: use(common) :: workflow-setup() +gcc-setup =: load('share/gcc-setup.yaml') +common-steps =: load('share/steps.yaml') env: PROJ_PFX_TARGET: ryml- @@ -32,46 +34,7 @@ jobs: - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} - steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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} + steps:: gcc-setup + common-steps #---------------------------------------------------------------------------- gcc_O2: # see https://github.com/biojppm/rapidyaml/issues/440 @@ -128,46 +91,7 @@ jobs: env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} - steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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} + steps:: gcc-setup + common-steps #---------------------------------------------------------------------------- gcc_noexceptions: @@ -270,46 +194,7 @@ jobs: - {std: 11, cxx: g++-4.8, bt: Debug , img: ubuntu18.04} - {std: 11, cxx: g++-4.8, bt: Release, img: ubuntu18.04} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} - steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive - - 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} + steps:: gcc-setup + common-steps #---------------------------------------------------------------------------- gccsan: diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index 5d3642912..cb75db55c 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -2,6 +2,7 @@ :: use(common) :: workflow-setup() +common-steps =: load('share/steps.yaml') env: PROJ_PFX_TARGET: ryml- @@ -38,24 +39,4 @@ jobs: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - {name: xcode, uses: maxim-lobanov/setup-xcode@v1, with: {xcode-version: "${{matrix.xcver}}" }} - {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: 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} + - :: common-steps.drop(1) diff --git a/.github/workflows-src/share/gcc-setup.yaml b/.github/workflows-src/share/gcc-setup.yaml new file mode 100644 index 000000000..c0b5eeceb --- /dev/null +++ b/.github/workflows-src/share/gcc-setup.yaml @@ -0,0 +1,20 @@ +# Cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs +# version. +#- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} +# Needed for running in the docker image. +# See https://github.com/actions/checkout/issues/1169 +#- run: git config --system --add safe.directory '*' +#... so we checkout manually: +- name: checkout + run: | + set -x + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive diff --git a/.github/workflows-src/share/steps.yaml b/.github/workflows-src/share/steps.yaml new file mode 100644 index 000000000..795abb878 --- /dev/null +++ b/.github/workflows-src/share/steps.yaml @@ -0,0 +1,23 @@ +- 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} + diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index 125f537c8..424a5fd98 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -2,6 +2,7 @@ :: use(common) :: workflow-setup() +common-steps =: load('share/steps.yaml') env: PROJ_PFX_TARGET: ryml- @@ -44,27 +45,7 @@ jobs: steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - {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: 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} + - :: common-steps.drop(1) # TODO: # mingw: diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml index d3768b5e7..599cc6057 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/macosx.yml @@ -115,14 +115,6 @@ jobs: 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 @@ -131,3 +123,11 @@ jobs: 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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9de18800d..d10b7d529 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -114,14 +114,6 @@ jobs: 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 @@ -130,3 +122,11 @@ jobs: 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 From e7a2d494e6e992aa67a7064891437328237f06f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Thu, 2 Jan 2025 16:42:29 -0500 Subject: [PATCH 05/22] Add local workflow fn to simplify python entries --- .github/workflows-src/release.yml | 47 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index bf66b9f05..03ac9d77e 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -188,27 +188,39 @@ jobs: 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(s): + w =: s:words + =>:: + pythonv:: w.0 + cibw_pyv:: w.1:N + cibw_arch:: w.2 + cibw_platform:: w.3 + osname: linux + os: ubuntu-20.04 config: - # the 3-digit versions NEED to be quoted to prevent the version being read as float. (!) - #- {pythonv: '3.13', cibw_pyv: 313, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - #- {pythonv: '3.13', cibw_pyv: 313, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.12', cibw_pyv: 312, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.12', cibw_pyv: 312, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.11', cibw_pyv: 311, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.10', cibw_pyv: 310, cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} - - {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: manylinux_x86_64, osname: linux, os: ubuntu-20.04} - - {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: i686 , cibw_platform: manylinux_i686 , osname: linux, os: ubuntu-20.04} + #- !:python 3.13 313 x86_64 manylinux_x86_64 + #- !:python 3.13 313 i686 manylinux_i686 + - !:python 3.12 312 x86_64 manylinux_x86_64 + - !:python 3.12 312 i686 manylinux_i686 + - !:python 3.11 311 x86_64 manylinux_x86_64 + - !:python 3.11 311 i686 manylinux_i686 + - !:python 3.10 310 x86_64 manylinux_x86_64 + - !:python 3.10 310 i686 manylinux_i686 + - !:python 3.9 39 x86_64 manylinux_x86_64 + - !:python 3.9 39 i686 manylinux_i686 + - !:python 3.8 38 x86_64 manylinux_x86_64 + - !:python 3.8 38 i686 manylinux_i686 + - !:python 3.7 37 x86_64 manylinux_x86_64 + - !:python 3.7 37 i686 manylinux_i686 + - !:python 3.6 36 x86_64 manylinux_x86_64 + - !:python 3.6 36 i686 manylinux_i686 + # the windows builds are disabled because they are causing problems and preventing the release. # the problems are related to CMakeExtension forcing the use of Ninja # which does not play well with the -G 'Visual Studio...' option used below. @@ -233,6 +245,7 @@ jobs: #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + steps: # use fetch-depth to ensure all tags are fetched - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} From 752dbde1cd98a1c2bc6466f1390922cc0a1c0813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Thu, 2 Jan 2025 20:27:58 -0500 Subject: [PATCH 06/22] Include workflow bash scripts from files --- .../bash/benchmarks-install.bash | 7 ++ .../workflows-src/bash/benchmarks-run.bash | 11 +++ .../workflows-src/bash/benchmarks-vars-1.bash | 7 ++ .../workflows-src/bash/benchmarks-vars-2.bash | 14 +++ .../workflows-src/bash/clang-checkout.bash | 11 +++ .github/workflows-src/bash/gcc-checkout.bash | 11 +++ .github/workflows-src/bash/gcc-configure.bash | 6 ++ .../workflows-src/bash/install-configure.bash | 10 ++ .../bash/install-preinstall.bash | 6 ++ .../bash/rarearchs-test-install.bash | 23 +++++ .../bash/rarearchs-test-run.bash | 26 ++++++ .../bash/release-create-source-packages.bash | 12 +++ .../workflows-src/bash/release-normalize.bash | 4 + .../bash/release-package-python.bash | 3 + .../workflows-src/bash/release-save-vars.bash | 8 ++ .../bash/release-shared-normalize.bash | 7 ++ .../bash/release-test-with-python.bash | 20 ++++ .../workflows-src/bash/release-vars-1.bash | 7 ++ .../workflows-src/bash/release-vars-2.bash | 13 +++ .github/workflows-src/benchmarks.yml | 50 +--------- .github/workflows-src/clang.yml | 13 +-- .github/workflows-src/gcc.yml | 34 +------ .github/workflows-src/install.yml | 20 +--- .github/workflows-src/rarearchs.yml | 53 +---------- .github/workflows-src/release.yml | 91 ++----------------- .github/workflows-src/ys/common.ys | 3 + 26 files changed, 230 insertions(+), 240 deletions(-) create mode 100644 .github/workflows-src/bash/benchmarks-install.bash create mode 100644 .github/workflows-src/bash/benchmarks-run.bash create mode 100644 .github/workflows-src/bash/benchmarks-vars-1.bash create mode 100644 .github/workflows-src/bash/benchmarks-vars-2.bash create mode 100644 .github/workflows-src/bash/clang-checkout.bash create mode 100644 .github/workflows-src/bash/gcc-checkout.bash create mode 100644 .github/workflows-src/bash/gcc-configure.bash create mode 100644 .github/workflows-src/bash/install-configure.bash create mode 100644 .github/workflows-src/bash/install-preinstall.bash create mode 100644 .github/workflows-src/bash/rarearchs-test-install.bash create mode 100644 .github/workflows-src/bash/rarearchs-test-run.bash create mode 100644 .github/workflows-src/bash/release-create-source-packages.bash create mode 100644 .github/workflows-src/bash/release-normalize.bash create mode 100644 .github/workflows-src/bash/release-package-python.bash create mode 100644 .github/workflows-src/bash/release-save-vars.bash create mode 100644 .github/workflows-src/bash/release-shared-normalize.bash create mode 100644 .github/workflows-src/bash/release-test-with-python.bash create mode 100644 .github/workflows-src/bash/release-vars-1.bash create mode 100644 .github/workflows-src/bash/release-vars-2.bash diff --git a/.github/workflows-src/bash/benchmarks-install.bash b/.github/workflows-src/bash/benchmarks-install.bash new file mode 100644 index 000000000..3e5f15feb --- /dev/null +++ b/.github/workflows-src/bash/benchmarks-install.bash @@ -0,0 +1,7 @@ +which python +which pip +python --version +pip --version +pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt +python -c 'import munch ; print("ok!") ; exit(0)' +echo $? diff --git a/.github/workflows-src/bash/benchmarks-run.bash b/.github/workflows-src/bash/benchmarks-run.bash new file mode 100644 index 000000000..1833b062e --- /dev/null +++ b/.github/workflows-src/bash/benchmarks-run.bash @@ -0,0 +1,11 @@ +set -x +source vars.sh +echo SRC_TAG=$SRC_TAG +echo SRC_VERSION=$SRC_VERSION +desc=$SRC_TAG +for bl in ${{matrix.bitlinks}} ; do + dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g') + mkdir -p $dst + find build -name bm-results + mv -vf build/$bl/bm/bm-results/* $dst/. +done diff --git a/.github/workflows-src/bash/benchmarks-vars-1.bash b/.github/workflows-src/bash/benchmarks-vars-1.bash new file mode 100644 index 000000000..2b69d1205 --- /dev/null +++ b/.github/workflows-src/bash/benchmarks-vars-1.bash @@ -0,0 +1,7 @@ +# https://github.community/t/how-to-get-just-the-tag-name/16241/11 +SRC_TAG=${GITHUB_REF#refs/tags/} +SRC_VERSION=${GITHUB_REF#refs/tags/v} +cat < vars.sh +export SRC_TAG=$SRC_TAG +export SRC_VERSION=$SRC_VERSION +EOF diff --git a/.github/workflows-src/bash/benchmarks-vars-2.bash b/.github/workflows-src/bash/benchmarks-vars-2.bash new file mode 100644 index 000000000..43f9154b1 --- /dev/null +++ b/.github/workflows-src/bash/benchmarks-vars-2.bash @@ -0,0 +1,14 @@ +set -x +branch_name=${GITHUB_REF#refs/heads/} +# builds triggered from PRs have the branch_name like this: refs/pull/150/merge +# so filter to eg pr0150_merge +branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` +# sanitize the branch name; eg merge/foo-bar -> merge_foo_bar +branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` +git config --global --add safe.directory $(pwd) +SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 +SRC_VERSION="${branch_name}-${SRC_TAG}" +cat < vars.sh +export SRC_TAG=$SRC_TAG +export SRC_VERSION=$SRC_VERSION +EOF diff --git a/.github/workflows-src/bash/clang-checkout.bash b/.github/workflows-src/bash/clang-checkout.bash new file mode 100644 index 000000000..dd6c74143 --- /dev/null +++ b/.github/workflows-src/bash/clang-checkout.bash @@ -0,0 +1,11 @@ +set -x +echo GITHUB_REF=$GITHUB_REF +echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF +branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 +echo branch=$branch +git init -q . +git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 +git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY +git fetch origin $branch +git reset --hard FETCH_HEAD +git submodule update --init --recursive diff --git a/.github/workflows-src/bash/gcc-checkout.bash b/.github/workflows-src/bash/gcc-checkout.bash new file mode 100644 index 000000000..dd6c74143 --- /dev/null +++ b/.github/workflows-src/bash/gcc-checkout.bash @@ -0,0 +1,11 @@ +set -x +echo GITHUB_REF=$GITHUB_REF +echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF +branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 +echo branch=$branch +git init -q . +git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 +git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY +git fetch origin $branch +git reset --hard FETCH_HEAD +git submodule update --init --recursive diff --git a/.github/workflows-src/bash/gcc-configure.bash b/.github/workflows-src/bash/gcc-configure.bash new file mode 100644 index 000000000..62efab660 --- /dev/null +++ b/.github/workflows-src/bash/gcc-configure.bash @@ -0,0 +1,6 @@ +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 diff --git a/.github/workflows-src/bash/install-configure.bash b/.github/workflows-src/bash/install-configure.bash new file mode 100644 index 000000000..ac09a10c7 --- /dev/null +++ b/.github/workflows-src/bash/install-configure.bash @@ -0,0 +1,10 @@ +mkdir -p $BDIR +mkdir -p $IDIR +cmake -S ${{matrix.sdir}} -B $BDIR \ + -DRYML_BUILD_TESTS=ON \ + -DRYML_VALGRIND=OFF \ + -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ + -DCMAKE_INSTALL_PREFIX=$IDIR \ + ${{matrix.gen}} \ + ${{matrix.vars}} \ + ${{matrix.commonvars}} diff --git a/.github/workflows-src/bash/install-preinstall.bash b/.github/workflows-src/bash/install-preinstall.bash new file mode 100644 index 000000000..febec4a7b --- /dev/null +++ b/.github/workflows-src/bash/install-preinstall.bash @@ -0,0 +1,6 @@ +if [ "${{matrix.sdir}}" == "test/test_install" ] ; then + mkdir -p $BDIR-staging + cmake -S . -B $BDIR-staging -DCMAKE_INSTALL_PREFIX=$PDIR -DCMAKE_BUILD_TYPE=${{matrix.bt}} ${{matrix.gen}} ${{matrix.commonvars}} + cmake --build $BDIR-staging --config ${{matrix.bt}} --target ${{matrix.tgt}} -j + cmake --build $BDIR-staging --config ${{matrix.bt}} --target install +fi diff --git a/.github/workflows-src/bash/rarearchs-test-install.bash b/.github/workflows-src/bash/rarearchs-test-install.bash new file mode 100644 index 000000000..3a8b1fcda --- /dev/null +++ b/.github/workflows-src/bash/rarearchs-test-install.bash @@ -0,0 +1,23 @@ +set -x +start_time=$SECONDS +time apt-get update -y +time apt-get install -y \ + git \ + build-essential +# arm platforms need an up-to-date cmake: +# https://gitlab.kitware.com/cmake/cmake/-/issues/20568 +if [ "${{matrix.arch}}" == "armv6" ] || [ "${{matrix.arch}}" == "armv7" ] ; then + time apt-get install -y \ + gpg \ + wget \ + apt-transport-https + wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null + time apt-get update -y + rm /usr/share/keyrings/kitware-archive-keyring.gpg + time apt-get install kitware-archive-keyring + time apt-get update -y +fi +time apt-get install -y cmake cmake-data +cmake --version +echo "install took $((SECONDS - start_time))" diff --git a/.github/workflows-src/bash/rarearchs-test-run.bash b/.github/workflows-src/bash/rarearchs-test-run.bash new file mode 100644 index 000000000..882538c61 --- /dev/null +++ b/.github/workflows-src/bash/rarearchs-test-run.bash @@ -0,0 +1,26 @@ +set -x +start_time=$SECONDS +uname -a +pwd +ls -lFhp . +# +bdir=build_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} +idir=install_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} +mkdir -p $bdir +# +time cmake -S . -B $bdir \ + -DCMAKE_INSTALL_PREFIX=$idir \ + -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ + -DC4_CXX_STANDARD=${{matrix.std}} \ + -DCXX_STANDARD=${{matrix.std}} \ + -DRYML_DEV=ON \ + -DRYML_TEST_SUITE=ON \ + -DRYML_BUILD_BENCHMARKS=OFF \ + -DRYML_SANITIZE=OFF \ + -DRYML_LINT=OFF \ + -DRYML_VALGRIND=OFF +# +time cmake --build $bdir -j 3 --target ryml-test-build +# +time cmake --build $bdir -j 3 --target ryml-test-run +echo "run took $((SECONDS - start_time))" diff --git a/.github/workflows-src/bash/release-create-source-packages.bash b/.github/workflows-src/bash/release-create-source-packages.bash new file mode 100644 index 000000000..d548fd498 --- /dev/null +++ b/.github/workflows-src/bash/release-create-source-packages.bash @@ -0,0 +1,12 @@ +pwd +ls -lFhp +source vars.sh +echo SRC_TAG=$SRC_TAG +echo SRC_VERSION=$SRC_VERSION +id=${PROJ_PKG_NAME}${SRC_VERSION} +name=${id}-src +mkdir -p assets +git-archive-all --prefix $name assets/$name.tgz +git-archive-all --prefix $name assets/$name.zip +python --version +python tools/amalgamate.py assets/$id.hpp diff --git a/.github/workflows-src/bash/release-normalize.bash b/.github/workflows-src/bash/release-normalize.bash new file mode 100644 index 000000000..0af47e420 --- /dev/null +++ b/.github/workflows-src/bash/release-normalize.bash @@ -0,0 +1,4 @@ +sdist_orig=`find dist -type f -name 'rapidyaml-*.zip'` +[ ! -f $sdist_orig ] && exit 1 +sdist=`echo $sdist_orig | sed 's:\.zip:-python_src.zip:'` +mv -fv $sdist_orig $sdist diff --git a/.github/workflows-src/bash/release-package-python.bash b/.github/workflows-src/bash/release-package-python.bash new file mode 100644 index 000000000..b1b6f9329 --- /dev/null +++ b/.github/workflows-src/bash/release-package-python.bash @@ -0,0 +1,3 @@ +python --version +pip install -v -r requirements.txt +python setup.py sdist --formats=zip diff --git a/.github/workflows-src/bash/release-save-vars.bash b/.github/workflows-src/bash/release-save-vars.bash new file mode 100644 index 000000000..c6ab4cc45 --- /dev/null +++ b/.github/workflows-src/bash/release-save-vars.bash @@ -0,0 +1,8 @@ +source vars.sh +version_body=${{github.workspace}}/changelog/$SRC_VERSION.md +if [ ! -f $version_body ] ; then + echo "version body file was not found: $version_body" + exit 1 +fi +echo "VERSION=$SRC_VERSION >> $GITHUB_OUTPUT" +echo "VERSION_BODY=$version_body >> $GITHUB_OUTPUT" diff --git a/.github/workflows-src/bash/release-shared-normalize.bash b/.github/workflows-src/bash/release-shared-normalize.bash new file mode 100644 index 000000000..becadf473 --- /dev/null +++ b/.github/workflows-src/bash/release-shared-normalize.bash @@ -0,0 +1,7 @@ +set -x +source vars.sh +mkdir -p assets +asset_src=`ls -1 ./build/shared64/*-${{matrix.config.sfxg}}` +asset_dst=./assets/${PROJ_PKG_NAME}${SRC_VERSION}-${{matrix.config.sfxp}} +[ ! -f $asset_src ] && exit 1 +cp -fav $asset_src $asset_dst diff --git a/.github/workflows-src/bash/release-test-with-python.bash b/.github/workflows-src/bash/release-test-with-python.bash new file mode 100644 index 000000000..73cf4f160 --- /dev/null +++ b/.github/workflows-src/bash/release-test-with-python.bash @@ -0,0 +1,20 @@ +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 diff --git a/.github/workflows-src/bash/release-vars-1.bash b/.github/workflows-src/bash/release-vars-1.bash new file mode 100644 index 000000000..2b69d1205 --- /dev/null +++ b/.github/workflows-src/bash/release-vars-1.bash @@ -0,0 +1,7 @@ +# https://github.community/t/how-to-get-just-the-tag-name/16241/11 +SRC_TAG=${GITHUB_REF#refs/tags/} +SRC_VERSION=${GITHUB_REF#refs/tags/v} +cat < vars.sh +export SRC_TAG=$SRC_TAG +export SRC_VERSION=$SRC_VERSION +EOF diff --git a/.github/workflows-src/bash/release-vars-2.bash b/.github/workflows-src/bash/release-vars-2.bash new file mode 100644 index 000000000..7deeaa8cb --- /dev/null +++ b/.github/workflows-src/bash/release-vars-2.bash @@ -0,0 +1,13 @@ +set -x +branch_name=${GITHUB_REF#refs/heads/} +# builds triggered from PRs have the branch_name like this: refs/pull/150/merge +# so filter to eg pr0150_merge +branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` +# sanitize the branch name; eg merge/foo-bar -> merge_foo_bar +branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` +SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 +SRC_VERSION="${branch_name}-${SRC_TAG}" +cat < vars.sh +export SRC_TAG=$SRC_TAG +export SRC_VERSION=$SRC_VERSION +EOF diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index 147d80df2..82033d89e 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -9,9 +9,7 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: # 4 - jobs: - gettag: runs-on: ubuntu-latest steps: @@ -19,31 +17,10 @@ jobs: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - name: Variables (from tag) if: contains(github.ref, 'tags/v') - run: | - # https://github.community/t/how-to-get-just-the-tag-name/16241/11 - SRC_TAG=${GITHUB_REF#refs/tags/} - SRC_VERSION=${GITHUB_REF#refs/tags/v} - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF + run:: bash('benchmarks-vars-1') - name: Variables (from commit, no tag) if: ${{ !contains(github.ref, 'tags/v') }} - run: | - set -x - branch_name=${GITHUB_REF#refs/heads/} - # builds triggered from PRs have the branch_name like this: refs/pull/150/merge - # so filter to eg pr0150_merge - branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` - # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar - branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` - git config --global --add safe.directory $(pwd) - SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 - SRC_VERSION="${branch_name}-${SRC_TAG}" - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF + run:: bash('benchmarks-vars-2') - name: Verify vars.sh run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - name: Save vars.sh @@ -86,14 +63,7 @@ jobs: uses: actions/setup-python@v5 with: { python-version: '3.10' } - name: install benchmark plotting dependencies - run: | - 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 $? + run:: bash('benchmarks-install') - name: shared64-configure--------------------------------------------------- run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared64 - {name: shared64-build, run: source .github/setenv.sh && c4_build_target shared64 ryml-bm-build} @@ -115,18 +85,8 @@ jobs: - {name: shared32-run, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run} - {name: shared32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 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 + run:: bash('benchmarks-run') + - name: upload benchmark result artifacts uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index 90224aa18..97012494e 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -127,18 +127,7 @@ jobs: #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} #... so we checkout manually: - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive + run:: bash('clang-checkout') - run: c4core-install ${{matrix.cxx}} - :: common-steps.drop(1) diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index 5537401db..e28a7a968 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -55,13 +55,7 @@ jobs: - 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 + run:: bash('gcc-configure') - name: build run: | cmake --build build_o2 --target ryml-test-build -j --verbose @@ -115,18 +109,7 @@ jobs: #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 #... so we checkout manually: - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive + run:: bash('gcc-checkout') - run: c4core-install ${{matrix.cxx}} - {name: show info, run: source .github/setenv.sh && c4_show_info} - name: shared64-configure--------------------------------------------------- @@ -274,18 +257,7 @@ jobs: #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 #... so we checkout manually: - name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive + run:: bash('gcc-checkout') - name: install gcc-arm-linux-gnueabihf run: | c4core-install arm-linux-gnueabihf diff --git a/.github/workflows-src/install.yml b/.github/workflows-src/install.yml index 2e426cd6a..e8936f0d8 100644 --- a/.github/workflows-src/install.yml +++ b/.github/workflows-src/install.yml @@ -65,25 +65,9 @@ jobs: uses: actions/setup-python@v5 with: { python-version: 3.9 } - name: preinstall - run: | - if [ "${{matrix.sdir}}" == "test/test_install" ] ; then - mkdir -p $BDIR-staging - cmake -S . -B $BDIR-staging -DCMAKE_INSTALL_PREFIX=$PDIR -DCMAKE_BUILD_TYPE=${{matrix.bt}} ${{matrix.gen}} ${{matrix.commonvars}} - cmake --build $BDIR-staging --config ${{matrix.bt}} --target ${{matrix.tgt}} -j - cmake --build $BDIR-staging --config ${{matrix.bt}} --target install - fi + run:: bash('install-preinstall') - name: configure - run: | - mkdir -p $BDIR - mkdir -p $IDIR - cmake -S ${{matrix.sdir}} -B $BDIR \ - -DRYML_BUILD_TESTS=ON \ - -DRYML_VALGRIND=OFF \ - -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ - -DCMAKE_INSTALL_PREFIX=$IDIR \ - ${{matrix.gen}} \ - ${{matrix.vars}} \ - ${{matrix.commonvars}} + run:: bash('install-configure') - name: build run: | cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index 076a5808f..7ed931d3f 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -57,54 +57,5 @@ jobs: with: arch: ${{matrix.arch}} distro: ${{matrix.distro}} - install: | - set -x - start_time=$SECONDS - time apt-get update -y - time apt-get install -y \ - git \ - build-essential - # arm platforms need an up-to-date cmake: - # https://gitlab.kitware.com/cmake/cmake/-/issues/20568 - if [ "${{matrix.arch}}" == "armv6" ] || [ "${{matrix.arch}}" == "armv7" ] ; then - time apt-get install -y \ - gpg \ - wget \ - apt-transport-https - wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null - echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null - time apt-get update -y - rm /usr/share/keyrings/kitware-archive-keyring.gpg - time apt-get install kitware-archive-keyring - time apt-get update -y - fi - time apt-get install -y cmake cmake-data - cmake --version - echo "install took $((SECONDS - start_time))" - run: | - set -x - start_time=$SECONDS - uname -a - pwd - ls -lFhp . - # - bdir=build_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} - idir=install_${{matrix.arch}}_${{matrix.bt}}_${{matrix.std}} - mkdir -p $bdir - # - time cmake -S . -B $bdir \ - -DCMAKE_INSTALL_PREFIX=$idir \ - -DCMAKE_BUILD_TYPE=${{matrix.bt}} \ - -DC4_CXX_STANDARD=${{matrix.std}} \ - -DCXX_STANDARD=${{matrix.std}} \ - -DRYML_DEV=ON \ - -DRYML_TEST_SUITE=ON \ - -DRYML_BUILD_BENCHMARKS=OFF \ - -DRYML_SANITIZE=OFF \ - -DRYML_LINT=OFF \ - -DRYML_VALGRIND=OFF - # - time cmake --build $bdir -j 3 --target ryml-test-build - # - time cmake --build $bdir -j 3 --target ryml-test-run - echo "run took $((SECONDS - start_time))" + install:: bash('rarearchs-test-install') + run:: bash('rarearchs-test-run') diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index 03ac9d77e..061034477 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -31,30 +31,10 @@ jobs: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - name: Variables (from tag) if: contains(github.ref, 'tags/v') - run: | - # https://github.community/t/how-to-get-just-the-tag-name/16241/11 - SRC_TAG=${GITHUB_REF#refs/tags/} - SRC_VERSION=${GITHUB_REF#refs/tags/v} - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF + run:: bash('release-vars-1') - name: Variables (from commit, no tag) if: ${{ !contains(github.ref, 'tags/v') }} - run: | - set -x - branch_name=${GITHUB_REF#refs/heads/} - # builds triggered from PRs have the branch_name like this: refs/pull/150/merge - # so filter to eg pr0150_merge - branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` - # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar - branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` - SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 - SRC_VERSION="${branch_name}-${SRC_TAG}" - cat < vars.sh - export SRC_TAG=$SRC_TAG - export SRC_VERSION=$SRC_VERSION - EOF + run:: bash('release-vars-2') - name: Verify vars.sh run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - name: Save vars.sh @@ -82,19 +62,7 @@ jobs: run: | sudo -E pip install git-archive-all - name: Create source packages - run: | - pwd - ls -lFhp - source vars.sh - echo SRC_TAG=$SRC_TAG - echo SRC_VERSION=$SRC_VERSION - id=${PROJ_PKG_NAME}${SRC_VERSION} - name=${id}-src - mkdir -p assets - git-archive-all --prefix $name assets/$name.tgz - git-archive-all --prefix $name assets/$name.zip - python --version - python tools/amalgamate.py assets/$id.hpp + run:: bash('release-create-source-packages') - name: Save source artifacts uses: actions/upload-artifact@v3 with: {name: assets, path: assets} @@ -133,14 +101,7 @@ jobs: - name: shared64-pack run: source .github/setenv.sh && c4_package shared64 $GEN - name: shared64-normalize - run: | - set -x - source vars.sh - mkdir -p assets - asset_src=`ls -1 ./build/shared64/*-${{matrix.config.sfxg}}` - asset_dst=./assets/${PROJ_PKG_NAME}${SRC_VERSION}-${{matrix.config.sfxp}} - [ ! -f $asset_src ] && exit 1 - cp -fav $asset_src $asset_dst + run:: bash('release-shared-normalize') - name: Save artifacts uses: actions/upload-artifact@v3 with: {name: assets, path: assets} @@ -163,16 +124,9 @@ jobs: uses: actions/setup-python@v5 with: { python-version: 3.9 } - name: package python src packages - run: | - python --version - pip install -v -r requirements.txt - python setup.py sdist --formats=zip + run:: bash('release-package-python') - name: normalize src package names - run: | - sdist_orig=`find dist -type f -name 'rapidyaml-*.zip'` - [ ! -f $sdist_orig ] && exit 1 - sdist=`echo $sdist_orig | sed 's:\.zip:-python_src.zip:'` - mv -fv $sdist_orig $sdist + run:: bash('release-normalize') - name: Save artifacts uses: actions/upload-artifact@v3 with: {name: dist, path: dist} @@ -264,28 +218,7 @@ jobs: with: python-version: '${{matrix.config.pythonv}}' - name: test with python ${{matrix.config.pythonv}} - run: | - set -x - echo "python ${{matrix.config.pythonv}} ${{matrix.config.py_arch}} ${{matrix.config.cibw_arch}}" - # skip 32 bit tests, as Python 32 bits are not available in ubuntu - arch="${{matrix.config.cibw_arch}}" - if [ "$arch" == "x86" ] || [ "$arch" == "i686" ] ; then - exit 0 - fi - python --version - python -c 'import sys ; import struct ; 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 - + run:: bash('release-test-with-python') #---------------------------------------------------------------------------- release: @@ -320,15 +253,7 @@ jobs: - name: Save vars for following steps if: contains(github.ref, 'tags/v') id: vars - run: | - source vars.sh - version_body=${{github.workspace}}/changelog/$SRC_VERSION.md - if [ ! -f $version_body ] ; then - echo "version body file was not found: $version_body" - exit 1 - fi - echo "VERSION=$SRC_VERSION >> $GITHUB_OUTPUT" - echo "VERSION_BODY=$version_body >> $GITHUB_OUTPUT" + run:: bash('release-save-vars') - name: Move Python packages to assets folder if: contains(github.ref, 'tags/v') run: mv -fv dist/*src.zip assets/. diff --git a/.github/workflows-src/ys/common.ys b/.github/workflows-src/ys/common.ys index 9e914c996..f9b3c6116 100644 --- a/.github/workflows-src/ys/common.ys +++ b/.github/workflows-src/ys/common.ys @@ -17,3 +17,6 @@ defn workflow-setup(name=nil overrides={}):: branches: [master] pull_request: branches: [master] + +defn bash(name): + slurp: "bash/$name.bash" From 07821ca12ddb57ba802419117cf5857b41f8ea14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Thu, 2 Jan 2025 21:07:03 -0500 Subject: [PATCH 07/22] Normalize block seq indentation in workflow yaml files --- .github/workflows-src/benchmarks.yml | 124 +++++----- .github/workflows-src/clang.yml | 202 +++++++-------- .github/workflows-src/clang_tidy.yml | 24 +- .github/workflows-src/codeql.yml | 34 +-- .github/workflows-src/coverage.yml | 74 +++--- .github/workflows-src/emscripten.yml | 42 ++-- .github/workflows-src/gcc.yml | 312 +++++++++++------------ .github/workflows-src/install.yml | 84 +++---- .github/workflows-src/macosx.yml | 26 +- .github/workflows-src/rarearchs.yml | 84 +++---- .github/workflows-src/release.yml | 355 +++++++++++++-------------- .github/workflows-src/samples.yml | 36 +-- .github/workflows-src/windows.yml | 108 ++++---- 13 files changed, 752 insertions(+), 753 deletions(-) diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index 82033d89e..b6248dd61 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -13,19 +13,19 @@ jobs: gettag: runs-on: ubuntu-latest steps: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - name: Variables (from tag) - if: contains(github.ref, 'tags/v') - run:: bash('benchmarks-vars-1') - - name: Variables (from commit, no tag) - if: ${{ !contains(github.ref, 'tags/v') }} - run:: bash('benchmarks-vars-2') - - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - - name: Save vars.sh - uses: actions/upload-artifact@v3 - with: {name: vars.sh, path: ./vars.sh} + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run:: bash('benchmarks-vars-1') + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run:: bash('benchmarks-vars-2') + - name: Verify vars.sh + run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + - name: Save vars.sh + uses: actions/upload-artifact@v3 + with: {name: vars.sh, path: ./vars.sh} benchmarks: name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}} @@ -40,55 +40,55 @@ jobs: 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} - # - - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} - - {std: 20, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} - #- {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} - #- {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} - # - - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} + - {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} + + - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} + - {std: 20, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} + #- {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} + #- {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} + + - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} env: {BM: ON, 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: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: Install python 3.10 for plotting - uses: actions/setup-python@v5 - with: { python-version: '3.10' } - - name: install benchmark plotting dependencies - run:: bash('benchmarks-install') - - name: shared64-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run} - - {name: shared64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot} - - name: static64-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run} - - {name: static64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot} - - name: static32-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run} - - {name: static32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot} - - name: shared32-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run} - - {name: shared32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot} - - name: gather benchmark results - run:: bash('benchmarks-run') + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: Install python 3.10 for plotting + uses: actions/setup-python@v5 + with: { python-version: '3.10' } + - name: install benchmark plotting dependencies + run:: bash('benchmarks-install') + - name: shared64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run} + - {name: shared64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot} + - name: static64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run} + - {name: static64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot} + - name: static32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run} + - {name: static32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot} + - name: shared32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run} + - {name: shared32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot} + - name: gather benchmark results + run:: bash('benchmarks-run') - - name: upload benchmark result artifacts - uses: actions/upload-artifact@v3 - with: - name: ryml-benchmark_results - path: ryml-benchmark_results/ + - name: upload benchmark result artifacts + uses: actions/upload-artifact@v3 + with: + name: ryml-benchmark_results + path: ryml-benchmark_results/ diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index 97012494e..88019a463 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -24,15 +24,15 @@ jobs: fail-fast: false matrix: include: - - {std: 20, cxx: clang++-17 , 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, bt: Release, bitlinks: shared64 static32} + - {std: 20, cxx: clang++-17 , 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, bt: Release, 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}}"} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' - - :: common-steps + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' + - :: common-steps #---------------------------------------------------------------------------- clang_tabtokens: @@ -45,18 +45,18 @@ jobs: fail-fast: false matrix: include: - - {std: 20, cxx: clang++-17 , 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, bt: Release, bitlinks: shared64 static32} + - {std: 20, cxx: clang++-17 , 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, bt: Release, bitlinks: shared64 static32} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - run: c4core-install $CXX_ - - :: common-steps.drop(1) + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - run: c4core-install $CXX_ + - :: common-steps.drop(1) #---------------------------------------------------------------------------- clang_noexceptions: @@ -69,16 +69,16 @@ jobs: fail-fast: false matrix: include: - - {std: 20, cxx: clang++-17 , 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 , bt: Release, bitlinks: shared64 static32} + - {std: 20, cxx: clang++-17 , 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 , bt: Release, bitlinks: shared64 static32} env: {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, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - run: c4core-install ${{matrix.cxx}} - - :: common-steps.drop(1) + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - run: c4core-install ${{matrix.cxx}} + - :: common-steps.drop(1) #---------------------------------------------------------------------------- clang_extended: @@ -91,45 +91,45 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: clang++-17 , bt: Debug , vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-17 , bt: Release, vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-16 , bt: Debug , vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-16 , bt: Release, vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-15 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: clang++-15 , bt: Release, vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: clang++-14 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: clang++-14 , bt: Release, vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: clang++-13 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-13 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-12 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-12 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-11 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-11 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-10 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-10 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-9 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-9 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-8 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-8 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-7 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-7 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-6.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-6.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-5.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-5.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-4.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-4.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-3.9, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-3.9, bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-17 , bt: Debug , vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-17 , bt: Release, vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-16 , bt: Debug , vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-16 , bt: Release, vg: on, img: ubuntu22.04} + - {std: 11, cxx: clang++-15 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 + - {std: 11, cxx: clang++-15 , bt: Release, vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 + - {std: 11, cxx: clang++-14 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 + - {std: 11, cxx: clang++-14 , bt: Release, vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 + - {std: 11, cxx: clang++-13 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-13 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-12 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-12 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-11 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-11 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-10 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-10 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-9 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-9 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-8 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-8 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-7 , bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-7 , bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-6.0, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-6.0, bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-5.0, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-5.0, bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-4.0, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-4.0, bt: Release, vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-3.9, bt: Debug , vg: on, img: ubuntu18.04} + - {std: 11, cxx: clang++-3.9, bt: Release, vg: on, img: ubuntu18.04} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #... so we checkout manually: - - name: checkout - run:: bash('clang-checkout') - - run: c4core-install ${{matrix.cxx}} - - :: common-steps.drop(1) + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #... so we checkout manually: + - name: checkout + run:: bash('clang-checkout') + - run: c4core-install ${{matrix.cxx}} + - :: common-steps.drop(1) #---------------------------------------------------------------------------- clangsan: @@ -142,28 +142,28 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - {std: 11, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: asan, bitlinks: static64} + - {std: 11, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: lsan, bitlinks: static64} + - {std: 11, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: tsan, bitlinks: static64} + - {std: 11, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - {std: 14, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - {std: 17, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - {std: 20, cxx: clang++-17 , bt: ubsan, bitlinks: static64} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - run: c4core-install ${{matrix.cxx}} - - :: common-steps.drop(1) + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - run: c4core-install ${{matrix.cxx}} + - :: common-steps.drop(1) #---------------------------------------------------------------------------- # # https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/ @@ -175,26 +175,26 @@ jobs: # fail-fast: false # matrix: # include: -# # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism -# - {std: 11, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 11, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 14, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 14, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 17, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 20, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism +# - {std: 11, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 11, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# - {std: 14, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 14, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# - {std: 17, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} +# - {std: 20, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} +# - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} # env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} # steps: -# - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} -# - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 -# - {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: clang-tidy, run: cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*" ../path/to/source} -# - {name: cppcheck, run: cmake "-DCMAKE_CXX_CPPCHECK=/usr/bin/cppcheck;--std=c++11" ../path/to/source} -# - {name: cpplint, run: cmake "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=179" ..} -# - {name: include-what-you-use, run: cmake "-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu;--transitive_includes_only" ..} -# - {name: link-what-you-use, run: cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..} +# - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} +# - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 +# - {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: clang-tidy, run: cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*" ../path/to/source} +# - {name: cppcheck, run: cmake "-DCMAKE_CXX_CPPCHECK=/usr/bin/cppcheck;--std=c++11" ../path/to/source} +# - {name: cpplint, run: cmake "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=179" ..} +# - {name: include-what-you-use, run: cmake "-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu;--transitive_includes_only" ..} +# - {name: link-what-you-use, run: cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..} diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index a86f3ae6e..bc68b194a 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -24,17 +24,17 @@ jobs: fail-fast: false matrix: include: - # clang tidy takes a long time, so don't do multiple bits/linktypes - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static32} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static32} + # clang tidy takes a long time, so don't do multiple bits/linktypes + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared64} + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared32} + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static64} + - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static32} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared64} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared32} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static64} + - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: 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}}"} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - :: common-steps + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - :: common-steps diff --git a/.github/workflows-src/codeql.yml b/.github/workflows-src/codeql.yml index 6e0d59a3d..11280e0b1 100644 --- a/.github/workflows-src/codeql.yml +++ b/.github/workflows-src/codeql.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [ "master" ] schedule: - - cron: "41 14 * * 5" + - cron: "41 14 * * 5" jobs: analyze: @@ -23,22 +23,22 @@ jobs: language: [ cpp ] steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - config-file: ./.github/codeql.yml - queries: +security-and-quality + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql.yml + queries: +security-and-quality - - name: Autobuild - uses: github/codeql-action/autobuild@v3 + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{ matrix.language }}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows-src/coverage.yml b/.github/workflows-src/coverage.yml index c96ad9f78..76982b7ab 100644 --- a/.github/workflows-src/coverage.yml +++ b/.github/workflows-src/coverage.yml @@ -25,11 +25,11 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} - - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} - # test also with the debug code enabled - - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} - - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} + - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} + - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} + # test also with the debug code enabled + - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} + - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} 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}}", @@ -41,37 +41,37 @@ jobs: #COVERALLS_PARALLEL: true } steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {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: 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_build_target static64 ryml-coverage} - - name: static64-coverage-artifacts - uses: actions/upload-artifact@v3 - with: - name: coverage-static64 - path: | - build/static64/lcov/ - build/static64/coverage3-final_filtered.lcov - - {name: static64-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static64 codecov} - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - #- {name: static64-submit-coveralls, run: "if [ \"${{matrix.std}}\" == \"17\" ] ; then ( source .github/setenv.sh && c4_submit_coverage static64 coveralls ) ; fi" } - - 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_build_target static32 ryml-coverage} - - name: static32-coverage-artifacts - uses: actions/upload-artifact@v3 - with: - name: coverage-static32-cxx${{matrix.std}} - path: | - build/static32/lcov - build/static32/coverage3-final_filtered.lcov - - {name: static32-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static32 codecov} - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - #- {name: static32-submit-coveralls, run: source .github/setenv.sh && c4_submit_coverage static32 coveralls} + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {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: 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_build_target static64 ryml-coverage} + - name: static64-coverage-artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage-static64 + path: | + build/static64/lcov/ + build/static64/coverage3-final_filtered.lcov + - {name: static64-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static64 codecov} + # Coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + #- {name: static64-submit-coveralls, run: "if [ \"${{matrix.std}}\" == \"17\" ] ; then ( source .github/setenv.sh && c4_submit_coverage static64 coveralls ) ; fi" } + - 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_build_target static32 ryml-coverage} + - name: static32-coverage-artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage-static32-cxx${{matrix.std}} + path: | + build/static32/lcov + build/static32/coverage3-final_filtered.lcov + - {name: static32-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static32 codecov} + # Coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + #- {name: static32-submit-coveralls, run: source .github/setenv.sh && c4_submit_coverage static32 coveralls} # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 # https://github.com/lemurheavy/coveralls-public/issues/1665 @@ -79,7 +79,7 @@ jobs: # needs: [coverage] # runs-on: ubuntu-latest # steps: - # - name: coveralls-notify + # - name: coveralls-notify # #continue-on-error: true # uses: coverallsapp/github-action@master # with: diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml index 1a6d0c5f6..ee87897cf 100644 --- a/.github/workflows-src/emscripten.yml +++ b/.github/workflows-src/emscripten.yml @@ -29,14 +29,14 @@ jobs: fail-fast: false matrix: include: - #- {std: 11, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 11, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 20, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 20, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 11, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 11, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 20, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 20, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} + #- {std: 11, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 11, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} + #- {std: 20, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 20, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} + #- {std: 11, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 11, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} + #- {std: 20, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} + - {std: 20, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} env: STD: "${{matrix.std}}" CXX_: "${{matrix.cxx}}" @@ -47,16 +47,16 @@ jobs: LINT: "${{matrix.lint}}" OS: "${{matrix.os}}" steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: setup emscripten cache - id: cache-system-libraries - uses: actions/cache@v4 - with: {path: "${{env.EMSCRIPTEN_CACHE_FOLDER}}", key: "${{matrix.emver}}-${{runner.os}}"} - - name: setup emscripten - uses: mymindstorm/setup-emsdk@v11 - with: {version: "${{matrix.emver}}", actions-cache-folder: "${{env.EMSCRIPTEN_CACHE_FOLDER}}"} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - 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: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: setup emscripten cache + id: cache-system-libraries + uses: actions/cache@v4 + with: {path: "${{env.EMSCRIPTEN_CACHE_FOLDER}}", key: "${{matrix.emver}}-${{runner.os}}"} + - name: setup emscripten + uses: mymindstorm/setup-emsdk@v11 + with: {version: "${{matrix.emver}}", actions-cache-folder: "${{env.EMSCRIPTEN_CACHE_FOLDER}}"} + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - 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} diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index e28a7a968..074d261c7 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -25,14 +25,14 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps:: gcc-setup + common-steps @@ -47,21 +47,21 @@ jobs: fail-fast: false matrix: include: - - {std: 11, gcc: 12 , bt: Release} + - {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, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - run: c4core-install g++-${{matrix.gcc}} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: configure - run:: bash('gcc-configure') - - name: build - run: | - cmake --build build_o2 --target ryml-test-build -j --verbose - - name: run - run: | - cmake --build build_o2 --target ryml-test-run + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - run: c4core-install g++-${{matrix.gcc}} + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: configure + run:: bash('gcc-configure') + - 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: @@ -74,14 +74,14 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} @@ -98,40 +98,40 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: g++-5, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 20, cxx: g++-14, bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 11, cxx: g++-5, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 11, cxx: g++-5, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + - {std: 20, cxx: g++-14, bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} + - {std: 20, cxx: g++-14, bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} env: {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: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run:: bash('gcc-checkout') - - 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} + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run:: bash('gcc-checkout') + - 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} #---------------------------------------------------------------------------- gcc_extended: @@ -144,38 +144,38 @@ jobs: fail-fast: false matrix: include: - # VALGRIND - - {std: 11, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 11, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - # - - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-11 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-11 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-10 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-10 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-9 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-9 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-8 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-8 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-7 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-7 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-6 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-6 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-4.9, bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-4.9, bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, img: ubuntu18.04} + # VALGRIND + - {std: 11, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 11, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + - {std: 14, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 14, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + - {std: 17, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 17, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + - {std: 20, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} + - {std: 20, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + # + - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-11 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-11 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-10 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-10 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-9 , bt: Debug , img: ubuntu22.04} + - {std: 11, cxx: g++-9 , bt: Release, img: ubuntu22.04} + - {std: 11, cxx: g++-8 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-8 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-7 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-7 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-6 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-6 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-5 , bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-4.9, bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-4.9, bt: Release, img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Debug , img: ubuntu18.04} + - {std: 11, cxx: g++-4.8, bt: Release, img: ubuntu18.04} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps:: gcc-setup + common-steps @@ -190,48 +190,48 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: ubsan, bitlinks: static64} + - {std: 11, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: asan, bitlinks: static64} + - {std: 11, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: lsan, bitlinks: static64} + - {std: 11, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: tsan, bitlinks: static64} + - {std: 11, cxx: g++-14, bt: ubsan, bitlinks: static64} + - {std: 14, cxx: g++-14, bt: ubsan, bitlinks: static64} + - {std: 17, cxx: g++-14, bt: ubsan, bitlinks: static64} + - {std: 20, cxx: g++-14, bt: ubsan, bitlinks: static64} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - - 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: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - 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} #---------------------------------------------------------------------------- arm: @@ -243,28 +243,28 @@ jobs: fail-fast: false matrix: include: - # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism - - {std: 11, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 11, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 14, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 14, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 17, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 17, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism + - {std: 11, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 11, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 14, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 14, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 17, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - {std: 17, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} env: {TOOLCHAIN: "${{matrix.toolchain}}", STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: - - name: checkout - run:: bash('gcc-checkout') - - name: install gcc-arm-linux-gnueabihf - run: | - c4core-install arm-linux-gnueabihf - c4core-install qemu - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: configure--------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test arm - - {name: build, run: source .github/setenv.sh && c4_build_test arm} - - {name: run, run: source .github/setenv.sh && c4_run_test arm} - - {name: pack, run: source .github/setenv.sh && c4_package arm} + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version + #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run:: bash('gcc-checkout') + - name: install gcc-arm-linux-gnueabihf + run: | + c4core-install arm-linux-gnueabihf + c4core-install qemu + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: configure--------------------------------------------------- + run: source .github/setenv.sh && c4_cfg_test arm + - {name: build, run: source .github/setenv.sh && c4_build_test arm} + - {name: run, run: source .github/setenv.sh && c4_run_test arm} + - {name: pack, run: source .github/setenv.sh && c4_package arm} diff --git a/.github/workflows-src/install.yml b/.github/workflows-src/install.yml index e8936f0d8..eb2fb34a1 100644 --- a/.github/workflows-src/install.yml +++ b/.github/workflows-src/install.yml @@ -24,32 +24,32 @@ jobs: fail-fast: false matrix: include: - - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - # - - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - # - - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: , commonvars: } - - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: , commonvars: } - - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: , commonvars: } - - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } - - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: , commonvars: } - - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } + - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } + # + - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } + # + - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: , commonvars: } + - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: , commonvars: } + - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} + - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: , commonvars: } + - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } + - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: , commonvars: } + - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } env: CXX_: "${{matrix.cxx}}" BT: "${{matrix.bt}}" @@ -58,19 +58,19 @@ jobs: IDIR: "install/${{matrix.name}}-${{matrix.bt}}" PDIR: "prefix/${{matrix.name}}-${{matrix.bt}}" steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {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: Install python 3.9 - uses: actions/setup-python@v5 - with: { python-version: 3.9 } - - name: preinstall - run:: bash('install-preinstall') - - name: configure - run:: bash('install-configure') - - name: build - run: | - cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j - - name: run - run: | - cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {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: Install python 3.9 + uses: actions/setup-python@v5 + with: { python-version: 3.9 } + - name: preinstall + run:: bash('install-preinstall') + - name: configure + run:: bash('install-configure') + - name: build + run: | + cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j + - name: run + run: | + cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index cb75db55c..3ea517dbf 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -25,18 +25,18 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 11, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} - # - - {std: 11, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 11, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} + - {std: 11, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 11, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} + # + - {std: 11, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 11, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} + - {std: 17, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {name: xcode, uses: maxim-lobanov/setup-xcode@v1, with: {xcode-version: "${{matrix.xcver}}" }} - - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} - - :: common-steps.drop(1) + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {name: xcode, uses: maxim-lobanov/setup-xcode@v1, with: {xcode-version: "${{matrix.xcver}}" }} + - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} + - :: common-steps.drop(1) diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index 7ed931d3f..126baaf3d 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -16,46 +16,46 @@ jobs: fail-fast: false matrix: include: - - {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04} - # - - {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04} - # - - {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04} - # - #- {std: 11, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 11, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 14, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 14, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 17, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 17, bt: Release, arch: armv6 , distro: bullseye} - # - #- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04} + - {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04} + - {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04} + - {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04} + - {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04} + - {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04} + - {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04} + + - {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04} + - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04} + - {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04} + - {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04} + - {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04} + - {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04} + + - {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04} + - {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04} + - {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04} + - {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04} + - {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04} + - {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04} + + #- {std: 11, bt: Debug , arch: armv6 , distro: bullseye} + #- {std: 11, bt: Release, arch: armv6 , distro: bullseye} + #- {std: 14, bt: Debug , arch: armv6 , distro: bullseye} + #- {std: 14, bt: Release, arch: armv6 , distro: bullseye} + #- {std: 17, bt: Debug , arch: armv6 , distro: bullseye} + #- {std: 17, bt: Release, arch: armv6 , distro: bullseye} + # + #- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04} + #- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04} + #- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04} + #- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04} + #- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04} + #- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: test - uses: uraimo/run-on-arch-action@v2.7.2 - with: - arch: ${{matrix.arch}} - distro: ${{matrix.distro}} - install:: bash('rarearchs-test-install') - run:: bash('rarearchs-test-run') + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: test + uses: uraimo/run-on-arch-action@v2.7.2 + with: + arch: ${{matrix.arch}} + distro: ${{matrix.distro}} + install:: bash('rarearchs-test-install') + run:: bash('rarearchs-test-run') diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index 061034477..f35420265 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -1,11 +1,10 @@ !yamlscript/v0: :: use(common) -:: - workflow-setup 'release':: - push: - tags: [v0.*, v1.*, v2.*] - branches: [master] +:workflow-setup 'release':: + push: + tags: [v0.*, v1.*, v2.*] + branches: [master] env: PROJ_PKG_NAME: rapidyaml- @@ -27,19 +26,19 @@ jobs: contains(github.event.head_commit.message, 'only release') runs-on: ubuntu-latest steps: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - name: Variables (from tag) - if: contains(github.ref, 'tags/v') - run:: bash('release-vars-1') - - name: Variables (from commit, no tag) - if: ${{ !contains(github.ref, 'tags/v') }} - run:: bash('release-vars-2') - - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - - name: Save vars.sh - uses: actions/upload-artifact@v3 - with: {name: vars.sh, path: ./vars.sh} + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run:: bash('release-vars-1') + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run:: bash('release-vars-2') + - name: Verify vars.sh + run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + - name: Save vars.sh + uses: actions/upload-artifact@v3 + with: {name: vars.sh, path: ./vars.sh} #---------------------------------------------------------------------------- # create source packages @@ -51,21 +50,21 @@ jobs: needs: gettag runs-on: ubuntu-latest steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - name: Install python 3.9 - uses: actions/setup-python@v5 - with: { python-version: 3.9 } - - name: Install requirements - run: | - sudo -E pip install git-archive-all - - name: Create source packages - run:: bash('release-create-source-packages') - - name: Save source artifacts - uses: actions/upload-artifact@v3 - with: {name: assets, path: assets} + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - name: Install python 3.9 + uses: actions/setup-python@v5 + with: { python-version: 3.9 } + - name: Install requirements + run: | + sudo -E pip install git-archive-all + - name: Create source packages + run:: bash('release-create-source-packages') + - name: Save source artifacts + uses: actions/upload-artifact@v3 + with: {name: assets, path: assets} #---------------------------------------------------------------------------- # create c++ packages @@ -82,29 +81,29 @@ jobs: fail-fast: false matrix: config: - # name of the artifact | suffix (gen) | suffix (package) | cpack gen | mime type | os | cxx - - {name: Ubuntu 22.04 deb , sfxg: unix64.deb, sfxp: ubuntu-22.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-22.04 } - - {name: Ubuntu 20.04 deb , sfxg: unix64.deb, sfxp: ubuntu-20.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-20.04 } - #- {name: Ubuntu 18.04 deb , sfxg: unix64.deb, sfxp: ubuntu-18.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-18.04 } - - {name: Windows VS2019 zip, sfxg: win64.zip , sfxp: windows-vs2019.zip , gen: ZIP , mime: zip , os: windows-2019, cxx: vs2019} - - {name: MacOSX sh , sfxg: apple64.sh, sfxp: macosx-xcode.sh , gen: STGZ , mime: x-sh , os: macos-13 , cxx: xcode } + # name of the artifact | suffix (gen) | suffix (package) | cpack gen | mime type | os | cxx + - {name: Ubuntu 22.04 deb , sfxg: unix64.deb, sfxp: ubuntu-22.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-22.04 } + - {name: Ubuntu 20.04 deb , sfxg: unix64.deb, sfxp: ubuntu-20.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-20.04 } + #- {name: Ubuntu 18.04 deb , sfxg: unix64.deb, sfxp: ubuntu-18.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-18.04 } + - {name: Windows VS2019 zip, sfxg: win64.zip , sfxp: windows-vs2019.zip , gen: ZIP , mime: zip , os: windows-2019, cxx: vs2019} + - {name: MacOSX sh , sfxg: apple64.sh, sfxp: macosx-xcode.sh , gen: STGZ , mime: x-sh , os: macos-13 , cxx: xcode } steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - {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_target shared64} - - name: shared64-pack - run: source .github/setenv.sh && c4_package shared64 $GEN - - name: shared64-normalize - run:: bash('release-shared-normalize') - - name: Save artifacts - uses: actions/upload-artifact@v3 - with: {name: assets, path: assets} + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - {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_target shared64} + - name: shared64-pack + run: source .github/setenv.sh && c4_package shared64 $GEN + - name: shared64-normalize + run:: bash('release-shared-normalize') + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: {name: assets, path: assets} #---------------------------------------------------------------------------- # create python packages @@ -158,67 +157,67 @@ jobs: osname: linux os: ubuntu-20.04 config: - #- !:python 3.13 313 x86_64 manylinux_x86_64 - #- !:python 3.13 313 i686 manylinux_i686 - - !:python 3.12 312 x86_64 manylinux_x86_64 - - !:python 3.12 312 i686 manylinux_i686 - - !:python 3.11 311 x86_64 manylinux_x86_64 - - !:python 3.11 311 i686 manylinux_i686 - - !:python 3.10 310 x86_64 manylinux_x86_64 - - !:python 3.10 310 i686 manylinux_i686 - - !:python 3.9 39 x86_64 manylinux_x86_64 - - !:python 3.9 39 i686 manylinux_i686 - - !:python 3.8 38 x86_64 manylinux_x86_64 - - !:python 3.8 38 i686 manylinux_i686 - - !:python 3.7 37 x86_64 manylinux_x86_64 - - !:python 3.7 37 i686 manylinux_i686 - - !:python 3.6 36 x86_64 manylinux_x86_64 - - !:python 3.6 36 i686 manylinux_i686 + #- !:python 3.13 313 x86_64 manylinux_x86_64 + #- !:python 3.13 313 i686 manylinux_i686 + - !:python 3.12 312 x86_64 manylinux_x86_64 + - !:python 3.12 312 i686 manylinux_i686 + - !:python 3.11 311 x86_64 manylinux_x86_64 + - !:python 3.11 311 i686 manylinux_i686 + - !:python 3.10 310 x86_64 manylinux_x86_64 + - !:python 3.10 310 i686 manylinux_i686 + - !:python 3.9 39 x86_64 manylinux_x86_64 + - !:python 3.9 39 i686 manylinux_i686 + - !:python 3.8 38 x86_64 manylinux_x86_64 + - !:python 3.8 38 i686 manylinux_i686 + - !:python 3.7 37 x86_64 manylinux_x86_64 + - !:python 3.7 37 i686 manylinux_i686 + - !:python 3.6 36 x86_64 manylinux_x86_64 + - !:python 3.6 36 i686 manylinux_i686 - # the windows builds are disabled because they are causing problems and preventing the release. - # the problems are related to CMakeExtension forcing the use of Ninja - # which does not play well with the -G 'Visual Studio...' option used below. - # fixing this looks like it will be time-intensive. - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - ## macosx builds are generating a SIGSEGV when importing. (!) - ## https://github.com/biojppm/rapidyaml/actions/runs/3062528713/jobs/4943611397#step:7:269 - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + # the windows builds are disabled because they are causing problems and preventing the release. + # the problems are related to CMakeExtension forcing the use of Ninja + # which does not play well with the -G 'Visual Studio...' option used below. + # fixing this looks like it will be time-intensive. + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + ## macosx builds are generating a SIGSEGV when importing. (!) + ## https://github.com/biojppm/rapidyaml/actions/runs/3062528713/jobs/4943611397#step:7:269 + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} steps: - # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - name: create wheel - uses: pypa/cibuildwheel@v2.17 - - name: rename wheelhouse -> dist - run: | - mv -fv wheelhouse dist - ls -lFhp dist/ - - name: Save artifacts for publishing to PyPI - uses: actions/upload-artifact@v3 - with: {name: dist, 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') + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: create wheel + uses: pypa/cibuildwheel@v2.17 + - name: rename wheelhouse -> dist + run: | + mv -fv wheelhouse dist + ls -lFhp dist/ + - name: Save artifacts for publishing to PyPI + uses: actions/upload-artifact@v3 + with: {name: dist, 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') #---------------------------------------------------------------------------- release: @@ -228,69 +227,69 @@ jobs: contains(github.event.head_commit.message, 'only release') runs-on: ubuntu-latest needs: - - src - - cpp - - python_src - - python_wheels + - src + - cpp + - python_src + - python_wheels steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - 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/ - ls -lFhp dist/ - # - # Github - - name: Restore vars.sh - if: contains(github.ref, 'tags/v') - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - name: Save vars for following steps - if: contains(github.ref, 'tags/v') - id: vars - run:: bash('release-save-vars') - - name: Move Python packages to assets folder - if: contains(github.ref, 'tags/v') - run: mv -fv dist/*src.zip assets/. - - name: Create Github Release - if: contains(github.ref, 'tags/v') - id: create_release - uses: actions/create-release@v1 - env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } - with: - tag_name: ${{github.ref}} - release_name: Release ${{steps.vars.outputs.VERSION}} - body_path: ${{steps.vars.outputs.VERSION_BODY}} - draft: true - prerelease: ${{contains(github.ref, 'rc')}} - - name: Upload assets to Github Release - if: contains(github.ref, 'tags/v') - uses: dwenegar/upload-release-assets@v1 - env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } - with: - release_id: ${{steps.create_release.outputs.id}} - assets_path: ./assets/ - # - # PyPI (test) - - name: Publish python packages to test PyPI - uses: pypa/gh-action-pypi-publish@v1.4.2 - with: - repository_url: https://test.pypi.org/legacy/ - user: __token__ - password: ${{secrets.PYPI_TOKEN_TEST}} - verbose: true - skip_existing: true - # - # PyPI (production) - - name: Publish python packages to production PyPI - if: contains(github.ref, 'tags/v') - uses: pypa/gh-action-pypi-publish@v1.4.2 - with: - user: __token__ - password: ${{secrets.PYPI_TOKEN}} - verbose: true + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - 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/ + ls -lFhp dist/ + # + # Github + - name: Restore vars.sh + if: contains(github.ref, 'tags/v') + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - name: Save vars for following steps + if: contains(github.ref, 'tags/v') + id: vars + run:: bash('release-save-vars') + - name: Move Python packages to assets folder + if: contains(github.ref, 'tags/v') + run: mv -fv dist/*src.zip assets/. + - name: Create Github Release + if: contains(github.ref, 'tags/v') + id: create_release + uses: actions/create-release@v1 + env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } + with: + tag_name: ${{github.ref}} + release_name: Release ${{steps.vars.outputs.VERSION}} + body_path: ${{steps.vars.outputs.VERSION_BODY}} + draft: true + prerelease: ${{contains(github.ref, 'rc')}} + - name: Upload assets to Github Release + if: contains(github.ref, 'tags/v') + uses: dwenegar/upload-release-assets@v1 + env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } + with: + release_id: ${{steps.create_release.outputs.id}} + assets_path: ./assets/ + # + # PyPI (test) + - name: Publish python packages to test PyPI + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + repository_url: https://test.pypi.org/legacy/ + user: __token__ + password: ${{secrets.PYPI_TOKEN_TEST}} + verbose: true + skip_existing: true + # + # PyPI (production) + - name: Publish python packages to production PyPI + if: contains(github.ref, 'tags/v') + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{secrets.PYPI_TOKEN}} + verbose: true diff --git a/.github/workflows-src/samples.yml b/.github/workflows-src/samples.yml index 46c9e227e..92dd6bc58 100644 --- a/.github/workflows-src/samples.yml +++ b/.github/workflows-src/samples.yml @@ -23,25 +23,25 @@ jobs: fail-fast: false matrix: include: - - {bt: Debug , os: ubuntu-20.04} - - {bt: Release, os: ubuntu-20.04} - - {bt: Debug , os: windows-2019} - - {bt: Release, os: windows-2019} - - {bt: Debug , os: macos-latest} - - {bt: Release, os: macos-latest} + - {bt: Debug , os: ubuntu-20.04} + - {bt: Release, os: ubuntu-20.04} + - {bt: Debug , os: windows-2019} + - {bt: Release, os: windows-2019} + - {bt: Debug , os: macos-latest} + - {bt: Release, os: macos-latest} 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}}", CMANY: ON, RYMLSHA: "${{github.event.pull_request.head.sha}}" } steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0 } } # use fetch-depth to ensure all tags are fetched - - {name: python3, uses: actions/setup-python@v5, with: {python-version: 3.9}} - - {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: singleheader, run: cd samples/singleheader && ./run.sh $BT } - - {name: singleheaderlib-static, run: cd samples/singleheaderlib && ./run_static.sh $BT } - - {name: singleheaderlib-shared, run: cd samples/singleheaderlib && ./run_shared.sh $BT } - - {name: add_subdirectory, run: cd samples/add_subdirectory && ./run.sh $BT } - - {name: find_package, run: cd samples/find_package && ./run.sh $BT } - - {name: custom_c4core, run: cd samples/custom_c4core && ./run.sh $BT } - - {name: fetch_content, run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA } + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0 } } # use fetch-depth to ensure all tags are fetched + - {name: python3, uses: actions/setup-python@v5, with: {python-version: 3.9}} + - {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: singleheader, run: cd samples/singleheader && ./run.sh $BT } + - {name: singleheaderlib-static, run: cd samples/singleheaderlib && ./run_static.sh $BT } + - {name: singleheaderlib-shared, run: cd samples/singleheaderlib && ./run_shared.sh $BT } + - {name: add_subdirectory, run: cd samples/add_subdirectory && ./run.sh $BT } + - {name: find_package, run: cd samples/find_package && ./run.sh $BT } + - {name: custom_c4core, run: cd samples/custom_c4core && ./run.sh $BT } + - {name: fetch_content, run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA } diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index 424a5fd98..d39436456 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -24,28 +24,28 @@ jobs: fail-fast: false matrix: include: - # vs2017 is only availble in windows-2016 - #- {std: 11, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} - #- {std: 11, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} - #- {std: 14, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} - #- {std: 14, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} - # - - {std: 11, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} - - {std: 11, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} - - {std: 17, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} - - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} - # - - {std: 11, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 11, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} - - {std: 17, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} - - {std: 20, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} + # vs2017 is only availble in windows-2016 + #- {std: 11, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} + #- {std: 11, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} + #- {std: 14, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} + #- {std: 14, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} + # + - {std: 11, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} + - {std: 11, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} + - {std: 17, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} + - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} + # + - {std: 11, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} + - {std: 11, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} + - {std: 17, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} + - {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} + - {std: 20, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} + - {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}}"} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} - - :: common-steps.drop(1) + - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} + - :: common-steps.drop(1) # TODO: # mingw: @@ -60,39 +60,39 @@ jobs: # 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} +# - {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: {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, 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} +# - {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} From 7151eab5eea2c7dd67955475466843b21d817a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Fri, 3 Jan 2025 00:52:18 -0500 Subject: [PATCH 08/22] Simplify matrix/include specs in workflows --- .github/workflows-src/benchmarks.yml | 21 ++-- .github/workflows-src/clang.yml | 125 +++++++++++---------- .github/workflows-src/clang_tidy.yml | 22 ++-- .github/workflows-src/coverage.yml | 10 +- .github/workflows-src/emscripten.yml | 20 ++-- .github/workflows-src/gcc.yml | 160 ++++++++++++++------------- .github/workflows-src/install.yml | 146 +++++++++++++++++++----- .github/workflows-src/macosx.yml | 21 ++-- .github/workflows-src/rarearchs.yml | 64 +++++------ .github/workflows-src/release.yml | 78 +++++++------ .github/workflows-src/windows.yml | 35 +++--- .github/workflows/install.yml | 20 ++-- 12 files changed, 432 insertions(+), 290 deletions(-) diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index b6248dd61..7c6bddcfa 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -39,17 +39,20 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :cxx (%2 || 'g++-10'), :bt 'Release', + :os (%3 || 'ubuntu-20.04'), :bitlinks 'static64 static32'}) 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} + - ! item(11) + - ! item(17) + - ! item(20) + - ! 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, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} - - {std: 20, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} - #- {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} - #- {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} - - - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} env: {BM: ON, 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: # use fetch-depth to ensure all tags are fetched diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index 88019a463..4b4570c3a 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -23,11 +23,13 @@ jobs: strategy: fail-fast: false matrix: - include: - - {std: 20, cxx: clang++-17 , 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, bt: Release, bitlinks: shared64 static32} + 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') + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} @@ -44,11 +46,8 @@ jobs: strategy: fail-fast: false matrix: - include: - - {std: 20, cxx: clang++-17 , 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, bt: Release, bitlinks: shared64 static32} + include: *include1 + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} @@ -68,11 +67,8 @@ jobs: strategy: fail-fast: false matrix: - include: - - {std: 20, cxx: clang++-17 , 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 , bt: Release, bitlinks: shared64 static32} + include: *include1 + env: {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, uses: actions/checkout@v4, with: {submodules: recursive}} @@ -90,37 +86,42 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std 11, :cxx "clang++-$a(%1)", :bt %2, + :vg 'on', :img "ubuntu$a(%3)"}) include: - - {std: 11, cxx: clang++-17 , bt: Debug , vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-17 , bt: Release, vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-16 , bt: Debug , vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-16 , bt: Release, vg: on, img: ubuntu22.04} - - {std: 11, cxx: clang++-15 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: clang++-15 , bt: Release, vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: clang++-14 , bt: Debug , vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: clang++-14 , bt: Release, vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: clang++-13 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-13 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-12 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-12 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-11 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-11 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-10 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-10 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-9 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-9 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-8 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-8 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-7 , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-7 , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-6.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-6.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-5.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-5.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-4.0, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-4.0, bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-3.9, bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: clang++-3.9, bt: Release, vg: on, img: ubuntu18.04} + - ! 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') + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version @@ -141,23 +142,25 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :cxx 'clang++-17', :bt %2, :bitlinks 'static64'}) include: - - {std: 11, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: asan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: lsan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: tsan, bitlinks: static64} - - {std: 11, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 14, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 17, cxx: clang++-17 , bt: ubsan, bitlinks: static64} - - {std: 20, cxx: clang++-17 , bt: ubsan, bitlinks: static64} + - ! item(11 'asan') + - ! item(14 'asan') + - ! item(17 'asan') + - ! item(20 'asan') + - ! item(11 'lsan') + - ! item(14 'lsan') + - ! item(17 'lsan') + - ! item(20 'lsan') + - ! item(11 'tsan') + - ! item(14 'tsan') + - ! item(17 'tsan') + - ! item(20 'tsan') + - ! item(11 'ubsan') + - ! item(14 'ubsan') + - ! item(17 'ubsan') + - ! item(20 'ubsan') + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index bc68b194a..cc1dcb16e 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -23,16 +23,20 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std 11, :cxx 'clang++-17', :bt %2, + :lint 'clang-tidy', :bitlinks %1}) include: - # clang tidy takes a long time, so don't do multiple bits/linktypes - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-17, bt: Debug , lint: clang-tidy, bitlinks: static32} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-17, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static32} + # clang tidy takes a long time, + # so don't do multiple bits/linktypes + - ! item('shared64' 'Debug') + - ! item('shared32' 'Debug') + - ! item('static64' 'Debug') + - ! item('static32' 'Debug') + - ! item('shared64' 'ReleaseWithDebInfo') + - ! item('shared32' 'ReleaseWithDebInfo') + - ! item('static64' 'ReleaseWithDebInfo') + - ! item('static32' 'ReleaseWithDebInfo') + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} diff --git a/.github/workflows-src/coverage.yml b/.github/workflows-src/coverage.yml index 76982b7ab..7a5325484 100644 --- a/.github/workflows-src/coverage.yml +++ b/.github/workflows-src/coverage.yml @@ -24,12 +24,14 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :cxx 'g++-9', :bt 'Coverage', :os 'ubuntu-20.04'}) include: - - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} - - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04} + - ! item(11) + - ! item(17) # test also with the debug code enabled - - {std: 11, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} - - {std: 17, cxx: g++-9, bt: Coverage, os: ubuntu-20.04, cmk: "-DRYML_DBG=ON"} + - ! item(11) + {:cmk '-DRYML_DBG=ON'} + - ! item(17) + {:cmk '-DRYML_DBG=ON'} + 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}}", diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml index ee87897cf..a5f8671dd 100644 --- a/.github/workflows-src/emscripten.yml +++ b/.github/workflows-src/emscripten.yml @@ -28,15 +28,18 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :cxx 'em++', :emver %2, :bt %3, + :os 'ubuntu-latest', :bitlinks :static32}) include: - #- {std: 11, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 11, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 20, cxx: em++, emver: 2.0.34, bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 20, cxx: em++, emver: 2.0.34, bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 11, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 11, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} - #- {std: 20, cxx: em++, emver: 3.0.0 , bt: Debug , os: ubuntu-latest, bitlinks: static32} - - {std: 20, cxx: em++, emver: 3.0.0 , bt: Release, os: ubuntu-latest, bitlinks: static32} + #- ! item(11 '2.0.34' 'Debug') + - ! item(11 '2.0.34' 'Release') + #- ! item(20 '2.0.34' 'Debug') + - ! item(20 '2.0.34' 'Release') + #- ! item(11 '3.0.0' 'Debug') + - ! item(11 '3.0.0' 'Release') + #- ! item(20 '3.0.0' 'Debug') + - ! item(20 '3.0.0' 'Release') + env: STD: "${{matrix.std}}" CXX_: "${{matrix.cxx}}" @@ -46,6 +49,7 @@ jobs: SAN: "${{matrix.san}}" LINT: "${{matrix.lint}}" OS: "${{matrix.os}}" + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - name: setup emscripten cache diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index 074d261c7..839b34284 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -24,15 +24,19 @@ jobs: strategy: fail-fast: false matrix: - include: - - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, + :bitlinks 'shared64 static32', + :img "ubuntu$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') + - ! item(11 5 'Debug' '18.04') + - ! item(11 5 'Release' '18.04') + - ! item(11 4.8 'Debug' '18.04') + - ! item(11 4.8 'Release' '18.04') + env: {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:: gcc-setup + common-steps @@ -73,15 +77,7 @@ jobs: strategy: fail-fast: false matrix: - include: - - {std: 11, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14 , bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} + include: *include1 env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} @@ -97,11 +93,14 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, + :bitlinks 'shared64 static32', :img "ubuntu$a(%4)"}) include: - - {std: 11, cxx: g++-5, bt: Debug , bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 11, cxx: g++-5, bt: Release, bitlinks: shared64 static32, img: ubuntu18.04} - - {std: 20, cxx: g++-14, bt: Debug , bitlinks: shared64 static32, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Release, bitlinks: shared64 static32, img: ubuntu22.04} + - ! 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", 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: # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version @@ -143,39 +142,44 @@ jobs: strategy: fail-fast: false matrix: + item-vg =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :vg 'ON', + :img "ubuntu$a(%4)"}) + item =: \({:std 11, :cxx "g++-$a(%1)", :bt %2 + :img "ubuntu$a(%3)"}) include: - # VALGRIND - - {std: 11, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 11, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-14, bt: Release, vg: ON, img: ubuntu22.04} + # 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') # - - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-13 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-11 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-11 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-10 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-10 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-9 , bt: Debug , img: ubuntu22.04} - - {std: 11, cxx: g++-9 , bt: Release, img: ubuntu22.04} - - {std: 11, cxx: g++-8 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-8 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-7 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-7 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-6 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-6 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-5 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-4.9, bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-4.9, bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-4.8, bt: Release, img: ubuntu18.04} + - ! item(13 'Debug' '22.04') + - ! item(13 'Release' '22.04') + - ! item(13 'Debug' '22.04') # XXX Duplicate? + - ! item(13 'Release' '22.04') # XXX Duplicate? + - ! 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') + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps:: gcc-setup + common-steps @@ -189,23 +193,25 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :cxx 'g++-14', :bt %2, :bitlinks 'static64'}) include: - - {std: 11, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: asan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: lsan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: tsan, bitlinks: static64} - - {std: 11, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 14, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 17, cxx: g++-14, bt: ubsan, bitlinks: static64} - - {std: 20, cxx: g++-14, bt: ubsan, bitlinks: static64} + - ! item(11 'asan') + - ! item(14 'asan') + - ! item(17 'asan') + - ! item(20 'asan') + - ! item(11 'lsan') + - ! item(14 'lsan') + - ! item(17 'lsan') + - ! item(20 'lsan') + - ! item(11 'tsan') + - ! item(14 'tsan') + - ! item(17 'tsan') + - ! item(20 'tsan') + - ! item(11 'ubsan') + - ! item(14 'ubsan') + - ! item(17 'ubsan') + - ! item(20 'ubsan') + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} @@ -242,14 +248,18 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :bt %2, + :toolchain 'ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake', + :cxx 'arm-linux-gnueabihf-gcc', :os 'ubuntu-20.04'}) include: # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism - - {std: 11, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 11, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 14, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 14, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 17, bt: Debug , toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} - - {std: 17, bt: Release, toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake, cxx: arm-linux-gnueabihf-gcc, os: ubuntu-20.04} + - ! item(11 'Debug') + - ! item(11 'Release') + - ! item(14 'Debug') + - ! item(14 'Release') + - ! item(17 'Debug') + - ! item(17 'Release') + env: {TOOLCHAIN: "${{matrix.toolchain}}", STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version diff --git a/.github/workflows-src/install.yml b/.github/workflows-src/install.yml index eb2fb34a1..658935b06 100644 --- a/.github/workflows-src/install.yml +++ b/.github/workflows-src/install.yml @@ -23,33 +23,125 @@ jobs: strategy: fail-fast: false matrix: - include: - - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_package/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - - {name: find_package/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON", commonvars: } - # - - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/linux , sdir: test/test_install , os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_library/linux/libcxx, sdir: test/test_install , os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/macos , sdir: test/test_install , os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - - {name: find_library/win , sdir: test/test_install , os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: "-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF", commonvars: } - # - - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Release, vars: , commonvars: } - - {name: singleheader/linux , sdir: test/test_singleheader, os: ubuntu-20.04, cxx: g++-10 , gen: "-DCMAKE_CXX_COMPILER=g++-10" , tgt: all , bt: Debug , vars: , commonvars: } - - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Release, vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: singleheader/linux/libcxx, sdir: test/test_singleheader, os: ubuntu-20.04, cxx: clang++-9, gen: "-DCMAKE_CXX_COMPILER=clang++-9" , tgt: all , bt: Debug , vars: , commonvars: "-DRYML_USE_LIBCXX=ON"} - - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Release, vars: , commonvars: } - - {name: singleheader/macos , sdir: test/test_singleheader, os: macos-13 , cxx: xcode , gen: "-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64", tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } - - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Release, vars: , commonvars: } - - {name: singleheader/win , sdir: test/test_singleheader, os: windows-2019, cxx: vs2019 , gen: "-G 'Visual Studio 16 2019' -A x64" , tgt: ALL_BUILD, bt: Debug , vars: , commonvars: } + fp fl sh lcxx =: + -['find_package' 'find_library' 'singleheader' 'linux/libcxx'] + t-t-i t-t-s =: -['test/test_install' 'test/test_singleheader'] + include:: -[ + {:name "$fp/linux", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'g++-10', + :gen '-DCMAKE_CXX_COMPILER=g++-10', :tgt 'all', :bt 'Release', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars nil} + {:name "$fp/linux", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'g++-10', + :gen '-DCMAKE_CXX_COMPILER=g++-10', :tgt 'all', :bt 'Debug', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars nil} + {:name "$fp/$lcxx", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'clang++-9', + :gen '-DCMAKE_CXX_COMPILER=clang++-9', :tgt 'all', :bt 'Release', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars '-DRYML_USE_LIBCXX=ON'} + {:name "$fp/$lcxx", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'clang++-9', + :gen '-DCMAKE_CXX_COMPILER=clang++-9', :tgt 'all', :bt 'Debug', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars '-DRYML_USE_LIBCXX=ON'} + {:name "$fp/macos", :sdir t-t-i, :os 'macos-13', :cxx 'xcode', + :gen '-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64', + :tgt 'ALL_BUILD', :bt 'Release', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars nil} + {:name "$fp/macos", :sdir t-t-i, :os 'macos-13', :cxx 'xcode', + :gen '-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64', + :tgt 'ALL_BUILD', :bt 'Debug', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/lib/cmake/ryml + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars nil} + {:name "$fp/win", :sdir t-t-i, :os 'windows-2019', :cxx 'vs2019', + :gen "-G 'Visual Studio 16 2019' -A x64", + :tgt 'ALL_BUILD', :bt 'Release', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars nil} + {:name "$fp/win", :sdir t-t-i, :os 'windows-2019', :cxx 'vs2019', + :gen "-G 'Visual Studio 16 2019' -A x64", + :tgt 'ALL_BUILD', :bt 'Debug', + :vars '-Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake + -DRYML_TEST_INSTALL_PACKAGE_MODE=ON', + :commonvars nil} + + {:name "$fl/linux", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'g++-10', + :gen '-DCMAKE_CXX_COMPILER=g++-10', :tgt 'all', :bt 'Release', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars nil} + {:name "$fl/linux", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'g++-10', + :gen '-DCMAKE_CXX_COMPILER=g++-10', :tgt 'all', :bt 'Debug', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars nil} + {:name "$fl/$lcxx", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'clang++-9', + :gen '-DCMAKE_CXX_COMPILER=clang++-9', :tgt 'all', :bt 'Release', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars '-DRYML_USE_LIBCXX=ON'} + {:name "$fl/$lcxx", :sdir t-t-i, :os 'ubuntu-20.04', :cxx 'clang++-9', + :gen '-DCMAKE_CXX_COMPILER=clang++-9', :tgt 'all', :bt 'Debug', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars '-DRYML_USE_LIBCXX=ON'} + {:name "$fl/macos", :sdir t-t-i, :os 'macos-13', :cxx 'xcode', + :gen '-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64', + :tgt 'ALL_BUILD', :bt 'Release', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars nil} + {:name "$fl/macos", :sdir t-t-i, :os 'macos-13', :cxx 'xcode', + :gen '-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64', + :tgt 'ALL_BUILD', :bt 'Debug', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars nil} + {:name "$fl/win", :sdir t-t-i, :os 'windows-2019', :cxx 'vs2019', + :gen "-G 'Visual Studio 16 2019' -A x64", + :tgt 'ALL_BUILD', :bt 'Release', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars nil} + {:name "$fl/win", :sdir t-t-i, :os 'windows-2019', :cxx 'vs2019', + :gen "-G 'Visual Studio 16 2019' -A x64", + :tgt 'ALL_BUILD', :bt 'Debug', + :vars '-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR + -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF', + :commonvars nil} + + {:name "$sh/linux", :sdir t-t-s, :os 'ubuntu-20.04', :cxx 'g++-10', + :gen '-DCMAKE_CXX_COMPILER=g++-10', + :tgt 'all', :bt 'Release', :vars nil, :commonvars nil} + {:name "$sh/linux", :sdir t-t-s, :os 'ubuntu-20.04', :cxx 'g++-10', + :gen '-DCMAKE_CXX_COMPILER=g++-10', + :tgt 'all', :bt 'Debug', :vars nil, :commonvars nil} + {:name "$sh/$lcxx", :sdir t-t-s, :os 'ubuntu-20.04', :cxx 'clang++-9', + :gen '-DCMAKE_CXX_COMPILER=clang++-9', :tgt 'all', :bt 'Release', + :vars nil, :commonvars '-DRYML_USE_LIBCXX=ON'} + {:name "$sh/$lcxx", :sdir t-t-s, :os 'ubuntu-20.04', :cxx 'clang++-9', + :gen '-DCMAKE_CXX_COMPILER=clang++-9', :tgt 'all', :bt 'Debug', + :vars nil, :commonvars '-DRYML_USE_LIBCXX=ON'} + {:name "$sh/macos", :sdir t-t-s, :os 'macos-13', :cxx 'xcode', + :gen '-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64', + :tgt 'ALL_BUILD', :bt 'Release', :vars nil, :commonvars nil} + {:name "$sh/macos", :sdir t-t-s, :os 'macos-13', :cxx 'xcode', + :gen '-G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64', + :tgt 'ALL_BUILD', :bt 'Debug', :vars nil, :commonvars nil} + {:name "$sh/win", :sdir t-t-s, :os 'windows-2019', :cxx 'vs2019', + :gen "-G 'Visual Studio 16 2019' -A x64", + :tgt 'ALL_BUILD', :bt 'Release', :vars nil, :commonvars nil} + {:name "$sh/win", :sdir t-t-s, :os 'windows-2019', :cxx 'vs2019', + :gen "-G 'Visual Studio 16 2019' -A x64", + :tgt 'ALL_BUILD', :bt 'Debug', :vars nil, :commonvars nil}] + env: CXX_: "${{matrix.cxx}}" BT: "${{matrix.bt}}" diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index 3ea517dbf..85cf708f7 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -24,16 +24,19 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :cxx 'xcode', :xcver %2, :bt %3, + :os 'macos-13', :bitlinks 'shared64 static64'}) include: - - {std: 11, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 11, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 15, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: shared64 static64} - # - - {std: 11, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 11, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 14, bt: Debug , os: macos-13, bitlinks: shared64 static64} - - {std: 17, cxx: xcode, xcver: 14, bt: Release, os: macos-13, bitlinks: shared64 static64} + - ! item(11 15 'Debug') + - ! item(11 15 'Release') + - ! item(17 15 'Debug') + - ! item(17 15 'Release') + + - ! item(11 14 'Debug') + - ! item(11 14 'Release') + - ! item(17 14 'Debug') + - ! item(17 14 'Release') + env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index 126baaf3d..8b03875ad 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -15,41 +15,43 @@ jobs: strategy: fail-fast: false matrix: + item =: \({:std %1, :bt %2, :arch %3, :distro %4}) include: - - {std: 11, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: aarch64, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: aarch64, distro: ubuntu20.04} + - ! item(11 'Debug' 'aarch64' 'ubuntu20.04') + - ! item(11 'Release' 'aarch64' 'ubuntu20.04') + - ! item(14 'Debug' 'aarch64' 'ubuntu20.04') + - ! item(14 'Release' 'aarch64' 'ubuntu20.04') + - ! item(17 'Debug' 'aarch64' 'ubuntu20.04') + - ! item(17 'Release' 'aarch64' 'ubuntu20.04') - - {std: 11, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 11, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 14, bt: Release, arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: ppc64le, distro: ubuntu20.04} - - {std: 17, bt: Release, arch: ppc64le, distro: ubuntu20.04} + - ! item(11 'Debug' 'ppc64le' 'ubuntu20.04') + - ! item(11 'Release' 'ppc64le' 'ubuntu20.04') + - ! item(14 'Debug' 'ppc64le' 'ubuntu20.04') + - ! item(14 'Release' 'ppc64le' 'ubuntu20.04') + - ! item(17 'Debug' 'ppc64le' 'ubuntu20.04') + - ! item(17 'Release' 'ppc64le' 'ubuntu20.04') - - {std: 11, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 11, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 14, bt: Release, arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Debug , arch: s390x , distro: ubuntu20.04} - - {std: 17, bt: Release, arch: s390x , distro: ubuntu20.04} + - ! item(11 'Debug' 's390x' 'ubuntu20.04') + - ! item(11 'Release' 's390x' 'ubuntu20.04') + - ! item(14 'Debug' 's390x' 'ubuntu20.04') + - ! item(14 'Release' 's390x' 'ubuntu20.04') + - ! item(17 'Debug' 's390x' 'ubuntu20.04') + - ! item(17 'Release' 's390x' 'ubuntu20.04') + + #- ! item(11 'Debug' 'armv6' 'bullseye') + #- ! item(11 'Release' 'armv6' 'bullseye') + #- ! item(14 'Debug' 'armv6' 'bullseye') + #- ! item(14 'Release' 'armv6' 'bullseye') + #- ! item(17 'Debug' 'armv6' 'bullseye') + #- ! item(17 'Release' 'armv6' 'bullseye') + + #- ! item(11 'Debug' 'armv7' 'ubuntu20.04') + #- ! item(11 'Release' 'armv7' 'ubuntu20.04') + #- ! item(14 'Debug' 'armv7' 'ubuntu20.04') + #- ! item(14 'Release' 'armv7' 'ubuntu20.04') + #- ! item(17 'Debug' 'armv7' 'ubuntu20.04') + #- ! item(17 'Release' 'armv7' 'ubuntu20.04') - #- {std: 11, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 11, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 14, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 14, bt: Release, arch: armv6 , distro: bullseye} - #- {std: 17, bt: Debug , arch: armv6 , distro: bullseye} - #- {std: 17, bt: Release, arch: armv6 , distro: bullseye} - # - #- {std: 11, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 11, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 14, bt: Release, arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Debug , arch: armv7 , distro: ubuntu20.04} - #- {std: 17, bt: Release, arch: armv7 , distro: ubuntu20.04} steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - name: test diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index f35420265..6c5829c59 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -77,16 +77,34 @@ jobs: needs: gettag runs-on: ${{matrix.config.os}} env: {DEV: OFF, BT: Release, OS: "${{matrix.config.os}}", CXX_: "${{matrix.config.cxx}}", GEN: "${{matrix.config.gen}}"} + strategy: fail-fast: false matrix: config: - # name of the artifact | suffix (gen) | suffix (package) | cpack gen | mime type | os | cxx - - {name: Ubuntu 22.04 deb , sfxg: unix64.deb, sfxp: ubuntu-22.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-22.04 } - - {name: Ubuntu 20.04 deb , sfxg: unix64.deb, sfxp: ubuntu-20.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-20.04 } - #- {name: Ubuntu 18.04 deb , sfxg: unix64.deb, sfxp: ubuntu-18.04.deb , gen: DEB , mime: vnd.debian.binary-package, os: ubuntu-18.04 } - - {name: Windows VS2019 zip, sfxg: win64.zip , sfxp: windows-vs2019.zip , gen: ZIP , mime: zip , os: windows-2019, cxx: vs2019} - - {name: MacOSX sh , sfxg: apple64.sh, sfxp: macosx-xcode.sh , gen: STGZ , mime: x-sh , os: macos-13 , cxx: xcode } + # name of the artifact | suffix (gen) | suffix (package) | + # cpack gen | mime type | os | cxx + - {name: Ubuntu 22.04 deb, + sfxg: unix64.deb, + sfxp: ubuntu-22.04.deb, + gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-22.04} + - {name: Ubuntu 20.04 deb, + sfxg: unix64.deb, + sfxp: ubuntu-20.04.deb, + gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-20.04} + #- {name: Ubuntu 18.04 deb, + # sfxg: unix64.deb, + # sfxp: ubuntu-18.04.deb, + # gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-18.04} + - {name: Windows VS2019 zip, + sfxg: win64.zip, + sfxp: windows-vs2019.zip, + gen: ZIP, mime: zip, os: windows-2019, cxx: vs2019} + - {name: MacOSX sh, + sfxg: apple64.sh, + sfxp: macosx-xcode.sh, + gen: STGZ, mime: x-sh, os: macos-13, cxx: xcode} + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - name: Download vars.sh @@ -147,32 +165,30 @@ jobs: matrix: # Local function to expand python entries: python =: - fn(s): - w =: s:words - =>:: - pythonv:: w.0 - cibw_pyv:: w.1:N - cibw_arch:: w.2 - cibw_platform:: w.3 - osname: linux - os: ubuntu-20.04 + fn(*w):: + pythonv:: w.0 + cibw_pyv:: w.1 + cibw_arch:: w.2 + cibw_platform:: w.3 + osname: linux + os: ubuntu-20.04 config: - #- !:python 3.13 313 x86_64 manylinux_x86_64 - #- !:python 3.13 313 i686 manylinux_i686 - - !:python 3.12 312 x86_64 manylinux_x86_64 - - !:python 3.12 312 i686 manylinux_i686 - - !:python 3.11 311 x86_64 manylinux_x86_64 - - !:python 3.11 311 i686 manylinux_i686 - - !:python 3.10 310 x86_64 manylinux_x86_64 - - !:python 3.10 310 i686 manylinux_i686 - - !:python 3.9 39 x86_64 manylinux_x86_64 - - !:python 3.9 39 i686 manylinux_i686 - - !:python 3.8 38 x86_64 manylinux_x86_64 - - !:python 3.8 38 i686 manylinux_i686 - - !:python 3.7 37 x86_64 manylinux_x86_64 - - !:python 3.7 37 i686 manylinux_i686 - - !:python 3.6 36 x86_64 manylinux_x86_64 - - !:python 3.6 36 i686 manylinux_i686 + #- ! python('3.13' 313 'x86_64' 'manylinux_x86_64') + #- ! python('3.13' 313 'i686' 'manylinux_i686') + - ! python('3.12' 312 'x86_64' 'manylinux_x86_64') + - ! python('3.12' 312 'i686' 'manylinux_i686') + - ! python('3.11' 311 'x86_64' 'manylinux_x86_64') + - ! python('3.11' 311 'i686' 'manylinux_i686') + - ! python('3.10' 310 'x86_64' 'manylinux_x86_64') + - ! python('3.10' 310 'i686' 'manylinux_i686') + - ! python('3.9' 39 'x86_64' 'manylinux_x86_64') + - ! python('3.9' 39 'i686' 'manylinux_i686') + - ! python('3.8' 38 'x86_64' 'manylinux_x86_64') + - ! python('3.8' 38 'i686' 'manylinux_i686') + - ! python('3.7' 37 'x86_64' 'manylinux_x86_64') + - ! python('3.7' 37 'i686' 'manylinux_i686') + - ! python('3.6' 36 'x86_64' 'manylinux_x86_64') + - ! python('3.6' 36 'i686' 'manylinux_i686') # the windows builds are disabled because they are causing problems and preventing the release. # the problems are related to CMakeExtension forcing the use of Ninja diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index d39436456..0a071db33 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -23,24 +23,27 @@ jobs: 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 - #- {std: 11, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} - #- {std: 11, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} - #- {std: 14, cxx: vs2017, bt: Debug , os: windows-2016, bitlinks: shared64 static32} - #- {std: 14, cxx: vs2017, bt: Release, os: windows-2016, bitlinks: shared64 static32} - # - - {std: 11, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} - - {std: 11, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} - - {std: 17, cxx: vs2019, bt: Debug , os: windows-2019, bitlinks: shared64 static32} - - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: shared64 static32} - # - - {std: 11, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 11, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} - - {std: 17, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} - - {std: 20, cxx: vs2022, bt: Debug , os: windows-2022, bitlinks: shared64 static32} - - {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: shared64 static32} + #- ! 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: {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, uses: actions/checkout@v4, with: {submodules: recursive}} diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 206006df8..72c33ac8e 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -91,7 +91,7 @@ jobs: gen: -G 'Visual Studio 16 2019' -A x64 tgt: ALL_BUILD bt: Release - vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON commonvars: null - name: find_package/win sdir: test/test_install @@ -100,7 +100,7 @@ jobs: gen: -G 'Visual Studio 16 2019' -A x64 tgt: ALL_BUILD bt: Debug - vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON + vars: -Dryml_DIR=$GITHUB_WORKSPACE/$PDIR/cmake -DRYML_TEST_INSTALL_PACKAGE_MODE=ON commonvars: null - name: find_library/linux sdir: test/test_install @@ -109,7 +109,7 @@ jobs: gen: -DCMAKE_CXX_COMPILER=g++-10 tgt: all bt: Release - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: null - name: find_library/linux sdir: test/test_install @@ -118,7 +118,7 @@ jobs: gen: -DCMAKE_CXX_COMPILER=g++-10 tgt: all bt: Debug - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: null - name: find_library/linux/libcxx sdir: test/test_install @@ -127,7 +127,7 @@ jobs: gen: -DCMAKE_CXX_COMPILER=clang++-9 tgt: all bt: Release - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: -DRYML_USE_LIBCXX=ON - name: find_library/linux/libcxx sdir: test/test_install @@ -136,7 +136,7 @@ jobs: gen: -DCMAKE_CXX_COMPILER=clang++-9 tgt: all bt: Debug - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: -DRYML_USE_LIBCXX=ON - name: find_library/macos sdir: test/test_install @@ -145,7 +145,7 @@ jobs: gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 tgt: ALL_BUILD bt: Release - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: null - name: find_library/macos sdir: test/test_install @@ -154,7 +154,7 @@ jobs: gen: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 tgt: ALL_BUILD bt: Debug - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: null - name: find_library/win sdir: test/test_install @@ -163,7 +163,7 @@ jobs: gen: -G 'Visual Studio 16 2019' -A x64 tgt: ALL_BUILD bt: Release - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: null - name: find_library/win sdir: test/test_install @@ -172,7 +172,7 @@ jobs: gen: -G 'Visual Studio 16 2019' -A x64 tgt: ALL_BUILD bt: Debug - vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF + vars: -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/$PDIR -DRYML_TEST_INSTALL_PACKAGE_MODE=OFF commonvars: null - name: singleheader/linux sdir: test/test_singleheader From 1d30cd01b3c9d2d66167331520d66a3fe68306c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Fri, 3 Jan 2025 01:11:08 -0500 Subject: [PATCH 09/22] DRY the env sections in workflows --- .github/workflows-src/benchmarks.yml | 3 ++- .github/workflows-src/clang.yml | 21 +++++++++++++-------- .github/workflows-src/clang_tidy.yml | 3 ++- .github/workflows-src/coverage.yml | 19 +++++++++---------- .github/workflows-src/emscripten.yml | 10 +--------- .github/workflows-src/gcc.yml | 25 ++++++++++++++++--------- .github/workflows-src/install.yml | 13 +++++++------ .github/workflows-src/macosx.yml | 3 ++- .github/workflows-src/release.yml | 7 ++++++- .github/workflows-src/samples.yml | 9 ++++++--- .github/workflows-src/share/env.yaml | 8 ++++++++ .github/workflows-src/windows.yml | 3 ++- .github/workflows/clang.yml | 2 +- .github/workflows/gcc.yml | 2 +- 14 files changed, 76 insertions(+), 52 deletions(-) create mode 100644 .github/workflows-src/share/env.yaml diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index 7c6bddcfa..b33fcfedf 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -53,7 +53,8 @@ jobs: xcver: 15, bt: Release, os: macos-13, bitlinks: static64} - env: {BM: ON, STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + env:: -{'BM' 'ON'} + load('share/env.yaml') + steps: # use fetch-depth to ensure all tags are fetched - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index 4b4570c3a..19b51da51 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -30,7 +30,8 @@ jobs: - ! item(11 'clang++-9' 'Debug') - ! item(11 'clang++-9' 'Release') - 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}}"} + env:: load('share/env.yaml') + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' @@ -48,9 +49,9 @@ jobs: matrix: include: *include1 - env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", - CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", - VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + env:: load('share/env.yaml') + + {'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'} + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 @@ -69,7 +70,8 @@ jobs: matrix: include: *include1 - env: {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}}"} + env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + + load('share/env.yaml') steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 @@ -122,7 +124,9 @@ jobs: - ! item(3.9 'Debug' '18.04') - ! item(3.9 'Release' '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}}"} + + env:: load('share/env.yaml') + steps: # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} @@ -161,7 +165,8 @@ jobs: - ! item(17 'ubsan') - ! item(20 'ubsan') - 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}}"} + env:: load('share/env.yaml') + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 @@ -187,7 +192,7 @@ jobs: # - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} # - {std: 20, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} # - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.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}}"} +# env:: load('share/env.yaml') # steps: # - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} # - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index cc1dcb16e..dfbf6aba7 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -37,7 +37,8 @@ jobs: - ! item('static64' 'ReleaseWithDebInfo') - ! item('static32' 'ReleaseWithDebInfo') - 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}}"} + env:: load('share/env.yaml') + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 diff --git a/.github/workflows-src/coverage.yml b/.github/workflows-src/coverage.yml index 7a5325484..84ea164eb 100644 --- a/.github/workflows-src/coverage.yml +++ b/.github/workflows-src/coverage.yml @@ -32,16 +32,15 @@ jobs: - ! item(11) + {:cmk '-DRYML_DBG=ON'} - ! item(17) + {:cmk '-DRYML_DBG=ON'} - 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}}", - CMAKE_FLAGS: "${{matrix.cmk}}", - CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}", - COVERALLS_REPO_TOKEN: "${{secrets.COVERALLS_REPO_TOKEN}}", - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - # https://docs.coveralls.io/parallel-build-webhook - #COVERALLS_PARALLEL: true - } + env: !:merge* + - ! load('share/env.yaml') + - CMAKE_FLAGS: "${{matrix.cmk}}" + CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}" + COVERALLS_REPO_TOKEN: "${{secrets.COVERALLS_REPO_TOKEN}}" + # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + # https://docs.coveralls.io/parallel-build-webhook + #COVERALLS_PARALLEL: true + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml index a5f8671dd..a64a599cc 100644 --- a/.github/workflows-src/emscripten.yml +++ b/.github/workflows-src/emscripten.yml @@ -40,15 +40,7 @@ jobs: #- ! item(20 '3.0.0' 'Debug') - ! item(20 '3.0.0' 'Release') - 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}}" + env:: load('share/env.yaml') steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index 839b34284..53138e807 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -37,7 +37,8 @@ jobs: - ! item(11 4.8 'Debug' '18.04') - ! item(11 4.8 'Release' '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}}"} + env:: load('share/env.yaml') + steps:: gcc-setup + common-steps #---------------------------------------------------------------------------- @@ -52,7 +53,9 @@ jobs: 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}}"} + + env:: load('share/env.yaml') + {'CXX_' '${{matrix.gcc}}'} + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 @@ -78,9 +81,9 @@ jobs: fail-fast: false matrix: include: *include1 - env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", - CMAKE_FLAGS: "-DRYML_WITH_TAB_TOKENS=ON", - VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + + env:: load('share/env.yaml') + {'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'} + steps:: gcc-setup + common-steps #---------------------------------------------------------------------------- @@ -101,7 +104,8 @@ jobs: - ! item(20 14 'Debug' '22.04') - ! item(20 14 'Release' '22.04') - env: {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}}"} + env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + load('share/env.yaml') + steps: # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} @@ -180,7 +184,8 @@ jobs: - ! item(4.8 'Debug' '18.04') - ! item(4.8 'Release' '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}}"} + env:: load('share/env.yaml') + steps:: gcc-setup + common-steps #---------------------------------------------------------------------------- @@ -212,7 +217,8 @@ jobs: - ! item(17 'ubsan') - ! item(20 'ubsan') - 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}}"} + env:: load('share/env.yaml') + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 @@ -260,7 +266,8 @@ jobs: - ! item(17 'Debug') - ! item(17 'Release') - env: {TOOLCHAIN: "${{matrix.toolchain}}", STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + env:: -{'TOOLCHAIN' '${{matrix.toolchain}}'} + load('share/env.yaml') + steps: # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} diff --git a/.github/workflows-src/install.yml b/.github/workflows-src/install.yml index 658935b06..f52ffa06b 100644 --- a/.github/workflows-src/install.yml +++ b/.github/workflows-src/install.yml @@ -143,12 +143,13 @@ jobs: :tgt 'ALL_BUILD', :bt 'Debug', :vars nil, :commonvars nil}] env: - CXX_: "${{matrix.cxx}}" - BT: "${{matrix.bt}}" - OS: "${{matrix.os}}" - BDIR: "build/${{matrix.name}}-${{matrix.bt}}" - IDIR: "install/${{matrix.name}}-${{matrix.bt}}" - PDIR: "prefix/${{matrix.name}}-${{matrix.bt}}" + CXX_: ${{matrix.cxx}} + BT: ${{matrix.bt}} + OS: ${{matrix.os}} + BDIR: build/${{matrix.name}}-${{matrix.bt}} + IDIR: install/${{matrix.name}}-${{matrix.bt}} + PDIR: prefix/${{matrix.name}}-${{matrix.bt}} + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index 85cf708f7..9872f208a 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -37,7 +37,8 @@ jobs: - ! item(17 14 'Debug') - ! item(17 14 'Release') - 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}}"} + env:: load('share/env.yaml') + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - {name: xcode, uses: maxim-lobanov/setup-xcode@v1, with: {xcode-version: "${{matrix.xcver}}" }} diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index 6c5829c59..3de3e244e 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -76,7 +76,12 @@ jobs: name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} needs: gettag runs-on: ${{matrix.config.os}} - env: {DEV: OFF, BT: Release, OS: "${{matrix.config.os}}", CXX_: "${{matrix.config.cxx}}", GEN: "${{matrix.config.gen}}"} + env: + DEV: OFF + BT: Release + OS: ${{matrix.config.os}} + CXX_: ${{matrix.config.cxx}} + GEN: ${{matrix.config.gen}} strategy: fail-fast: false diff --git a/.github/workflows-src/samples.yml b/.github/workflows-src/samples.yml index 92dd6bc58..48ae5b67d 100644 --- a/.github/workflows-src/samples.yml +++ b/.github/workflows-src/samples.yml @@ -29,9 +29,12 @@ jobs: - {bt: Release, os: windows-2019} - {bt: Debug , os: macos-latest} - {bt: Release, os: macos-latest} - 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}}", - CMANY: ON, RYMLSHA: "${{github.event.pull_request.head.sha}}" } + + env: !:merge* + - ! load('share/env.yaml') + - CMANY: ON + RYMLSHA: ${{github.event.pull_request.head.sha}} + steps: - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0 } } # use fetch-depth to ensure all tags are fetched - {name: python3, uses: actions/setup-python@v5, with: {python-version: 3.9}} diff --git a/.github/workflows-src/share/env.yaml b/.github/workflows-src/share/env.yaml new file mode 100644 index 000000000..292ac17f2 --- /dev/null +++ b/.github/workflows-src/share/env.yaml @@ -0,0 +1,8 @@ +STD: ${{matrix.std}} +CXX_: ${{matrix.cxx}} +BT: ${{matrix.bt}} +BITLINKS: ${{matrix.bitlinks}} +VG: ${{matrix.vg}} +SAN: ${{matrix.san}} +LINT: ${{matrix.lint}} +OS: ${{matrix.os}} diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index 0a071db33..f262ddc8b 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -44,7 +44,8 @@ jobs: - ! item(20 2022 'Debug' 2022) - ! item(20 2022 'Release' 2022) - 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}}"} + 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} diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index c4a12e8f5..01ba6636a 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -125,11 +125,11 @@ jobs: CXX_: ${{matrix.cxx}} BT: ${{matrix.bt}} BITLINKS: ${{matrix.bitlinks}} - CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON VG: ${{matrix.vg}} SAN: ${{matrix.san}} LINT: ${{matrix.lint}} OS: ${{matrix.os}} + CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 32af4108e..13586a170 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -226,11 +226,11 @@ jobs: CXX_: ${{matrix.cxx}} BT: ${{matrix.bt}} BITLINKS: ${{matrix.bitlinks}} - CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON VG: ${{matrix.vg}} SAN: ${{matrix.san}} LINT: ${{matrix.lint}} OS: ${{matrix.os}} + CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON steps: - name: checkout run: | From 6971e8c03534692091845aabe0ab807accac2c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Fri, 3 Jan 2025 10:40:11 -0500 Subject: [PATCH 10/22] General refactoring of formatting --- .github/workflows-src/benchmarks.yml | 96 +++++-- .github/workflows-src/clang.yml | 166 +++++++----- .github/workflows-src/clang_tidy.yml | 21 +- .github/workflows-src/codeql.yml | 12 +- .github/workflows-src/coverage.yml | 69 +++-- .github/workflows-src/emscripten.yml | 30 ++- .github/workflows-src/gcc.yml | 288 ++++++++++++--------- .github/workflows-src/install.yml | 25 +- .github/workflows-src/macosx.yml | 15 +- .github/workflows-src/rarearchs.yml | 76 +++--- .github/workflows-src/release.yml | 179 +++++++++---- .github/workflows-src/samples.yml | 42 ++- .github/workflows-src/share/gcc-setup.yaml | 4 +- .github/workflows-src/share/steps.yaml | 44 +++- .github/workflows-src/windows.yml | 91 ++++--- .github/workflows-src/ys/common.ys | 3 +- .github/workflows/benchmarks.yml | 8 +- .github/workflows/coverage.yml | 4 +- .github/workflows/emscripten.yml | 2 +- .github/workflows/gcc.yml | 26 +- .github/workflows/release.yml | 13 +- 21 files changed, 770 insertions(+), 444 deletions(-) diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index b33fcfedf..e4e83cde0 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -12,9 +12,12 @@ env: jobs: gettag: runs-on: ubuntu-latest + steps: # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0} - name: Variables (from tag) if: contains(github.ref, 'tags/v') run:: bash('benchmarks-vars-1') @@ -22,7 +25,11 @@ jobs: if: ${{ !contains(github.ref, 'tags/v') }} run:: bash('benchmarks-vars-2') - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + run: + cat vars.sh ; + source vars.sh ; + echo $SRC_TAG ; + echo $SRC_VERSION - name: Save vars.sh uses: actions/upload-artifact@v3 with: {name: vars.sh, path: ./vars.sh} @@ -34,13 +41,16 @@ jobs: (!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 runs-on: ${{matrix.os}} + strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx (%2 || 'g++-10'), :bt 'Release', - :os (%3 || 'ubuntu-20.04'), :bitlinks 'static64 static32'}) + item =: + \({:std %1, :cxx (%2 || 'g++-10'), :bt 'Release', + :os (%3 || 'ubuntu-20.04'), :bitlinks 'static64 static32'}) include: - ! item(11) - ! item(17) @@ -57,37 +67,69 @@ jobs: steps: # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} - - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0} + - name: install requirements + run: source .github/reqs.sh && c4_install_test_requirements $OS - name: Download vars.sh uses: actions/download-artifact@v3 with: {name: vars.sh, path: ./} - - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: show info + run: source .github/setenv.sh && c4_show_info - name: Install python 3.10 for plotting uses: actions/setup-python@v5 with: { python-version: '3.10' } - name: install benchmark plotting dependencies run:: bash('benchmarks-install') - - name: shared64-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run} - - {name: shared64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot} - - name: static64-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run} - - {name: static64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot} - - name: static32-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run} - - {name: static32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot} - - name: shared32-configure--------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run} - - {name: shared32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot} + + - name: shared64-configure------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && + 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: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target shared64 ryml-bm-run + - name: shared64-plot + run: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot + + - name: static64-configure------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && + 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: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target static64 ryml-bm-run + - name: static64-plot + run: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target static64 ryml-bm-plot + + - name: static32-configure------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && + 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: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target static32 ryml-bm-run + - name: static32-plot + run: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target static32 ryml-bm-plot + + - name: shared32-configure------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && + 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: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target shared32 ryml-bm-run + - name: shared32-plot + run: export NUM_JOBS_BUILD=1 && + source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot - name: gather benchmark results run:: bash('benchmarks-run') diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index 19b51da51..1cdb5e74f 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -10,16 +10,15 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: # 4 - jobs: - #---------------------------------------------------------------------------- clang_canary: name: clang_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() # https://stackoverflow.com/a/62112985/721703 runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + strategy: fail-fast: false matrix: @@ -33,7 +32,9 @@ jobs: env:: load('share/env.yaml') steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} - run: git config --system --add safe.directory '*' - :: common-steps @@ -41,9 +42,10 @@ jobs: clang_tabtokens: name: clang_tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + strategy: fail-fast: false matrix: @@ -53,8 +55,12 @@ jobs: {'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - run: c4core-install $CXX_ - :: common-steps.drop(1) @@ -62,9 +68,10 @@ jobs: clang_noexceptions: name: clang_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + strategy: fail-fast: false matrix: @@ -72,24 +79,32 @@ jobs: env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + load('share/env.yaml') + steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - :: common-steps.drop(1) #---------------------------------------------------------------------------- clang_extended: - name: clang_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + name: "clang_extended/${{matrix.cxx}}/\ + c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}" continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + strategy: fail-fast: false matrix: - item =: \({:std 11, :cxx "clang++-$a(%1)", :bt %2, - :vg 'on', :img "ubuntu$a(%3)"}) + item =: + \({:std 11, :cxx "clang++-$a(%1)", :bt %2, + :vg 'on', :img "ubuntu$a(%3)"}) include: - ! item(17 'Debug' '22.04') - ! item(17 'Release' '22.04') @@ -124,12 +139,14 @@ jobs: - ! item(3.9 'Debug' '18.04') - ! item(3.9 'Release' '18.04') - env:: load('share/env.yaml') steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs + # version + #- name: checkout + # uses: actions/checkout@v3 + # with: {submodules: recursive} #... so we checkout manually: - name: checkout run:: bash('clang-checkout') @@ -140,9 +157,10 @@ jobs: clangsan: name: clang/${{matrix.bt}}/c++${{matrix.std}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + strategy: fail-fast: false matrix: @@ -168,41 +186,73 @@ jobs: env:: load('share/env.yaml') steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - :: common-steps.drop(1) - #---------------------------------------------------------------------------- -# # https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/ -# static_analysis: -# continue-on-error: true -# if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct -# runs-on: ${{matrix.os}} -# strategy: -# fail-fast: false -# matrix: -# include: -# # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism -# - {std: 11, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 11, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 14, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 14, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 17, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# - {std: 20, cxx: clang++-10, bt: Debug , bitlinks: shared64, os: ubuntu-20.04} -# - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-20.04} -# env:: load('share/env.yaml') -# steps: -# - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} -# - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 -# - {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: clang-tidy, run: cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*" ../path/to/source} -# - {name: cppcheck, run: cmake "-DCMAKE_CXX_CPPCHECK=/usr/bin/cppcheck;--std=c++11" ../path/to/source} -# - {name: cpplint, run: cmake "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=179" ..} -# - {name: include-what-you-use, run: cmake "-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu;--transitive_includes_only" ..} -# - {name: link-what-you-use, run: cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..} +# #---------------------------------------------------------------------------- +# # https://blog.kitware.com +# /static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/ +# static_analysis: +# continue-on-error: true +# if: always() +# runs-on: ${{matrix.os}} +# +# strategy: +# fail-fast: false +# matrix: +# include: +# # these jobs take much longer, so run only one bitlink pair per job +# # to profit from parallelism +# - {std: 11, cxx: clang++-10, bt: Debug , bitlinks: shared64, +# os: ubuntu-20.04} +# - {std: 11, cxx: clang++-10, bt: Release, bitlinks: shared64, +# os: ubuntu-20.04} +# - {std: 14, cxx: clang++-10, bt: Debug , bitlinks: shared64, +# os: ubuntu-20.04} +# - {std: 14, cxx: clang++-10, bt: Release, bitlinks: shared64, +# os: ubuntu-20.04} +# - {std: 17, cxx: clang++-10, bt: Debug , bitlinks: shared64, +# os: ubuntu-20.04} +# - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, +# os: ubuntu-20.04} +# - {std: 20, cxx: clang++-10, bt: Debug , bitlinks: shared64, +# os: ubuntu-20.04} +# - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, +# os: ubuntu-20.04} +# +# env:: load('share/env.yaml') +# +# steps: +# - {name: checkout, uses: actions/checkout@v4, +# with: {submodules: recursive}} +# # needed for running in the docker image. +# # see https://github.com/actions/checkout/issues/1169 +# - run: git config --system --add safe.directory '*' +# - {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: clang-tidy, +# run: cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*" +# ../path/to/source} +# - {name: cppcheck, +# run: cmake "-DCMAKE_CXX_CPPCHECK=/usr/bin/cppcheck;--std=c++11" +# ../path/to/source} +# - {name: cpplint, +# run: cmake +# "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=179" +# ..} +# - {name: include-what-you-use, +# run: cmake +# "-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu; +# --transitive_includes_only" ..} +# - {name: link-what-you-use, run: cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..} diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index dfbf6aba7..e0d132671 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -10,21 +10,20 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: # 4 - jobs: - - #---------------------------------------------------------------------------- clang_tidy: name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() # https://stackoverflow.com/a/62112985/721703 runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + strategy: fail-fast: false matrix: - item =: \({:std 11, :cxx 'clang++-17', :bt %2, - :lint 'clang-tidy', :bitlinks %1}) + item =: + \({:std 11, :cxx 'clang++-17', :bt %2, + :lint 'clang-tidy', :bitlinks %1}) include: # clang tidy takes a long time, # so don't do multiple bits/linktypes @@ -40,6 +39,10 @@ jobs: env:: load('share/env.yaml') steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - :: common-steps diff --git a/.github/workflows-src/codeql.yml b/.github/workflows-src/codeql.yml index 11280e0b1..fdb59f5f7 100644 --- a/.github/workflows-src/codeql.yml +++ b/.github/workflows-src/codeql.yml @@ -1,12 +1,12 @@ -name: "CodeQL" +name: CodeQL on: push: - branches: [ "master" ] + branches: [master] pull_request: - branches: [ "master" ] + branches: [master] schedule: - - cron: "41 14 * * 5" + - cron: 41 14 * * 5 jobs: analyze: @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - language: [ cpp ] + language: [cpp] steps: - name: Checkout @@ -41,4 +41,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: - category: "/language:${{ matrix.language }}" + category: /language:${{ matrix.language }} diff --git a/.github/workflows-src/coverage.yml b/.github/workflows-src/coverage.yml index 84ea164eb..3e8550715 100644 --- a/.github/workflows-src/coverage.yml +++ b/.github/workflows-src/coverage.yml @@ -9,18 +9,17 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: # 4 - jobs: - - #---------------------------------------------------------------------------- coverage: name: coverage/c++${{matrix.std}}${{matrix.cmk}} 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 runs-on: ${{matrix.os}} + strategy: fail-fast: false matrix: @@ -34,21 +33,28 @@ jobs: env: !:merge* - ! load('share/env.yaml') - - CMAKE_FLAGS: "${{matrix.cmk}}" - CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}" - COVERALLS_REPO_TOKEN: "${{secrets.COVERALLS_REPO_TOKEN}}" - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + - CMAKE_FLAGS: ${{matrix.cmk}} + CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} + COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} + # coveralls disabled: + # https://github.com/lemurheavy/coveralls-public/issues/1665 # https://docs.coveralls.io/parallel-build-webhook - #COVERALLS_PARALLEL: true + # COVERALLS_PARALLEL: true steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {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: static64-configure--------------------------------------------------- + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + - 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: 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_build_target static64 ryml-coverage} + - name: static64-build + run: source .github/setenv.sh && c4_build_test static64 + - name: static64-run + run: source .github/setenv.sh && c4_build_target static64 ryml-coverage - name: static64-coverage-artifacts uses: actions/upload-artifact@v3 with: @@ -56,13 +62,22 @@ jobs: path: | build/static64/lcov/ build/static64/coverage3-final_filtered.lcov - - {name: static64-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static64 codecov} - # Coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - #- {name: static64-submit-coveralls, run: "if [ \"${{matrix.std}}\" == \"17\" ] ; then ( source .github/setenv.sh && c4_submit_coverage static64 coveralls ) ; fi" } - - name: static32-configure--------------------------------------------------- + - name: static64-submit-codecov + run: source .github/setenv.sh && c4_submit_coverage static64 codecov + + # Coveralls disabled: + # https://github.com/lemurheavy/coveralls-public/issues/1665 + #- name: static64-submit-coveralls + # run: if [ ${{matrix.std}} == 17 ] ; + # then ( source .github/setenv.sh && + # c4_submit_coverage static64 coveralls ) ; fi + + - 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_build_target static32 ryml-coverage} + - name: static32-build + run: source .github/setenv.sh && c4_build_test static32 + - name: static32-run + run: source .github/setenv.sh && c4_build_target static32 ryml-coverage - name: static32-coverage-artifacts uses: actions/upload-artifact@v3 with: @@ -70,15 +85,21 @@ jobs: path: | build/static32/lcov build/static32/coverage3-final_filtered.lcov - - {name: static32-submit-codecov, run: source .github/setenv.sh && c4_submit_coverage static32 codecov} - # Coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 - #- {name: static32-submit-coveralls, run: source .github/setenv.sh && c4_submit_coverage static32 coveralls} + - name: static32-submit-codecov + run: source .github/setenv.sh && c4_submit_coverage static32 codecov + + # Coveralls disabled: + # https://github.com/lemurheavy/coveralls-public/issues/1665 + #- name: static32-submit-coveralls + # run: source .github/setenv.sh && c4_submit_coverage static32 coveralls - # coveralls disabled: https://github.com/lemurheavy/coveralls-public/issues/1665 + # coveralls disabled: + # https://github.com/lemurheavy/coveralls-public/issues/1665 # https://github.com/lemurheavy/coveralls-public/issues/1665 #coveralls_finish: # needs: [coverage] # runs-on: ubuntu-latest + # # steps: # - name: coveralls-notify # #continue-on-error: true diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml index a64a599cc..537c93f03 100644 --- a/.github/workflows-src/emscripten.yml +++ b/.github/workflows-src/emscripten.yml @@ -11,20 +11,20 @@ env: EMSCRIPTEN_CACHE_FOLDER: 'emsdk-cache' jobs: - - #---------------------------------------------------------------------------- emscripten: - # this job is always causing trouble, with failures showing unreadable code dumps - # eg https://github.com/biojppm/rapidyaml/actions/runs/10368522906 + # 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: if: ${{ false }} #if: | # (!contains(github.event.head_commit.message, 'skip all')) || # (!contains(github.event.head_commit.message, 'skip emscripten')) || # contains(github.event.head_commit.message, 'only emscripten') + name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true runs-on: ${{matrix.os}} + strategy: fail-fast: false matrix: @@ -43,16 +43,24 @@ jobs: env:: load('share/env.yaml') steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} - name: setup emscripten cache id: cache-system-libraries uses: actions/cache@v4 - with: {path: "${{env.EMSCRIPTEN_CACHE_FOLDER}}", key: "${{matrix.emver}}-${{runner.os}}"} + with: {path: "${{env.EMSCRIPTEN_CACHE_FOLDER}}", + key: "${{matrix.emver}}-${{runner.os}}"} - name: setup emscripten uses: mymindstorm/setup-emsdk@v11 - with: {version: "${{matrix.emver}}", actions-cache-folder: "${{env.EMSCRIPTEN_CACHE_FOLDER}}"} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: static32-configure--------------------------------------------------- + with: {version: "${{matrix.emver}}", + actions-cache-folder: "${{env.EMSCRIPTEN_CACHE_FOLDER}}"} + - name: show info + run: source .github/setenv.sh && c4_show_info + + - 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-build + run: source .github/setenv.sh && c4_build_test static32 + - name: static32-run + run: source .github/setenv.sh && c4_run_test static32 diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index 53138e807..4a1d8dfab 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -11,22 +11,22 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: # 4 - jobs: - #---------------------------------------------------------------------------- gcc_canary: name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() # https://stackoverflow.com/a/62112985/721703 runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, - :bitlinks 'shared64 static32', - :img "ubuntu$a(%4)"}) + item =: + \({:std %1, :cxx "g++-$a(%2)", :bt %3, + :bitlinks 'shared64 static32', + :img "ubuntu$a(%4)"}) include: &include1 - ! item(11 14 'Debug' '22.04') - ! item(11 14 'Release' '22.04') @@ -45,9 +45,10 @@ jobs: gcc_O2: # see https://github.com/biojppm/rapidyaml/issues/440 name: gcc_O2/${{matrix.cxx}}/c++${{matrix.std}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + strategy: fail-fast: false matrix: @@ -57,26 +58,30 @@ jobs: env:: load('share/env.yaml') + {'CXX_' '${{matrix.gcc}}'} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + - 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: show info + run: source .github/setenv.sh && c4_show_info - name: configure run:: bash('gcc-configure') - name: build - run: | + run: cmake --build build_o2 --target ryml-test-build -j --verbose - name: run - run: | + run: cmake --build build_o2 --target ryml-test-run #---------------------------------------------------------------------------- gcc_tabtokens: name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + strategy: fail-fast: false matrix: @@ -90,14 +95,16 @@ jobs: gcc_noexceptions: name: gcc_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, - :bitlinks 'shared64 static32', :img "ubuntu$a(%4)"}) + item =: + \({:std %1, :cxx "g++-$a(%2)", :bt %3, + :bitlinks 'shared64 static32', :img "ubuntu$a(%4)"}) include: - ! item(11 5 'Debug' '18.04') - ! item(11 5 'Release' '18.04') @@ -107,82 +114,102 @@ jobs: env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + load('share/env.yaml') steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs + # version + #- name: checkout, uses: actions/checkout@v3 + # with: {submodules: recursive} + #- run: git config --system --add safe.directory '*' #... so we checkout manually: - name: checkout run:: bash('gcc-checkout') - run: c4core-install ${{matrix.cxx}} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: shared64-configure--------------------------------------------------- + - 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--------------------------------------------------- + - 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--------------------------------------------------- + - 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--------------------------------------------------- + - 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: 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 #---------------------------------------------------------------------------- gcc_extended: - name: gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + name:: + -'gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/' + + '${{matrix.bt}}/vg${{matrix.vg}}' continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + strategy: fail-fast: false matrix: - item-vg =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :vg 'ON', - :img "ubuntu$a(%4)"}) - item =: \({:std 11, :cxx "g++-$a(%1)", :bt %2 - :img "ubuntu$a(%3)"}) + 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(13 'Debug' '22.04') # XXX Duplicate? - - ! item(13 'Release' '22.04') # XXX Duplicate? - - ! 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') + - ! item-vg(11 14 'Debug' 'ubuntu22.04') + - ! item-vg(11 14 'Release' 'ubuntu22.04') + - ! item-vg(14 14 'Debug' 'ubuntu22.04') + - ! item-vg(14 14 'Release' 'ubuntu22.04') + - ! item-vg(17 14 'Debug' 'ubuntu22.04') + - ! item-vg(17 14 'Release' 'ubuntu22.04') + - ! item-vg(20 14 'Debug' 'ubuntu22.04') + - ! item-vg(20 14 'Release' 'ubuntu22.04') + + - ! item(13 'Debug' 'ubuntu22.04') + - ! item(13 'Release' 'ubuntu22.04') + - ! item(13 'Debug' 'ubuntu22.04') # XXX Duplicate? + - ! item(13 'Release' 'ubuntu22.04') # XXX Duplicate? + - ! item(11 'Debug' 'ubuntu22.04') + - ! item(11 'Release' 'ubuntu22.04') + - ! item(10 'Debug' 'ubuntu22.04') + - ! item(10 'Release' 'ubuntu22.04') + - ! item( 9 'Debug' 'ubuntu22.04') + - ! item( 9 'Release' 'ubuntu22.04') + - ! item( 8 'Debug' 'ubuntu18.04') + - ! item( 8 'Release' 'ubuntu18.04') + - ! item( 7 'Debug' 'ubuntu18.04') + - ! item( 7 'Release' 'ubuntu18.04') + - ! item( 6 'Debug' 'ubuntu18.04') + - ! item( 6 'Release' 'ubuntu18.04') + - ! item( 5 'Debug' 'ubuntu18.04') + - ! item( 5 'Release' 'ubuntu18.04') + - ! item(4.9 'Debug' 'ubuntu18.04') + - ! item(4.9 'Release' 'ubuntu18.04') + - ! item(4.8 'Debug' 'ubuntu18.04') + - ! item(4.8 'Release' 'ubuntu18.04') env:: load('share/env.yaml') @@ -190,11 +217,13 @@ jobs: #---------------------------------------------------------------------------- gccsan: - name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + name: + gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest + strategy: fail-fast: false matrix: @@ -220,45 +249,67 @@ jobs: env:: load('share/env.yaml') steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - - {name: show info, run: source .github/setenv.sh && c4_show_info} - - name: shared64-configure--------------------------------------------------- + - 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--------------------------------------------------- + - 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--------------------------------------------------- + - 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--------------------------------------------------- + - 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: 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 #---------------------------------------------------------------------------- arm: continue-on-error: true - if: always() # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct + if: always() runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu18.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu18.04:latest + strategy: fail-fast: false matrix: - item =: \({:std %1, :bt %2, - :toolchain 'ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake', - :cxx 'arm-linux-gnueabihf-gcc', :os 'ubuntu-20.04'}) + item =: + \({:std %1, :bt %2, + :toolchain 'ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake', + :cxx 'arm-linux-gnueabihf-gcc', :os 'ubuntu-20.04'}) include: - # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism + # these jobs take much longer, so run only one bitlink pair per job to + # profit from parallelism - ! item(11 'Debug') - ! item(11 'Release') - ! item(14 'Debug') @@ -269,19 +320,24 @@ jobs: env:: -{'TOOLCHAIN' '${{matrix.toolchain}}'} + load('share/env.yaml') steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs version - #- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} - #- run: git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - #... so we checkout manually: + # version + #- name: checkout + # uses: actions/checkout@v3 + # with: {submodules: recursive} + #- run: git config --system --add safe.directory '*' - name: checkout run:: bash('gcc-checkout') - name: install gcc-arm-linux-gnueabihf - run: | - c4core-install arm-linux-gnueabihf + run: + c4core-install arm-linux-gnueabihf; c4core-install qemu - - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: show info + run: source .github/setenv.sh && c4_show_info - name: configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test arm - - {name: build, run: source .github/setenv.sh && c4_build_test arm} - - {name: run, run: source .github/setenv.sh && c4_run_test arm} - - {name: pack, run: source .github/setenv.sh && c4_package arm} + - name: build + run: source .github/setenv.sh && c4_build_test arm + - name: run + run: source .github/setenv.sh && c4_run_test arm + - name: pack + run: source .github/setenv.sh && c4_package arm diff --git a/.github/workflows-src/install.yml b/.github/workflows-src/install.yml index f52ffa06b..eef440925 100644 --- a/.github/workflows-src/install.yml +++ b/.github/workflows-src/install.yml @@ -10,8 +10,6 @@ env: NUM_JOBS_BUILD: # 4 jobs: - - #---------------------------------------------------------------------------- install_tests: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -20,6 +18,7 @@ jobs: name: ${{matrix.name}}/${{matrix.bt}} continue-on-error: true runs-on: ${{matrix.os}} + strategy: fail-fast: false matrix: @@ -151,9 +150,13 @@ jobs: PDIR: prefix/${{matrix.name}}-${{matrix.bt}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {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: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + - 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: Install python 3.9 uses: actions/setup-python@v5 with: { python-version: 3.9 } @@ -162,8 +165,12 @@ jobs: - name: configure run:: bash('install-configure') - name: build - run: | - cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j + run: > + cmake --build $BDIR + --config ${{matrix.bt}} + --target ryml-test-build -j - name: run - run: | - cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run + run: > + cmake --build $BDIR + --config ${{matrix.bt}} + --target ryml-test-run diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index 9872f208a..5a8f41794 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -10,10 +10,7 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: # 4 - jobs: - - #---------------------------------------------------------------------------- macosx: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -21,6 +18,7 @@ jobs: contains(github.event.head_commit.message, 'only macosx') continue-on-error: true runs-on: ${{matrix.os}} + strategy: fail-fast: false matrix: @@ -40,7 +38,12 @@ jobs: env:: load('share/env.yaml') steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} - - {name: xcode, uses: maxim-lobanov/setup-xcode@v1, with: {xcode-version: "${{matrix.xcver}}" }} - - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + - name: xcode + uses: maxim-lobanov/setup-xcode@v1 + with: {xcode-version: "${{matrix.xcver}}" } + - name: install requirements + run: source .github/reqs.sh && c4_install_test_requirements $OS - :: common-steps.drop(1) diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index 8b03875ad..25407fbff 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -9,51 +9,55 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip rarearchs')) || contains(github.event.head_commit.message, 'only rarearchs') + name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true runs-on: ubuntu-20.04 + strategy: fail-fast: false matrix: - item =: \({:std %1, :bt %2, :arch %3, :distro %4}) + item =: \({:std %1, :bt %2, :arch %3, :distro (%4 || 'ubuntu20.04')}) include: - - ! item(11 'Debug' 'aarch64' 'ubuntu20.04') - - ! item(11 'Release' 'aarch64' 'ubuntu20.04') - - ! item(14 'Debug' 'aarch64' 'ubuntu20.04') - - ! item(14 'Release' 'aarch64' 'ubuntu20.04') - - ! item(17 'Debug' 'aarch64' 'ubuntu20.04') - - ! item(17 'Release' 'aarch64' 'ubuntu20.04') - - - ! item(11 'Debug' 'ppc64le' 'ubuntu20.04') - - ! item(11 'Release' 'ppc64le' 'ubuntu20.04') - - ! item(14 'Debug' 'ppc64le' 'ubuntu20.04') - - ! item(14 'Release' 'ppc64le' 'ubuntu20.04') - - ! item(17 'Debug' 'ppc64le' 'ubuntu20.04') - - ! item(17 'Release' 'ppc64le' 'ubuntu20.04') - - - ! item(11 'Debug' 's390x' 'ubuntu20.04') - - ! item(11 'Release' 's390x' 'ubuntu20.04') - - ! item(14 'Debug' 's390x' 'ubuntu20.04') - - ! item(14 'Release' 's390x' 'ubuntu20.04') - - ! item(17 'Debug' 's390x' 'ubuntu20.04') - - ! item(17 'Release' 's390x' 'ubuntu20.04') - - #- ! item(11 'Debug' 'armv6' 'bullseye') - #- ! item(11 'Release' 'armv6' 'bullseye') - #- ! item(14 'Debug' 'armv6' 'bullseye') - #- ! item(14 'Release' 'armv6' 'bullseye') - #- ! item(17 'Debug' 'armv6' 'bullseye') - #- ! item(17 'Release' 'armv6' 'bullseye') - - #- ! item(11 'Debug' 'armv7' 'ubuntu20.04') - #- ! item(11 'Release' 'armv7' 'ubuntu20.04') - #- ! item(14 'Debug' 'armv7' 'ubuntu20.04') - #- ! item(14 'Release' 'armv7' 'ubuntu20.04') - #- ! item(17 'Debug' 'armv7' 'ubuntu20.04') - #- ! item(17 'Release' 'armv7' 'ubuntu20.04') + - ! item(11 'Debug' 'aarch64') + - ! item(11 'Release' 'aarch64') + - ! item(14 'Debug' 'aarch64') + - ! item(14 'Release' 'aarch64') + - ! item(17 'Debug' 'aarch64') + - ! item(17 'Release' 'aarch64') + + - ! item(11 'Debug' 'ppc64le') + - ! item(11 'Release' 'ppc64le') + - ! item(14 'Debug' 'ppc64le') + - ! item(14 'Release' 'ppc64le') + - ! item(17 'Debug' 'ppc64le') + - ! item(17 'Release' 'ppc64le') + + - ! item(11 'Debug' 's390x') + - ! item(11 'Release' 's390x') + - ! item(14 'Debug' 's390x') + - ! item(14 'Release' 's390x') + - ! item(17 'Debug' 's390x') + - ! item(17 'Release' 's390x') + + #- ! item(11 'Debug' 'armv6' 'bullseye') + #- ! item(11 'Release' 'armv6' 'bullseye') + #- ! item(14 'Debug' 'armv6' 'bullseye') + #- ! item(14 'Release' 'armv6' 'bullseye') + #- ! item(17 'Debug' 'armv6' 'bullseye') + #- ! item(17 'Release' 'armv6' 'bullseye') + + #- ! item(11 'Debug' 'armv7') + #- ! item(11 'Release' 'armv7') + #- ! item(14 'Debug' 'armv7') + #- ! item(14 'Release' 'armv7') + #- ! item(17 'Debug' 'armv7') + #- ! item(17 'Release' 'armv7') steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} - name: test uses: uraimo/run-on-arch-action@v2.7.2 with: diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index 3de3e244e..b15f82d6e 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -13,21 +13,26 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=OFF NUM_JOBS_BUILD: # 4 - # useful to iterate when fixing the release: -# ver=0.2.1 ; ( set -x ; git tag -d v$ver ; git push origin :v$ver ) ; (set -x ; set -e ; tbump --only-patch --non-interactive $ver ; git add -u ; git commit --amend --no-edit ; git tag --annotate --message "v$ver" "v$ver" ; git push -f --tags origin ) +# ver=0.2.1 ; ( set -x ; git tag -d v$ver ; git push origin :v$ver ) ; (set -x +# ; set -e ; tbump --only-patch --non-interactive $ver ; git add -u ; git +# commit --amend --no-edit ; git tag --annotate --message "v$ver" "v$ver" ; git +# push -f --tags origin ) 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') + runs-on: ubuntu-latest + steps: # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0} - name: Variables (from tag) if: contains(github.ref, 'tags/v') run:: bash('release-vars-1') @@ -47,10 +52,14 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + needs: gettag runs-on: ubuntu-latest + steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} - name: Download vars.sh uses: actions/download-artifact@v3 with: {name: vars.sh, path: ./} @@ -58,7 +67,7 @@ jobs: uses: actions/setup-python@v5 with: { python-version: 3.9 } - name: Install requirements - run: | + run: sudo -E pip install git-archive-all - name: Create source packages run:: bash('release-create-source-packages') @@ -73,9 +82,11 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} needs: gettag runs-on: ${{matrix.config.os}} + env: DEV: OFF BT: Release @@ -111,15 +122,20 @@ jobs: gen: STGZ, mime: x-sh, os: macos-13, cxx: xcode} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} - name: Download vars.sh uses: actions/download-artifact@v3 with: {name: vars.sh, path: ./} - - {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--------------------------------------------------- + - 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_target shared64} + - name: shared64-build + run: source .github/setenv.sh && c4_build_target shared64 - name: shared64-pack run: source .github/setenv.sh && c4_package shared64 $GEN - name: shared64-normalize @@ -130,21 +146,26 @@ jobs: #---------------------------------------------------------------------------- # create python packages - # adapted from https://github.com/pikepdf/pikepdf/blob/master/.github/workflows/build_wheels.yml + # adapted from + # github.com/pikepdf/pikepdf/blob/master/.github/workflows/build_wheels.yml 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') + name: python/src runs-on: ubuntu-latest + steps: # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0} - name: install python 3.9 uses: actions/setup-python@v5 - with: { python-version: 3.9 } + with: {python-version: 3.9} - name: package python src packages run:: bash('release-package-python') - name: normalize src package names @@ -158,12 +179,19 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') - name: python/${{matrix.config.cibw_pyv}}/${{matrix.config.osname}}/${{matrix.config.cibw_arch}} + + name:: + -'python/${{matrix.config.cibw_pyv}}/' + + '${{matrix.config.osname}}/${{matrix.config.cibw_arch}}' 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}}" - CIBW_ARCHS: "${{matrix.config.cibw_arch}}" + 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 @@ -195,39 +223,85 @@ jobs: - ! python('3.6' 36 'x86_64' 'manylinux_x86_64') - ! python('3.6' 36 'i686' 'manylinux_i686') - # the windows builds are disabled because they are causing problems and preventing the release. + # the windows builds are disabled because they are causing problems and + # preventing the release. # the problems are related to CMakeExtension forcing the use of Ninja - # which does not play well with the -G 'Visual Studio...' option used below. + # which does not play well with the -G 'Visual Studio...' option used + # below. # fixing this looks like it will be time-intensive. - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: AMD64 , cibw_platform: win_amd64, osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A x64'} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86 , cibw_platform: win32 , osname: win , os: windows-2019, cxx: vs2019} #, cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: AMD64 , + # cibw_platform: win_amd64, osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86 , + # cibw_platform: win32 , osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: AMD64 , + # cibw_platform: win_amd64, osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86 , + # cibw_platform: win32 , osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: AMD64 , + # cibw_platform: win_amd64, osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86 , + # cibw_platform: win32 , osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: AMD64 , + # cibw_platform: win_amd64, osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86 , + # cibw_platform: win32 , osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: AMD64 , + # cibw_platform: win_amd64, osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86 , + # cibw_platform: win32 , osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: AMD64 , + # cibw_platform: win_amd64, osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A x64'} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86 , + # cibw_platform: win32 , osname: win , os: windows-2019, + # cxx: vs2019}, + # cmakeflags: '-G "Visual Studio 16 2019" -A Win32'} ## macosx builds are generating a SIGSEGV when importing. (!) - ## https://github.com/biojppm/rapidyaml/actions/runs/3062528713/jobs/4943611397#step:7:269 - #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + ## /biojppm/rapidyaml/actions/runs/3062528713/jobs/4943611397#step:7:269 + #- {pythonv: '3.11', cibw_pyv: 311, cibw_arch: x86_64, + # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.10', cibw_pyv: 310, cibw_arch: x86_64, + # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.9' , cibw_pyv: 39 , cibw_arch: x86_64, + # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.8' , cibw_pyv: 38 , cibw_arch: x86_64, + # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.7' , cibw_pyv: 37 , cibw_arch: x86_64, + # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} + #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, + # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} steps: # use fetch-depth to ensure all tags are fetched - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0} - name: create wheel uses: pypa/cibuildwheel@v2.17 - name: rename wheelhouse -> dist - run: | - mv -fv wheelhouse dist + run: + mv -fv wheelhouse dist; ls -lFhp dist/ - name: Save artifacts for publishing to PyPI uses: actions/upload-artifact@v3 @@ -236,7 +310,7 @@ jobs: - name: install python ${{matrix.config.pythonv}} uses: actions/setup-python@v5 with: - python-version: '${{matrix.config.pythonv}}' + python-version: ${{matrix.config.pythonv}} - name: test with python ${{matrix.config.pythonv}} run:: bash('release-test-with-python') @@ -252,8 +326,11 @@ jobs: - cpp - python_src - python_wheels + steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}} + - name: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} - name: Gather artifacts - ./assets uses: actions/download-artifact@v3 with: {name: assets, path: assets} @@ -261,10 +338,10 @@ jobs: uses: actions/download-artifact@v3 with: {name: dist, path: dist} - name: Verify existing artifacts - run: | - ls -lFhp assets/ + run: + ls -lFhp assets/; ls -lFhp dist/ - # + # Github - name: Restore vars.sh if: contains(github.ref, 'tags/v') @@ -281,7 +358,7 @@ jobs: if: contains(github.ref, 'tags/v') id: create_release uses: actions/create-release@v1 - env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } + env: {GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"} with: tag_name: ${{github.ref}} release_name: Release ${{steps.vars.outputs.VERSION}} @@ -291,11 +368,11 @@ jobs: - name: Upload assets to Github Release if: contains(github.ref, 'tags/v') uses: dwenegar/upload-release-assets@v1 - env: { GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" } + env: {GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"} with: release_id: ${{steps.create_release.outputs.id}} assets_path: ./assets/ - # + # PyPI (test) - name: Publish python packages to test PyPI uses: pypa/gh-action-pypi-publish@v1.4.2 @@ -305,7 +382,7 @@ jobs: password: ${{secrets.PYPI_TOKEN_TEST}} verbose: true skip_existing: true - # + # PyPI (production) - name: Publish python packages to production PyPI if: contains(github.ref, 'tags/v') diff --git a/.github/workflows-src/samples.yml b/.github/workflows-src/samples.yml index 48ae5b67d..4b4a69fc1 100644 --- a/.github/workflows-src/samples.yml +++ b/.github/workflows-src/samples.yml @@ -10,15 +10,15 @@ env: NUM_JOBS_BUILD: # 4 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 runs-on: ${{matrix.os}} + strategy: fail-fast: false matrix: @@ -36,15 +36,29 @@ jobs: RYMLSHA: ${{github.event.pull_request.head.sha}} steps: - - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive, fetch-depth: 0 } } # use fetch-depth to ensure all tags are fetched - - {name: python3, uses: actions/setup-python@v5, with: {python-version: 3.9}} - - {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: singleheader, run: cd samples/singleheader && ./run.sh $BT } - - {name: singleheaderlib-static, run: cd samples/singleheaderlib && ./run_static.sh $BT } - - {name: singleheaderlib-shared, run: cd samples/singleheaderlib && ./run_shared.sh $BT } - - {name: add_subdirectory, run: cd samples/add_subdirectory && ./run.sh $BT } - - {name: find_package, run: cd samples/find_package && ./run.sh $BT } - - {name: custom_c4core, run: cd samples/custom_c4core && ./run.sh $BT } - - {name: fetch_content, run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA } + - name: checkout + uses: actions/checkout@v4 + # use fetch-depth to ensure all tags are fetched + with: {submodules: recursive, fetch-depth: 0} + - name: python3 + uses: actions/setup-python@v5 + with: {python-version: 3.9} + - 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: singleheader + run: cd samples/singleheader && ./run.sh $BT + - name: singleheaderlib-static + run: cd samples/singleheaderlib && ./run_static.sh $BT + - name: singleheaderlib-shared + run: cd samples/singleheaderlib && ./run_shared.sh $BT + - name: add_subdirectory + run: cd samples/add_subdirectory && ./run.sh $BT + - name: find_package + run: cd samples/find_package && ./run.sh $BT + - name: custom_c4core + run: cd samples/custom_c4core && ./run.sh $BT + - name: fetch_content + run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA diff --git a/.github/workflows-src/share/gcc-setup.yaml b/.github/workflows-src/share/gcc-setup.yaml index c0b5eeceb..b0e313cbe 100644 --- a/.github/workflows-src/share/gcc-setup.yaml +++ b/.github/workflows-src/share/gcc-setup.yaml @@ -1,6 +1,8 @@ # Cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs # version. -#- {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive}} +#- name: checkout +# uses: actions/checkout@v3 +# with: {submodules: recursive} # Needed for running in the docker image. # See https://github.com/actions/checkout/issues/1169 #- run: git config --system --add safe.directory '*' diff --git a/.github/workflows-src/share/steps.yaml b/.github/workflows-src/share/steps.yaml index 795abb878..216967d0a 100644 --- a/.github/workflows-src/share/steps.yaml +++ b/.github/workflows-src/share/steps.yaml @@ -1,23 +1,39 @@ - run: c4core-install ${{matrix.cxx}} -- {name: show info, run: source .github/setenv.sh && c4_show_info} +- 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: 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: 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: 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: 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 diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index f262ddc8b..9441b4458 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -10,7 +10,6 @@ env: CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: # 4 - jobs: vs: name: ${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} @@ -18,8 +17,10 @@ jobs: (!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: @@ -47,8 +48,11 @@ jobs: 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: checkout + uses: actions/checkout@v4 + with: {submodules: recursive} + - name: install requirements + run: source .github/reqs.sh && c4_install_test_requirements $OS - :: common-steps.drop(1) # TODO: @@ -58,45 +62,72 @@ jobs: # (!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: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} +# - {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: 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--------------------------------------------------- +# - 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--------------------------------------------------- +# - 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--------------------------------------------------- +# - 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--------------------------------------------------- +# - 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} +# - 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 diff --git a/.github/workflows-src/ys/common.ys b/.github/workflows-src/ys/common.ys index f9b3c6116..e48d34eb8 100644 --- a/.github/workflows-src/ys/common.ys +++ b/.github/workflows-src/ys/common.ys @@ -9,9 +9,10 @@ defn workflow-setup(name=nil overrides={}):: # 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:: - # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + # https://github.com/orgs/community/discussions/26276 workflow_dispatch: push: branches: [master] diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index c7f261867..82e6c10d5 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -142,7 +142,7 @@ jobs: pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt python -c 'import munch ; print("ok!") ; exit(0)' echo $? - - name: shared64-configure--------------------------------------------------- + - name: shared64-configure------------------------------------------------- run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared64 - name: shared64-build run: source .github/setenv.sh && c4_build_target shared64 ryml-bm-build @@ -150,7 +150,7 @@ jobs: run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run - name: shared64-plot run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot - - name: static64-configure--------------------------------------------------- + - name: static64-configure------------------------------------------------- run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test static64 - name: static64-build run: source .github/setenv.sh && c4_build_target static64 ryml-bm-build @@ -158,7 +158,7 @@ jobs: run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run - name: static64-plot run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot - - name: static32-configure--------------------------------------------------- + - name: static32-configure------------------------------------------------- run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test static32 - name: static32-build run: source .github/setenv.sh && c4_build_target static32 ryml-bm-build @@ -166,7 +166,7 @@ jobs: run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run - name: static32-plot run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot - - name: shared32-configure--------------------------------------------------- + - name: shared32-configure------------------------------------------------- run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared32 - name: shared32-build run: source .github/setenv.sh && c4_build_target shared32 ryml-bm-build diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e008cbfb5..0c675f8fc 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -69,7 +69,7 @@ jobs: run: source .github/reqs.sh && c4_install_test_requirements $OS - name: show info run: source .github/setenv.sh && c4_show_info - - name: static64-configure--------------------------------------------------- + - name: static64-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static64 - name: static64-build run: source .github/setenv.sh && c4_build_test static64 @@ -84,7 +84,7 @@ jobs: build/static64/coverage3-final_filtered.lcov - name: static64-submit-codecov run: source .github/setenv.sh && c4_submit_coverage static64 codecov - - name: static32-configure--------------------------------------------------- + - name: static32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build run: source .github/setenv.sh && c4_build_test static32 diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index f321cee0d..507e8f0e3 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -79,7 +79,7 @@ jobs: actions-cache-folder: ${{env.EMSCRIPTEN_CACHE_FOLDER}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: static32-configure--------------------------------------------------- + - name: static32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build run: source .github/setenv.sh && c4_build_test static32 diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 13586a170..972c05ebd 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -166,11 +166,9 @@ jobs: -DRYML_BUILD_TESTS:BOOL=ON \ -DRYML_DBG:BOOL=OFF - name: build - run: | - cmake --build build_o2 --target ryml-test-build -j --verbose + run: cmake --build build_o2 --target ryml-test-build -j --verbose - name: run - run: | - cmake --build build_o2 --target ryml-test-run + run: cmake --build build_o2 --target ryml-test-run gcc_tabtokens: name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true @@ -337,7 +335,7 @@ jobs: - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: shared64-configure--------------------------------------------------- + - name: shared64-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared64 - name: shared64-build run: source .github/setenv.sh && c4_build_test shared64 @@ -345,7 +343,7 @@ jobs: run: source .github/setenv.sh && c4_run_test shared64 - name: shared64-pack run: source .github/setenv.sh && c4_package shared64 - - name: static64-configure--------------------------------------------------- + - name: static64-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static64 - name: static64-build run: source .github/setenv.sh && c4_build_test static64 @@ -353,7 +351,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static64 - name: static64-pack run: source .github/setenv.sh && c4_package static64 - - name: static32-configure--------------------------------------------------- + - name: static32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build run: source .github/setenv.sh && c4_build_test static32 @@ -361,7 +359,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static32 - name: static32-pack run: source .github/setenv.sh && c4_package static32 - - name: shared32-configure--------------------------------------------------- + - name: shared32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared32 - name: shared32-build run: source .github/setenv.sh && c4_build_test shared32 @@ -657,7 +655,7 @@ jobs: - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: shared64-configure--------------------------------------------------- + - name: shared64-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared64 - name: shared64-build run: source .github/setenv.sh && c4_build_test shared64 @@ -665,7 +663,7 @@ jobs: run: source .github/setenv.sh && c4_run_test shared64 - name: shared64-pack run: source .github/setenv.sh && c4_package shared64 - - name: static64-configure--------------------------------------------------- + - name: static64-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static64 - name: static64-build run: source .github/setenv.sh && c4_build_test static64 @@ -673,7 +671,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static64 - name: static64-pack run: source .github/setenv.sh && c4_package static64 - - name: static32-configure--------------------------------------------------- + - name: static32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build run: source .github/setenv.sh && c4_build_test static32 @@ -681,7 +679,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static32 - name: static32-pack run: source .github/setenv.sh && c4_package static32 - - name: shared32-configure--------------------------------------------------- + - name: shared32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared32 - name: shared32-build run: source .github/setenv.sh && c4_build_test shared32 @@ -753,9 +751,7 @@ jobs: git reset --hard FETCH_HEAD git submodule update --init --recursive - name: install gcc-arm-linux-gnueabihf - run: | - c4core-install arm-linux-gnueabihf - c4core-install qemu + run: c4core-install arm-linux-gnueabihf; c4core-install qemu - name: show info run: source .github/setenv.sh && c4_show_info - name: configure--------------------------------------------------- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c4811353..a56ba9ede 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,8 +90,7 @@ jobs: with: python-version: 3.9 - name: Install requirements - run: | - sudo -E pip install git-archive-all + run: sudo -E pip install git-archive-all - name: Create source packages run: | pwd @@ -169,7 +168,7 @@ jobs: run: source .github/reqs.sh && c4_install_test_requirements $OS - name: show info run: source .github/setenv.sh && c4_show_info - - name: shared64-configure--------------------------------------------------- + - name: shared64-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared64 - name: shared64-build run: source .github/setenv.sh && c4_build_target shared64 @@ -330,9 +329,7 @@ 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; ls -lFhp dist/ - name: Save artifacts for publishing to PyPI uses: actions/upload-artifact@v3 with: @@ -391,9 +388,7 @@ jobs: name: dist path: dist - name: Verify existing artifacts - run: | - ls -lFhp assets/ - ls -lFhp dist/ + run: ls -lFhp assets/; ls -lFhp dist/ - name: Restore vars.sh if: contains(github.ref, 'tags/v') uses: actions/download-artifact@v3 From 94a619de0dc688d9a1689298b1c5ea22aa7ff288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Fri, 3 Jan 2025 13:11:55 -0500 Subject: [PATCH 11/22] Use code to gen include matrices in workflows --- .github/workflows-src/benchmarks.yml | 10 +++--- .github/workflows-src/clang.yml | 37 +++++++++------------- .github/workflows-src/clang_tidy.yml | 24 ++++++--------- .github/workflows-src/gcc.yml | 27 ++++++---------- .github/workflows-src/macosx.yml | 24 +++++++-------- .github/workflows-src/rarearchs.yml | 46 ++++++---------------------- 6 files changed, 60 insertions(+), 108 deletions(-) diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index e4e83cde0..fafdf1973 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -49,12 +49,12 @@ jobs: fail-fast: false matrix: item =: - \({:std %1, :cxx (%2 || 'g++-10'), :bt 'Release', - :os (%3 || 'ubuntu-20.04'), :bitlinks 'static64 static32'}) + \({:std %1, :cxx %2, :bt 'Release', + :os %3, :bitlinks 'static64 static32'}) include: - - ! item(11) - - ! item(17) - - ! item(20) + - ! 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') diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index 1cdb5e74f..71205c22f 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -23,11 +23,11 @@ jobs: fail-fast: false 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') + include:: &include1 -[ + item(20 'clang++-17' 'Debug') + item(20 'clang++-17' 'Release') + item(11 'clang++-9' 'Debug') + item(11 'clang++-9' 'Release') ] env:: load('share/env.yaml') @@ -164,24 +164,15 @@ jobs: strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx 'clang++-17', :bt %2, :bitlinks 'static64'}) - include: - - ! item(11 'asan') - - ! item(14 'asan') - - ! item(17 'asan') - - ! item(20 'asan') - - ! item(11 'lsan') - - ! item(14 'lsan') - - ! item(17 'lsan') - - ! item(20 'lsan') - - ! item(11 'tsan') - - ! item(14 'tsan') - - ! item(17 'tsan') - - ! item(20 'tsan') - - ! item(11 'ubsan') - - ! item(14 'ubsan') - - ! item(17 'ubsan') - - ! item(20 'ubsan') + include:: + ? for + san qw(asan lsan tsan ubsan) + std [11 14 17 20] + : ! + std:: std + cxx: clang++-17 + bt:: san + bitlinks: static64 env:: load('share/env.yaml') diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index e0d132671..e59daea65 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -21,20 +21,16 @@ jobs: strategy: fail-fast: false matrix: - item =: - \({:std 11, :cxx 'clang++-17', :bt %2, - :lint 'clang-tidy', :bitlinks %1}) - include: - # clang tidy takes a long time, - # so don't do multiple bits/linktypes - - ! item('shared64' 'Debug') - - ! item('shared32' 'Debug') - - ! item('static64' 'Debug') - - ! item('static32' 'Debug') - - ! item('shared64' 'ReleaseWithDebInfo') - - ! item('shared32' 'ReleaseWithDebInfo') - - ! item('static64' 'ReleaseWithDebInfo') - - ! item('static32' 'ReleaseWithDebInfo') + include:: + ? for + bt qw(Debug ReleaseWithDebInfo) + bl qw(shared64 shared32 static64 static32) + : ! + std: 11 + cxx: clang++-17 + bt:: bt + lint: clang-tidy + bitlinks:: bl env:: load('share/env.yaml') diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index 4a1d8dfab..fec67ea75 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -227,24 +227,15 @@ jobs: strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx 'g++-14', :bt %2, :bitlinks 'static64'}) - include: - - ! item(11 'asan') - - ! item(14 'asan') - - ! item(17 'asan') - - ! item(20 'asan') - - ! item(11 'lsan') - - ! item(14 'lsan') - - ! item(17 'lsan') - - ! item(20 'lsan') - - ! item(11 'tsan') - - ! item(14 'tsan') - - ! item(17 'tsan') - - ! item(20 'tsan') - - ! item(11 'ubsan') - - ! item(14 'ubsan') - - ! item(17 'ubsan') - - ! item(20 'ubsan') + include:: + ? for + san qw(asan lsan tsan ubsan) + std qw(11 14 17 20) + : ! + std:: std:N + cxx: g++-14 + bt:: san + bitlinks: static64 env:: load('share/env.yaml') diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index 5a8f41794..9460bb144 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -22,18 +22,18 @@ jobs: strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx 'xcode', :xcver %2, :bt %3, - :os 'macos-13', :bitlinks 'shared64 static64'}) - include: - - ! item(11 15 'Debug') - - ! item(11 15 'Release') - - ! item(17 15 'Debug') - - ! item(17 15 'Release') - - - ! item(11 14 'Debug') - - ! item(11 14 'Release') - - ! item(17 14 'Debug') - - ! item(17 14 'Release') + include:: + ? for + xcver [15 14] + std [11 17] + bt qw(Debug Release) + : ! + std:: std + cxx: xcode + xcver:: xcver + bt:: bt + os: macos-13 + bitlinks: shared64 static64 env:: load('share/env.yaml') diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index 25407fbff..9e5da3d81 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -17,42 +17,16 @@ jobs: strategy: fail-fast: false matrix: - item =: \({:std %1, :bt %2, :arch %3, :distro (%4 || 'ubuntu20.04')}) - include: - - ! item(11 'Debug' 'aarch64') - - ! item(11 'Release' 'aarch64') - - ! item(14 'Debug' 'aarch64') - - ! item(14 'Release' 'aarch64') - - ! item(17 'Debug' 'aarch64') - - ! item(17 'Release' 'aarch64') - - - ! item(11 'Debug' 'ppc64le') - - ! item(11 'Release' 'ppc64le') - - ! item(14 'Debug' 'ppc64le') - - ! item(14 'Release' 'ppc64le') - - ! item(17 'Debug' 'ppc64le') - - ! item(17 'Release' 'ppc64le') - - - ! item(11 'Debug' 's390x') - - ! item(11 'Release' 's390x') - - ! item(14 'Debug' 's390x') - - ! item(14 'Release' 's390x') - - ! item(17 'Debug' 's390x') - - ! item(17 'Release' 's390x') - - #- ! item(11 'Debug' 'armv6' 'bullseye') - #- ! item(11 'Release' 'armv6' 'bullseye') - #- ! item(14 'Debug' 'armv6' 'bullseye') - #- ! item(14 'Release' 'armv6' 'bullseye') - #- ! item(17 'Debug' 'armv6' 'bullseye') - #- ! item(17 'Release' 'armv6' 'bullseye') - - #- ! item(11 'Debug' 'armv7') - #- ! item(11 'Release' 'armv7') - #- ! item(14 'Debug' 'armv7') - #- ! item(14 'Release' 'armv7') - #- ! item(17 'Debug' 'armv7') - #- ! item(17 'Release' 'armv7') + include:: + ? for + arch qw(aarch64 ppc64le s390x) + std [11 14 17] + bt qw(Debug Release) + : ! + std:: std + bt:: bt + arch:: arch + distro: ubuntu20.04 steps: - name: checkout From c404b34580a6034d198ab2c4ea0b51d9068c2af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Fri, 3 Jan 2025 15:28:52 -0500 Subject: [PATCH 12/22] Don't quote GHA var expansions in workflows --- .github/workflows-src/clang.yml | 5 +++-- .github/workflows-src/emscripten.yml | 10 ++++++---- .github/workflows-src/macosx.yml | 3 ++- .github/workflows-src/release.yml | 23 ++++++++++++++--------- .github/workflows-src/windows.yml | 2 +- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index 71205c22f..a222e3855 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -92,8 +92,9 @@ jobs: #---------------------------------------------------------------------------- clang_extended: - name: "clang_extended/${{matrix.cxx}}/\ - c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}" + name: + "clang_extended/${{matrix.cxx}}/\ + c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}" continue-on-error: true if: always() runs-on: ubuntu-latest diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml index 537c93f03..caaf32e31 100644 --- a/.github/workflows-src/emscripten.yml +++ b/.github/workflows-src/emscripten.yml @@ -49,12 +49,14 @@ jobs: - name: setup emscripten cache id: cache-system-libraries uses: actions/cache@v4 - with: {path: "${{env.EMSCRIPTEN_CACHE_FOLDER}}", - key: "${{matrix.emver}}-${{runner.os}}"} + with: + path: ${{env.EMSCRIPTEN_CACHE_FOLDER}} + key: ${{matrix.emver}}-${{runner.os}} - name: setup emscripten uses: mymindstorm/setup-emsdk@v11 - with: {version: "${{matrix.emver}}", - actions-cache-folder: "${{env.EMSCRIPTEN_CACHE_FOLDER}}"} + with: + version: ${{matrix.emver}} + actions-cache-folder: ${{env.EMSCRIPTEN_CACHE_FOLDER}} - name: show info run: source .github/setenv.sh && c4_show_info diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index 9460bb144..8cb90c18c 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -43,7 +43,8 @@ jobs: with: {submodules: recursive} - name: xcode uses: maxim-lobanov/setup-xcode@v1 - with: {xcode-version: "${{matrix.xcver}}" } + with: + xcode-version: ${{matrix.xcver}} - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - :: common-steps.drop(1) diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index b15f82d6e..08a160fb6 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -14,10 +14,13 @@ env: NUM_JOBS_BUILD: # 4 # useful to iterate when fixing the release: -# ver=0.2.1 ; ( set -x ; git tag -d v$ver ; git push origin :v$ver ) ; (set -x -# ; set -e ; tbump --only-patch --non-interactive $ver ; git add -u ; git -# commit --amend --no-edit ; git tag --annotate --message "v$ver" "v$ver" ; git -# push -f --tags origin ) +# ver=0.2.1 +# (set -xe; git tag -d v$ver; git push origin :v$ver) +# (set -xe +# tbump --only-patch --non-interactive $ver +# git add -u; git commit --amend --no-edit +# git tag --annotate --message "v$ver" "v$ver" +# git push -f --tags origin ) jobs: gettag: @@ -187,10 +190,10 @@ jobs: env: CMAKE_FLAGS: - "${{matrix.config.cmakeflags}} -DRYML_DEV=OFF -DRYML_BUILD_API=ON - -DRYML_API_TESTS=OFF -DRYML_API_BENCHMARKS=OFF" + ${{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}}" + cp${{matrix.config.cibw_pyv}}-${{matrix.config.cibw_platform}} CIBW_ARCHS: ${{matrix.config.cibw_arch}} strategy: @@ -358,7 +361,8 @@ jobs: if: contains(github.ref, 'tags/v') id: create_release uses: actions/create-release@v1 - env: {GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: tag_name: ${{github.ref}} release_name: Release ${{steps.vars.outputs.VERSION}} @@ -368,7 +372,8 @@ jobs: - name: Upload assets to Github Release if: contains(github.ref, 'tags/v') uses: dwenegar/upload-release-assets@v1 - env: {GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: release_id: ${{steps.create_release.outputs.id}} assets_path: ./assets/ diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index 9441b4458..99a35912e 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -98,7 +98,7 @@ jobs: # - name: install mingw # uses: egor-tensin/setup-mingw@v2 # with: -# platform: "${{matrix.platform}}" +# platform: ${{matrix.platform}} # - name: shared64-configure------------------------------------------------ # run: source .github/setenv.sh && c4_cfg_test shared64 # - name: shared64-build From fc16220e979c383b6b120ea29408feced655a228 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Sun, 5 Jan 2025 01:59:40 +0000 Subject: [PATCH 13/22] make generated workflows readonly --- .github/workflows-src/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows-src/Makefile b/.github/workflows-src/Makefile index becbb14c2..9aa709a6c 100644 --- a/.github/workflows-src/Makefile +++ b/.github/workflows-src/Makefile @@ -23,9 +23,11 @@ force: touch *.yml ../workflows/%: % $(YS) + @[ -f $@ ] && chmod a+w $@ @echo "# DO NOT EDIT - GENERATED FROM .github/workflows-ys/$<" > $@ @echo >> $@ ys -Y $< >> $@ + @chmod a-w $@ # Auto install a specific version of ys (under /tmp): $(YS): From ce45a4c7a7935966b5653012b976949ee6c58eb2 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Sun, 5 Jan 2025 01:59:11 +0000 Subject: [PATCH 14/22] rarearchs: try ubuntu22.04 --- .github/workflows-src/rarearchs.yml | 2 +- .github/workflows/rarearchs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index 9e5da3d81..df73ab383 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -12,7 +12,7 @@ jobs: name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false diff --git a/.github/workflows/rarearchs.yml b/.github/workflows/rarearchs.yml index d7b22e7a8..29ed7b3b8 100644 --- a/.github/workflows/rarearchs.yml +++ b/.github/workflows/rarearchs.yml @@ -20,7 +20,7 @@ jobs: contains(github.event.head_commit.message, 'only rarearchs') name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: From 22c992077955515da72658ff30ba39417fbdcaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Sun, 5 Jan 2025 12:29:51 -0500 Subject: [PATCH 15/22] Small change to workflows-src/gcc.yml --- .github/workflows-src/gcc.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index fec67ea75..911ac3039 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -230,12 +230,8 @@ jobs: include:: ? for san qw(asan lsan tsan ubsan) - std qw(11 14 17 20) - : ! - std:: std:N - cxx: g++-14 - bt:: san - bitlinks: static64 + std [11 14 17 20] + : ! { std:: std, cxx: g++-14, bt:: san, bitlinks: static64 } env:: load('share/env.yaml') From a26c7c88aadc930950616c71bf3794e31b6acd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Sun, 5 Jan 2025 13:37:12 -0500 Subject: [PATCH 16/22] Add 'make diff' support with yq to workflow Makefile --- .github/workflows-src/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows-src/Makefile b/.github/workflows-src/Makefile index 9aa709a6c..7f40cbe55 100644 --- a/.github/workflows-src/Makefile +++ b/.github/workflows-src/Makefile @@ -19,6 +19,21 @@ test: force build @git diff --exit-code ../workflows && \ echo -e '\nPASS - No normative changes to .github/workflows' +DIFF_ORIG_COMMIT ?= HEAD +diff: + @for f in $(SOURCE_FILES); do \ + f=$${f##*/}; \ + diff -u --color=auto \ + <(yq -P 'sort_keys(..)' \ + -o=props <(git show $(DIFF_ORIG_COMMIT):.github/workflows/$$f) | \ + grep -Ev '(^$$|^#)' \ + ) \ + <(yq -P 'sort_keys(..)' \ + -o=props ../workflows/$$f | \ + grep -Ev '(^$$|^#)'\ + ); \ + done + force: touch *.yml From 9c1ebfdd2f00fcd919b5920655056d43279923ba Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Mon, 6 Jan 2025 01:27:39 +0000 Subject: [PATCH 17/22] Further trimming of the input workflows Thanks to @ingydotnet! --- .github/workflows-src/benchmarks.yml | 28 +-- .github/workflows-src/clang.yml | 117 ++------- .github/workflows-src/clang_tidy.yml | 25 +- .github/workflows-src/coverage.yml | 16 +- .github/workflows-src/emscripten.yml | 23 +- .github/workflows-src/gcc.yml | 269 +++++---------------- .github/workflows-src/macosx.yml | 25 +- .github/workflows-src/rarearchs.yml | 18 +- .github/workflows-src/release.yml | 82 ++----- .github/workflows-src/samples.yml | 22 +- .github/workflows-src/share/gcc-setup.yaml | 22 -- .github/workflows-src/share/steps.yaml | 39 --- .github/workflows-src/windows.yml | 25 +- .github/workflows-src/ys/common.ys | 111 ++++++++- .github/workflows/clang.yml | 108 +++++---- .github/workflows/clang_tidy.yml | 8 +- .github/workflows/coverage.yml | 2 +- .github/workflows/emscripten.yml | 7 +- .github/workflows/gcc.yml | 202 +++++++++------- .github/workflows/macosx.yml | 11 +- .github/workflows/rarearchs.yml | 30 +-- .github/workflows/release.yml | 9 + .github/workflows/windows.yml | 3 +- 23 files changed, 449 insertions(+), 753 deletions(-) delete mode 100644 .github/workflows-src/share/gcc-setup.yaml delete mode 100644 .github/workflows-src/share/steps.yaml diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows-src/benchmarks.yml index fafdf1973..ca00d8388 100644 --- a/.github/workflows-src/benchmarks.yml +++ b/.github/workflows-src/benchmarks.yml @@ -3,21 +3,11 @@ :: use(common) :: workflow-setup() -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - jobs: gettag: runs-on: ubuntu-latest - steps: - # use fetch-depth to ensure all tags are fetched - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive, fetch-depth: 0} + - :: checkout-action - name: Variables (from tag) if: contains(github.ref, 'tags/v') run:: bash('benchmarks-vars-1') @@ -37,14 +27,8 @@ jobs: benchmarks: name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{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 + :: setup-job('benchmarks') runs-on: ${{matrix.os}} - strategy: fail-fast: false matrix: @@ -62,14 +46,9 @@ jobs: - {std: 17, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} - env:: -{'BM' 'ON'} + load('share/env.yaml') - steps: - # use fetch-depth to ensure all tags are fetched - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive, fetch-depth: 0} + - :: checkout-action - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - name: Download vars.sh @@ -82,7 +61,6 @@ jobs: with: { python-version: '3.10' } - name: install benchmark plotting dependencies run:: bash('benchmarks-install') - - name: shared64-configure------------------------------------------------- run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared64 diff --git a/.github/workflows-src/clang.yml b/.github/workflows-src/clang.yml index a222e3855..c479b8bf0 100644 --- a/.github/workflows-src/clang.yml +++ b/.github/workflows-src/clang.yml @@ -2,23 +2,13 @@ :: use(common) :: workflow-setup() -common-steps =: load('share/steps.yaml') - -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 jobs: #---------------------------------------------------------------------------- clang_canary: - name: clang_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true - if: always() # https://stackoverflow.com/a/62112985/721703 - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - + :: setup-job('clang') + name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + :: runs-on-docker-c4core('22.04') strategy: fail-fast: false matrix: @@ -28,84 +18,44 @@ jobs: item(20 'clang++-17' 'Release') item(11 'clang++-9' 'Debug') item(11 'clang++-9' 'Release') ] - env:: load('share/env.yaml') - - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} - - run: git config --system --add safe.directory '*' - - :: common-steps + steps:: checkout-action-docker + install-cxx + run-steps #---------------------------------------------------------------------------- clang_tabtokens: - name: clang_tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - + :: setup-job('clang') + name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + :: runs-on-docker-c4core('22.04') strategy: fail-fast: false matrix: include: *include1 - env:: load('share/env.yaml') + {'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'} - - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} - # needed for running in the docker image. - # see https://github.com/actions/checkout/issues/1169 - - run: git config --system --add safe.directory '*' - - run: c4core-install $CXX_ - - :: common-steps.drop(1) + steps:: checkout-action-docker + install-cxx + run-steps #---------------------------------------------------------------------------- clang_noexceptions: - name: clang_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - + :: setup-job('clang') + name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + :: runs-on-docker-c4core('22.04') strategy: fail-fast: false matrix: include: *include1 - env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + load('share/env.yaml') - - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} - # needed for running in the docker image. - # see https://github.com/actions/checkout/issues/1169 - - run: git config --system --add safe.directory '*' - - run: c4core-install ${{matrix.cxx}} - - :: common-steps.drop(1) + steps:: checkout-action-docker + install-cxx + run-steps #---------------------------------------------------------------------------- clang_extended: - name: - "clang_extended/${{matrix.cxx}}/\ - c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}" - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest - + :: setup-job('clang') + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/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 "ubuntu$a(%3)"}) + 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') @@ -139,29 +89,14 @@ jobs: - ! item(4.0 'Release' '18.04') - ! item(3.9 'Debug' '18.04') - ! item(3.9 'Release' '18.04') - env:: load('share/env.yaml') - - steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs - # version - #- name: checkout - # uses: actions/checkout@v3 - # with: {submodules: recursive} - #... so we checkout manually: - - name: checkout - run:: bash('clang-checkout') - - run: c4core-install ${{matrix.cxx}} - - :: common-steps.drop(1) + steps:: checkout-manual + install-cxx + run-steps #---------------------------------------------------------------------------- clangsan: - name: clang/${{matrix.bt}}/c++${{matrix.std}} - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - + :: setup-job('clang') + name: san/${{matrix.bt}}/c++${{matrix.std}} + :: runs-on-docker-c4core('22.04') strategy: fail-fast: false matrix: @@ -174,18 +109,8 @@ jobs: cxx: clang++-17 bt:: san bitlinks: static64 - env:: load('share/env.yaml') - - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} - # needed for running in the docker image. - # see https://github.com/actions/checkout/issues/1169 - - run: git config --system --add safe.directory '*' - - run: c4core-install ${{matrix.cxx}} - - :: common-steps.drop(1) + steps:: checkout-action-docker + install-cxx + run-steps # #---------------------------------------------------------------------------- # # https://blog.kitware.com diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows-src/clang_tidy.yml index e59daea65..f1353e3f4 100644 --- a/.github/workflows-src/clang_tidy.yml +++ b/.github/workflows-src/clang_tidy.yml @@ -2,22 +2,12 @@ :: use(common) :: workflow-setup() -common-steps =: load('share/steps.yaml') - -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 jobs: clang_tidy: + :: setup-job('clang_tidy') name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true - if: always() # https://stackoverflow.com/a/62112985/721703 - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - + :: runs-on-docker-c4core('22.04') strategy: fail-fast: false matrix: @@ -31,14 +21,5 @@ jobs: bt:: bt lint: clang-tidy bitlinks:: bl - env:: load('share/env.yaml') - - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} - # needed for running in the docker image. - # see https://github.com/actions/checkout/issues/1169 - - run: git config --system --add safe.directory '*' - - :: common-steps + steps:: checkout-action-docker + install-cxx + run-steps diff --git a/.github/workflows-src/coverage.yml b/.github/workflows-src/coverage.yml index 3e8550715..7bc14efb2 100644 --- a/.github/workflows-src/coverage.yml +++ b/.github/workflows-src/coverage.yml @@ -3,23 +3,11 @@ :: use(common) :: workflow-setup() -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - jobs: coverage: + :: setup-job('coverage') name: coverage/c++${{matrix.std}}${{matrix.cmk}} - 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 runs-on: ${{matrix.os}} - strategy: fail-fast: false matrix: @@ -30,7 +18,6 @@ jobs: # test also with the debug code enabled - ! item(11) + {:cmk '-DRYML_DBG=ON'} - ! item(17) + {:cmk '-DRYML_DBG=ON'} - env: !:merge* - ! load('share/env.yaml') - CMAKE_FLAGS: ${{matrix.cmk}} @@ -107,4 +94,3 @@ jobs: # with: # github-token: ${{ secrets.github_token }} # parallel-finished: true - diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows-src/emscripten.yml index caaf32e31..6bc00d93f 100644 --- a/.github/workflows-src/emscripten.yml +++ b/.github/workflows-src/emscripten.yml @@ -3,28 +3,15 @@ :: use(common) :: workflow-setup() -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: '-DRYML_TEST_SUITE=OFF' - NUM_JOBS_BUILD: # 4 - EMSCRIPTEN_CACHE_FOLDER: 'emsdk-cache' - jobs: emscripten: + name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} + :: setup-job('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: if: ${{ false }} - #if: | - # (!contains(github.event.head_commit.message, 'skip all')) || - # (!contains(github.event.head_commit.message, 'skip emscripten')) || - # contains(github.event.head_commit.message, 'only emscripten') - - name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true runs-on: ${{matrix.os}} - strategy: fail-fast: false matrix: @@ -39,9 +26,8 @@ jobs: - ! item(11 '3.0.0' 'Release') #- ! item(20 '3.0.0' 'Debug') - ! item(20 '3.0.0' 'Release') - - env:: load('share/env.yaml') - + env:: load('share/env.yaml') + {'EMSCRIPTEN_CACHE_FOLDER' 'emsdk-cache'} + + {'CMAKE_FLAGS' '-DRYML_TEST_SUITE=OFF'} steps: - name: checkout uses: actions/checkout@v4 @@ -59,7 +45,6 @@ jobs: actions-cache-folder: ${{env.EMSCRIPTEN_CACHE_FOLDER}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: static32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build diff --git a/.github/workflows-src/gcc.yml b/.github/workflows-src/gcc.yml index 911ac3039..618bfcf00 100644 --- a/.github/workflows-src/gcc.yml +++ b/.github/workflows-src/gcc.yml @@ -2,31 +2,17 @@ :: use(common) :: workflow-setup() -gcc-setup =: load('share/gcc-setup.yaml') -common-steps =: load('share/steps.yaml') - -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 jobs: #---------------------------------------------------------------------------- gcc_canary: - name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true - if: always() # https://stackoverflow.com/a/62112985/721703 - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest - + :: setup-job('gcc') + 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 "ubuntu$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') @@ -36,142 +22,68 @@ jobs: - ! item(11 5 'Release' '18.04') - ! item(11 4.8 'Debug' '18.04') - ! item(11 4.8 'Release' '18.04') - env:: load('share/env.yaml') - - steps:: gcc-setup + common-steps + steps:: checkout-manual + install-cxx + run-steps #---------------------------------------------------------------------------- gcc_O2: # see https://github.com/biojppm/rapidyaml/issues/440 - name: gcc_O2/${{matrix.cxx}}/c++${{matrix.std}} - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - + :: 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: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} - - run: git config --system --add safe.directory '*' + - :: checkout-action-docker - run: c4core-install g++-${{matrix.gcc}} - name: show info run: source .github/setenv.sh && c4_show_info - name: configure run:: bash('gcc-configure') - name: build - run: - cmake --build build_o2 --target ryml-test-build -j --verbose + run: cmake --build build_o2 --target ryml-test-build -j --verbose - name: run - run: - cmake --build build_o2 --target ryml-test-run + run: cmake --build build_o2 --target ryml-test-run #---------------------------------------------------------------------------- gcc_tabtokens: - name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest - + :: setup-job('gcc') + name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false matrix: include: *include1 - env:: load('share/env.yaml') + {'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'} - - steps:: gcc-setup + common-steps + steps:: checkout-manual + install-cxx + run-steps #---------------------------------------------------------------------------- gcc_noexceptions: - name: gcc_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest - + :: setup-job('gcc') + 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 "ubuntu$a(%4)"}) + item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :bitlinks 'shared64 static32', :img "$a(%4)"}) include: - ! item(11 5 'Debug' '18.04') - ! item(11 5 'Release' '18.04') - ! item(20 14 'Debug' '22.04') - ! item(20 14 'Release' '22.04') - env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} + load('share/env.yaml') - - steps: - # cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs - # version - #- name: checkout, uses: actions/checkout@v3 - # with: {submodules: recursive} - #- run: git config --system --add safe.directory '*' - #... so we checkout manually: - - name: checkout - run:: bash('gcc-checkout') - - 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 + steps:: checkout-manual + install-cxx + run-steps #---------------------------------------------------------------------------- gcc_extended: + :: setup-job('gcc') name:: -'gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/' + '${{matrix.bt}}/vg${{matrix.vg}}' - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest - + :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false matrix: @@ -179,51 +91,44 @@ jobs: item =: \({:std 11, :cxx "g++-$a(%1)", :bt %2 :img %3}) include: # VALGRIND - - ! item-vg(11 14 'Debug' 'ubuntu22.04') - - ! item-vg(11 14 'Release' 'ubuntu22.04') - - ! item-vg(14 14 'Debug' 'ubuntu22.04') - - ! item-vg(14 14 'Release' 'ubuntu22.04') - - ! item-vg(17 14 'Debug' 'ubuntu22.04') - - ! item-vg(17 14 'Release' 'ubuntu22.04') - - ! item-vg(20 14 'Debug' 'ubuntu22.04') - - ! item-vg(20 14 'Release' 'ubuntu22.04') - - - ! item(13 'Debug' 'ubuntu22.04') - - ! item(13 'Release' 'ubuntu22.04') - - ! item(13 'Debug' 'ubuntu22.04') # XXX Duplicate? - - ! item(13 'Release' 'ubuntu22.04') # XXX Duplicate? - - ! item(11 'Debug' 'ubuntu22.04') - - ! item(11 'Release' 'ubuntu22.04') - - ! item(10 'Debug' 'ubuntu22.04') - - ! item(10 'Release' 'ubuntu22.04') - - ! item( 9 'Debug' 'ubuntu22.04') - - ! item( 9 'Release' 'ubuntu22.04') - - ! item( 8 'Debug' 'ubuntu18.04') - - ! item( 8 'Release' 'ubuntu18.04') - - ! item( 7 'Debug' 'ubuntu18.04') - - ! item( 7 'Release' 'ubuntu18.04') - - ! item( 6 'Debug' 'ubuntu18.04') - - ! item( 6 'Release' 'ubuntu18.04') - - ! item( 5 'Debug' 'ubuntu18.04') - - ! item( 5 'Release' 'ubuntu18.04') - - ! item(4.9 'Debug' 'ubuntu18.04') - - ! item(4.9 'Release' 'ubuntu18.04') - - ! item(4.8 'Debug' 'ubuntu18.04') - - ! item(4.8 'Release' 'ubuntu18.04') - + - ! 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') env:: load('share/env.yaml') - - steps:: gcc-setup + common-steps + steps:: checkout-manual + install-cxx + run-steps #---------------------------------------------------------------------------- gccsan: - name: - gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} - continue-on-error: true - if: always() - runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu22.04:latest - + :: setup-job('gcc') + name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + :: runs-on-docker-c4core('22.04') strategy: fail-fast: false matrix: @@ -232,61 +137,13 @@ jobs: san qw(asan lsan tsan ubsan) std [11 14 17 20] : ! { std:: std, cxx: g++-14, bt:: san, bitlinks: static64 } - env:: load('share/env.yaml') - - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} - - run: git config --system --add safe.directory '*' - - run: c4core-install ${{matrix.cxx}} - - name: show info - run: source .github/setenv.sh && c4_show_info - - - name: shared64-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared64 - - name: shared64-build - run: source .github/setenv.sh && c4_build_test shared64 - - name: shared64-run - run: source .github/setenv.sh && c4_run_test shared64 - - name: shared64-pack - run: source .github/setenv.sh && c4_package shared64 - - - name: static64-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static64 - - name: static64-build - run: source .github/setenv.sh && c4_build_test static64 - - name: static64-run - run: source .github/setenv.sh && c4_run_test static64 - - name: static64-pack - run: source .github/setenv.sh && c4_package static64 - - - name: static32-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test static32 - - name: static32-build - run: source .github/setenv.sh && c4_build_test static32 - - name: static32-run - run: source .github/setenv.sh && c4_run_test static32 - - name: static32-pack - run: source .github/setenv.sh && c4_package static32 - - - name: shared32-configure------------------------------------------------- - run: source .github/setenv.sh && c4_cfg_test shared32 - - name: shared32-build - run: source .github/setenv.sh && c4_build_test shared32 - - name: shared32-run - run: source .github/setenv.sh && c4_run_test shared32 - - name: shared32-pack - run: source .github/setenv.sh && c4_package shared32 + steps:: checkout-action-docker + install-cxx + run-steps #---------------------------------------------------------------------------- arm: - continue-on-error: true - if: always() + :: setup-job('gcc') + runs-on-docker-c4core('18.04') runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/ubuntu18.04:latest - strategy: fail-fast: false matrix: @@ -303,17 +160,9 @@ jobs: - ! item(14 'Release') - ! item(17 'Debug') - ! item(17 'Release') - env:: -{'TOOLCHAIN' '${{matrix.toolchain}}'} + load('share/env.yaml') - steps: - # version - #- name: checkout - # uses: actions/checkout@v3 - # with: {submodules: recursive} - #- run: git config --system --add safe.directory '*' - - name: checkout - run:: bash('gcc-checkout') + - :: checkout-manual - name: install gcc-arm-linux-gnueabihf run: c4core-install arm-linux-gnueabihf; diff --git a/.github/workflows-src/macosx.yml b/.github/workflows-src/macosx.yml index 8cb90c18c..595cb805c 100644 --- a/.github/workflows-src/macosx.yml +++ b/.github/workflows-src/macosx.yml @@ -2,23 +2,11 @@ :: use(common) :: workflow-setup() -common-steps =: load('share/steps.yaml') - -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 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 - runs-on: ${{matrix.os}} - + :: setup-job('macosx') + runs-on: macos-13 strategy: fail-fast: false matrix: @@ -32,19 +20,14 @@ jobs: cxx: xcode xcver:: xcver bt:: bt - os: macos-13 bitlinks: shared64 static64 - env:: load('share/env.yaml') - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} + - :: checkout-action - name: xcode uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: ${{matrix.xcver}} - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - - :: common-steps.drop(1) + - :: run-steps diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows-src/rarearchs.yml index df73ab383..e67e82518 100644 --- a/.github/workflows-src/rarearchs.yml +++ b/.github/workflows-src/rarearchs.yml @@ -5,15 +5,9 @@ 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') - + :: setup-job('rarearchs') name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} - continue-on-error: true runs-on: ubuntu-22.04 - strategy: fail-fast: false matrix: @@ -26,16 +20,12 @@ jobs: std:: std bt:: bt arch:: arch - distro: ubuntu20.04 - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} + - :: checkout-action - name: test - uses: uraimo/run-on-arch-action@v2.7.2 + uses: uraimo/run-on-arch-action@v2.8.1 with: arch: ${{matrix.arch}} - distro: ${{matrix.distro}} + distro: ubuntu22.04 install:: bash('rarearchs-test-install') run:: bash('rarearchs-test-run') diff --git a/.github/workflows-src/release.yml b/.github/workflows-src/release.yml index 08a160fb6..d07c6255f 100644 --- a/.github/workflows-src/release.yml +++ b/.github/workflows-src/release.yml @@ -24,18 +24,11 @@ env: 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') - + :: setup-job('release') + continue-on-error: false runs-on: ubuntu-latest - steps: - # use fetch-depth to ensure all tags are fetched - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive, fetch-depth: 0} + - :: checkout-action - name: Variables (from tag) if: contains(github.ref, 'tags/v') run:: bash('release-vars-1') @@ -51,18 +44,12 @@ jobs: #---------------------------------------------------------------------------- # create source packages 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') - + :: setup-job('release') + continue-on-error: false needs: gettag runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} + - :: checkout-action - name: Download vars.sh uses: actions/download-artifact@v3 with: {name: vars.sh, path: ./} @@ -81,22 +68,17 @@ jobs: #---------------------------------------------------------------------------- # create c++ packages 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') - + :: setup-job('release') + continue-on-error: false name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} needs: gettag runs-on: ${{matrix.config.os}} - env: DEV: OFF BT: Release OS: ${{matrix.config.os}} CXX_: ${{matrix.config.cxx}} GEN: ${{matrix.config.gen}} - strategy: fail-fast: false matrix: @@ -123,11 +105,8 @@ jobs: sfxg: apple64.sh, sfxp: macosx-xcode.sh, gen: STGZ, mime: x-sh, os: macos-13, cxx: xcode} - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} + - :: checkout-action - name: Download vars.sh uses: actions/download-artifact@v3 with: {name: vars.sh, path: ./} @@ -153,19 +132,12 @@ jobs: # github.com/pikepdf/pikepdf/blob/master/.github/workflows/build_wheels.yml 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') - + :: setup-job('release') + continue-on-error: false name: python/src runs-on: ubuntu-latest - steps: - # use fetch-depth to ensure all tags are fetched - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive, fetch-depth: 0} + - :: checkout-action - name: install python 3.9 uses: actions/setup-python@v5 with: {python-version: 3.9} @@ -178,16 +150,12 @@ jobs: with: {name: dist, path: dist} python_wheels: - if: | - (!contains(github.event.head_commit.message, 'skip all')) || - (!contains(github.event.head_commit.message, 'skip release')) || - contains(github.event.head_commit.message, 'only release') - + :: setup-job('release') + continue-on-error: false name:: -'python/${{matrix.config.cibw_pyv}}/' + '${{matrix.config.osname}}/${{matrix.config.cibw_arch}}' runs-on: ${{matrix.config.os}} - env: CMAKE_FLAGS: ${{matrix.config.cmakeflags}} -DRYML_DEV=OFF -DRYML_BUILD_API=ON @@ -195,7 +163,6 @@ jobs: CIBW_BUILD: cp${{matrix.config.cibw_pyv}}-${{matrix.config.cibw_platform}} CIBW_ARCHS: ${{matrix.config.cibw_arch}} - strategy: fail-fast: false matrix: @@ -225,7 +192,6 @@ jobs: - ! python('3.7' 37 'i686' 'manylinux_i686') - ! python('3.6' 36 'x86_64' 'manylinux_x86_64') - ! python('3.6' 36 'i686' 'manylinux_i686') - # the windows builds are disabled because they are causing problems and # preventing the release. # the problems are related to CMakeExtension forcing the use of Ninja @@ -294,12 +260,8 @@ jobs: # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} #- {pythonv: '3.6' , cibw_pyv: 36 , cibw_arch: x86_64, # cibw_platform: macosx_x86_64, osname: macos, os: macos-10.15} - steps: - # use fetch-depth to ensure all tags are fetched - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive, fetch-depth: 0} + - :: checkout-action - name: create wheel uses: pypa/cibuildwheel@v2.17 - name: rename wheelhouse -> dist @@ -319,21 +281,16 @@ jobs: #---------------------------------------------------------------------------- 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') + :: setup-job('release') + continue-on-error: false runs-on: ubuntu-latest needs: - src - cpp - python_src - python_wheels - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} + - :: checkout-action - name: Gather artifacts - ./assets uses: actions/download-artifact@v3 with: {name: assets, path: assets} @@ -344,7 +301,6 @@ jobs: run: ls -lFhp assets/; ls -lFhp dist/ - # Github - name: Restore vars.sh if: contains(github.ref, 'tags/v') @@ -377,7 +333,6 @@ jobs: with: release_id: ${{steps.create_release.outputs.id}} assets_path: ./assets/ - # PyPI (test) - name: Publish python packages to test PyPI uses: pypa/gh-action-pypi-publish@v1.4.2 @@ -387,7 +342,6 @@ jobs: password: ${{secrets.PYPI_TOKEN_TEST}} verbose: true skip_existing: true - # PyPI (production) - name: Publish python packages to production PyPI if: contains(github.ref, 'tags/v') diff --git a/.github/workflows-src/samples.yml b/.github/workflows-src/samples.yml index 4b4a69fc1..6a2fa7fc8 100644 --- a/.github/workflows-src/samples.yml +++ b/.github/workflows-src/samples.yml @@ -3,22 +3,10 @@ :: use(common) :: workflow-setup() -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 - 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 + :: setup-job('samples') runs-on: ${{matrix.os}} - strategy: fail-fast: false matrix: @@ -29,17 +17,12 @@ jobs: - {bt: Release, os: windows-2019} - {bt: Debug , os: macos-latest} - {bt: Release, os: macos-latest} - env: !:merge* - ! load('share/env.yaml') - CMANY: ON RYMLSHA: ${{github.event.pull_request.head.sha}} - steps: - - name: checkout - uses: actions/checkout@v4 - # use fetch-depth to ensure all tags are fetched - with: {submodules: recursive, fetch-depth: 0} + - :: checkout-action - name: python3 uses: actions/setup-python@v5 with: {python-version: 3.9} @@ -47,7 +30,6 @@ jobs: run: source .github/reqs.sh && c4_install_test_requirements $OS - name: show info run: source .github/setenv.sh && c4_show_info - - name: singleheader run: cd samples/singleheader && ./run.sh $BT - name: singleheaderlib-static diff --git a/.github/workflows-src/share/gcc-setup.yaml b/.github/workflows-src/share/gcc-setup.yaml deleted file mode 100644 index b0e313cbe..000000000 --- a/.github/workflows-src/share/gcc-setup.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs -# version. -#- name: checkout -# uses: actions/checkout@v3 -# with: {submodules: recursive} -# Needed for running in the docker image. -# See https://github.com/actions/checkout/issues/1169 -#- run: git config --system --add safe.directory '*' -#... so we checkout manually: -- name: checkout - run: | - set -x - echo GITHUB_REF=$GITHUB_REF - echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 - echo branch=$branch - git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - git fetch origin $branch - git reset --hard FETCH_HEAD - git submodule update --init --recursive diff --git a/.github/workflows-src/share/steps.yaml b/.github/workflows-src/share/steps.yaml deleted file mode 100644 index 216967d0a..000000000 --- a/.github/workflows-src/share/steps.yaml +++ /dev/null @@ -1,39 +0,0 @@ -- 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 diff --git a/.github/workflows-src/windows.yml b/.github/workflows-src/windows.yml index 99a35912e..34f9de5d4 100644 --- a/.github/workflows-src/windows.yml +++ b/.github/workflows-src/windows.yml @@ -2,25 +2,12 @@ :: use(common) :: workflow-setup() -common-steps =: load('share/steps.yaml') - -env: - PROJ_PFX_TARGET: ryml- - PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=ON - NUM_JOBS_BUILD: # 4 jobs: vs: + :: setup-job('windows') name: ${{matrix.cxx}}/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: @@ -32,28 +19,22 @@ jobs: #- ! 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: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} + - :: checkout-action - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - - :: common-steps.drop(1) + - :: run-steps # TODO: # mingw: diff --git a/.github/workflows-src/ys/common.ys b/.github/workflows-src/ys/common.ys index e48d34eb8..e45b865bb 100644 --- a/.github/workflows-src/ys/common.ys +++ b/.github/workflows-src/ys/common.ys @@ -1,15 +1,15 @@ !yamlscript/v0 + +#---------------------------------------------------------- defn workflow-setup(name=nil overrides={}):: name =: name || FILE.replace(/.*\//).replace(/\.yml$/) - 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 shell: bash -e -x {0} - on:: merge _ overrides:: # https://github.com/orgs/community/discussions/26276 @@ -18,6 +18,113 @@ defn workflow-setup(name=nil overrides={}):: branches: [master] pull_request: branches: [master] + env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + +#---------------------------------------------------------- defn bash(name): slurp: "bash/$name.bash" + + +#---------------------------------------------------------- +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 runs-on-docker-c4core(which):: + runs-on: ubuntu-latest + container:: "ghcr.io/biojppm/c4core/ubuntu$which:latest" + + +#---------------------------------------------------------- +checkout-action =:: +- name: checkout + uses: actions/checkout@v4 + # use fetch-depth to ensure all tags are fetched + with: {submodules: recursive, fetch-depth: 0} + + +#---------------------------------------------------------- +checkout-action-docker =:: +- name: checkout + uses: actions/checkout@v4 + # use fetch-depth to ensure all tags are fetched + with: {submodules: recursive, fetch-depth: 0} +# needed for running in the docker image. +# see https://github.com/actions/checkout/issues/1169 +- run: git config --system --add safe.directory '*' + + +#---------------------------------------------------------- +checkout-manual =:: +# This provides a manual checkout because the nodejs version +# prevents use of checkout@v3 or v4 action on ubuntu18.04. +- name: checkout + run: | + set -xe + env + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY + echo GITHUB_REF=$GITHUB_REF + echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + echo branch=$branch + git init -q . + git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch origin $branch + git reset --hard FETCH_HEAD + git submodule update --init --recursive + + +#---------------------------------------------------------- +install-cxx =:: +- run: c4core-install ${{matrix.cxx}} + + +#---------------------------------------------------------- +run-steps =:: +- 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 diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 01ba6636a..9abe472e9 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -19,9 +19,12 @@ env: NUM_JOBS_BUILD: null jobs: clang_canary: - name: clang_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + 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() + name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -58,6 +61,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - name: show info @@ -95,9 +99,12 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 clang_tabtokens: - name: clang_tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + 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() + name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -135,8 +142,9 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - run: git config --system --add safe.directory '*' - - run: c4core-install $CXX_ + - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info - name: shared64-configure--------------------------------------------------- @@ -172,9 +180,12 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 clang_noexceptions: - name: clang_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + 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() + name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -212,6 +223,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - name: show info @@ -249,11 +261,14 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 clang_extended: - name: clang_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + 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() + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: fail-fast: false matrix: @@ -262,152 +277,152 @@ jobs: cxx: clang++-17 bt: Debug vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-17 bt: Release vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-16 bt: Debug vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-16 bt: Release vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-15 bt: Debug vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-15 bt: Release vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-14 bt: Debug vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-14 bt: Release vg: 'on' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: clang++-13 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-13 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-12 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-12 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-11 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-11 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-10 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-10 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-9 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-9 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-8 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-8 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-7 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-7 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-6.0 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-6.0 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-5.0 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-5.0 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-4.0 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-4.0 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-3.9 bt: Debug vg: 'on' - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: clang++-3.9 bt: Release vg: 'on' - img: ubuntu18.04 + img: '18.04' env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -420,7 +435,10 @@ jobs: steps: - name: checkout run: | - set -x + set -xe + env + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 @@ -467,9 +485,12 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 clangsan: - name: clang/${{matrix.bt}}/c++${{matrix.std}} + 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() + name: san/${{matrix.bt}}/c++${{matrix.std}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -554,6 +575,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - name: show info diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index 0a6b1da44..650084a09 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -19,9 +19,12 @@ env: NUM_JOBS_BUILD: null jobs: clang_tidy: - name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} + 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() + name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -82,6 +85,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - name: show info diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 0c675f8fc..52e8c9b59 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -19,12 +19,12 @@ env: NUM_JOBS_BUILD: null jobs: coverage: - name: coverage/c++${{matrix.std}}${{matrix.cmk}} 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 + name: coverage/c++${{matrix.std}}${{matrix.cmk}} runs-on: ${{matrix.os}} strategy: fail-fast: false diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 507e8f0e3..d9fe0d2c8 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -15,13 +15,12 @@ defaults: env: PROJ_PFX_TARGET: ryml- PROJ_PFX_CMAKE: RYML_ - CMAKE_FLAGS: -DRYML_TEST_SUITE=OFF + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON NUM_JOBS_BUILD: null - EMSCRIPTEN_CACHE_FOLDER: emsdk-cache jobs: emscripten: - if: ${{ false }} name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}} + if: ${{ false }} continue-on-error: true runs-on: ${{matrix.os}} strategy: @@ -61,6 +60,8 @@ jobs: SAN: ${{matrix.san}} LINT: ${{matrix.lint}} OS: ${{matrix.os}} + EMSCRIPTEN_CACHE_FOLDER: emsdk-cache + CMAKE_FLAGS: -DRYML_TEST_SUITE=OFF steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 972c05ebd..eb98ec263 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -19,11 +19,14 @@ env: NUM_JOBS_BUILD: null jobs: gcc_canary: - name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + 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() + name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: fail-fast: false matrix: @@ -32,42 +35,42 @@ jobs: cxx: g++-14 bt: Debug bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-14 bt: Release bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 20 cxx: g++-14 bt: Debug bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 20 cxx: g++-14 bt: Release bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-5 bt: Debug bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-5 bt: Release bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.8 bt: Debug bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.8 bt: Release bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -80,7 +83,10 @@ jobs: steps: - name: checkout run: | - set -x + set -xe + env + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 @@ -127,9 +133,12 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 gcc_O2: - name: gcc_O2/${{matrix.cxx}}/c++${{matrix.std}} + 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() + name: gcc_O2/${{matrix.gcc}}/c++${{matrix.std}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -153,6 +162,7 @@ jobs: 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 @@ -170,11 +180,14 @@ jobs: - name: run run: cmake --build build_o2 --target ryml-test-run gcc_tabtokens: - name: gcc_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + 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() + name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: fail-fast: false matrix: @@ -183,42 +196,42 @@ jobs: cxx: g++-14 bt: Debug bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-14 bt: Release bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 20 cxx: g++-14 bt: Debug bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 20 cxx: g++-14 bt: Release bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-5 bt: Debug bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-5 bt: Release bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.8 bt: Debug bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.8 bt: Release bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -232,7 +245,10 @@ jobs: steps: - name: checkout run: | - set -x + set -xe + env + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 @@ -279,11 +295,14 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 gcc_noexceptions: - name: gcc_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} + 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() + name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: fail-fast: false matrix: @@ -292,22 +311,22 @@ jobs: cxx: g++-5 bt: Debug bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-5 bt: Release bitlinks: shared64 static32 - img: ubuntu18.04 + img: '18.04' - std: 20 cxx: g++-14 bt: Debug bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' - std: 20 cxx: g++-14 bt: Release bitlinks: shared64 static32 - img: ubuntu22.04 + img: '22.04' env: CXXFLAGS: -fno-exceptions -fno-rtti STD: ${{matrix.std}} @@ -321,7 +340,10 @@ jobs: steps: - name: checkout run: | - set -x + set -xe + env + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 @@ -335,7 +357,7 @@ jobs: - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: shared64-configure------------------------------------------------- + - name: shared64-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared64 - name: shared64-build run: source .github/setenv.sh && c4_build_test shared64 @@ -343,7 +365,7 @@ jobs: run: source .github/setenv.sh && c4_run_test shared64 - name: shared64-pack run: source .github/setenv.sh && c4_package shared64 - - name: static64-configure------------------------------------------------- + - name: static64-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static64 - name: static64-build run: source .github/setenv.sh && c4_build_test static64 @@ -351,7 +373,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static64 - name: static64-pack run: source .github/setenv.sh && c4_package static64 - - name: static32-configure------------------------------------------------- + - name: static32-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build run: source .github/setenv.sh && c4_build_test static32 @@ -359,7 +381,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static32 - name: static32-pack run: source .github/setenv.sh && c4_package static32 - - name: shared32-configure------------------------------------------------- + - name: shared32-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared32 - name: shared32-build run: source .github/setenv.sh && c4_build_test shared32 @@ -368,11 +390,14 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 gcc_extended: - name: gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + 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() + name: gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} runs-on: ubuntu-latest - container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest + container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: fail-fast: false matrix: @@ -381,130 +406,130 @@ jobs: cxx: g++-14 bt: Debug vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-14 bt: Release vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 14 cxx: g++-14 bt: Debug vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 14 cxx: g++-14 bt: Release vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 17 cxx: g++-14 bt: Debug vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 17 cxx: g++-14 bt: Release vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 20 cxx: g++-14 bt: Debug vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 20 cxx: g++-14 bt: Release vg: 'ON' - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-13 bt: Debug - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-13 bt: Release - img: ubuntu22.04 + img: '22.04' - std: 11 - cxx: g++-13 + cxx: g++-12 bt: Debug - img: ubuntu22.04 + img: '22.04' - std: 11 - cxx: g++-13 + cxx: g++-12 bt: Release - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-11 bt: Debug - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-11 bt: Release - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-10 bt: Debug - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-10 bt: Release - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-9 bt: Debug - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-9 bt: Release - img: ubuntu22.04 + img: '22.04' - std: 11 cxx: g++-8 bt: Debug - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-8 bt: Release - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-7 bt: Debug - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-7 bt: Release - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-6 bt: Debug - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-6 bt: Release - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-5 bt: Debug - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-5 bt: Release - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.9 bt: Debug - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.9 bt: Release - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.8 bt: Debug - img: ubuntu18.04 + img: '18.04' - std: 11 cxx: g++-4.8 bt: Release - img: ubuntu18.04 + img: '18.04' env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -517,7 +542,10 @@ jobs: steps: - name: checkout run: | - set -x + set -xe + env + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 @@ -564,9 +592,12 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 gccsan: - name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + 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() + name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -651,11 +682,12 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - run: git config --system --add safe.directory '*' - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info - - name: shared64-configure------------------------------------------------- + - name: shared64-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared64 - name: shared64-build run: source .github/setenv.sh && c4_build_test shared64 @@ -663,7 +695,7 @@ jobs: run: source .github/setenv.sh && c4_run_test shared64 - name: shared64-pack run: source .github/setenv.sh && c4_package shared64 - - name: static64-configure------------------------------------------------- + - name: static64-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static64 - name: static64-build run: source .github/setenv.sh && c4_build_test static64 @@ -671,7 +703,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static64 - name: static64-pack run: source .github/setenv.sh && c4_package static64 - - name: static32-configure------------------------------------------------- + - name: static32-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build run: source .github/setenv.sh && c4_build_test static32 @@ -679,7 +711,7 @@ jobs: run: source .github/setenv.sh && c4_run_test static32 - name: static32-pack run: source .github/setenv.sh && c4_package static32 - - name: shared32-configure------------------------------------------------- + - name: shared32-configure--------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test shared32 - name: shared32-build run: source .github/setenv.sh && c4_build_test shared32 @@ -688,8 +720,11 @@ jobs: - name: shared32-pack run: source .github/setenv.sh && c4_package shared32 arm: + if: | + (!contains(github.event.head_commit.message, 'skip all')) || + (!contains(github.event.head_commit.message, 'skip gcc')) || + contains(github.event.head_commit.message, 'only gcc') continue-on-error: true - if: always() runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu18.04:latest strategy: @@ -739,7 +774,10 @@ jobs: steps: - name: checkout run: | - set -x + set -xe + env + echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL + echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml index 599cc6057..5fcd26a51 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/macosx.yml @@ -24,7 +24,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip macosx')) || contains(github.event.head_commit.message, 'only macosx') continue-on-error: true - runs-on: ${{matrix.os}} + runs-on: macos-13 strategy: fail-fast: false matrix: @@ -33,49 +33,41 @@ jobs: cxx: xcode xcver: 15 bt: Debug - os: macos-13 bitlinks: shared64 static64 - std: 11 cxx: xcode xcver: 15 bt: Release - os: macos-13 bitlinks: shared64 static64 - std: 17 cxx: xcode xcver: 15 bt: Debug - os: macos-13 bitlinks: shared64 static64 - std: 17 cxx: xcode xcver: 15 bt: Release - os: macos-13 bitlinks: shared64 static64 - std: 11 cxx: xcode xcver: 14 bt: Debug - os: macos-13 bitlinks: shared64 static64 - std: 11 cxx: xcode xcver: 14 bt: Release - os: macos-13 bitlinks: shared64 static64 - std: 17 cxx: xcode xcver: 14 bt: Debug - os: macos-13 bitlinks: shared64 static64 - std: 17 cxx: xcode xcver: 14 bt: Release - os: macos-13 bitlinks: shared64 static64 env: STD: ${{matrix.std}} @@ -91,6 +83,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: xcode uses: maxim-lobanov/setup-xcode@v1 with: diff --git a/.github/workflows/rarearchs.yml b/.github/workflows/rarearchs.yml index 29ed7b3b8..0873645f4 100644 --- a/.github/workflows/rarearchs.yml +++ b/.github/workflows/rarearchs.yml @@ -12,14 +12,19 @@ defaults: pull_request: branches: - master +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + 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') - name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} continue-on-error: true + name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -28,85 +33,68 @@ jobs: - std: 11 bt: Debug arch: aarch64 - distro: ubuntu20.04 - std: 11 bt: Release arch: aarch64 - distro: ubuntu20.04 - std: 14 bt: Debug arch: aarch64 - distro: ubuntu20.04 - std: 14 bt: Release arch: aarch64 - distro: ubuntu20.04 - std: 17 bt: Debug arch: aarch64 - distro: ubuntu20.04 - std: 17 bt: Release arch: aarch64 - distro: ubuntu20.04 - std: 11 bt: Debug arch: ppc64le - distro: ubuntu20.04 - std: 11 bt: Release arch: ppc64le - distro: ubuntu20.04 - std: 14 bt: Debug arch: ppc64le - distro: ubuntu20.04 - std: 14 bt: Release arch: ppc64le - distro: ubuntu20.04 - std: 17 bt: Debug arch: ppc64le - distro: ubuntu20.04 - std: 17 bt: Release arch: ppc64le - distro: ubuntu20.04 - std: 11 bt: Debug arch: s390x - distro: ubuntu20.04 - std: 11 bt: Release arch: s390x - distro: ubuntu20.04 - std: 14 bt: Debug arch: s390x - distro: ubuntu20.04 - std: 14 bt: Release arch: s390x - distro: ubuntu20.04 - std: 17 bt: Debug arch: s390x - distro: ubuntu20.04 - std: 17 bt: Release arch: s390x - distro: ubuntu20.04 steps: - name: checkout uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: test - uses: uraimo/run-on-arch-action@v2.7.2 + uses: uraimo/run-on-arch-action@v2.8.1 with: arch: ${{matrix.arch}} - distro: ${{matrix.distro}} + distro: ubuntu22.04 install: | set -x start_time=$SECONDS diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a56ba9ede..112fa6a62 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + continue-on-error: false runs-on: ubuntu-latest steps: - name: checkout @@ -73,6 +74,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + continue-on-error: false needs: gettag runs-on: ubuntu-latest steps: @@ -80,6 +82,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: Download vars.sh uses: actions/download-artifact@v3 with: @@ -115,6 +118,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + continue-on-error: false name: cpp/${{matrix.config.os}}/${{matrix.config.gen}} needs: gettag runs-on: ${{matrix.config.os}} @@ -159,6 +163,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: Download vars.sh uses: actions/download-artifact@v3 with: @@ -193,6 +198,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + continue-on-error: false name: python/src runs-on: ubuntu-latest steps: @@ -226,6 +232,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + continue-on-error: false name: python/${{matrix.config.cibw_pyv}}/${{matrix.config.osname}}/${{matrix.config.cibw_arch}} runs-on: ${{matrix.config.os}} env: @@ -366,6 +373,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip all')) || (!contains(github.event.head_commit.message, 'skip release')) || contains(github.event.head_commit.message, 'only release') + continue-on-error: false runs-on: ubuntu-latest needs: - src @@ -377,6 +385,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: Gather artifacts - ./assets uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d10b7d529..c58f62089 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -19,12 +19,12 @@ env: NUM_JOBS_BUILD: null jobs: vs: - name: ${{matrix.cxx}}/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 + name: ${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}} runs-on: ${{matrix.os}} strategy: fail-fast: false @@ -94,6 +94,7 @@ jobs: 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 From 542e352fcc9bb7b7f0a0f85968bc3e2b7e45a8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Mon, 6 Jan 2025 10:22:01 -0500 Subject: [PATCH 18/22] Rename workflow src files to `.github/workflows/*.ys` --- .github/workflows-src/README.md | 23 ---------------- .../{benchmarks.yml => .benchmarks.yml} | 2 +- .github/workflows/{clang.yml => .clang.yml} | 2 +- .../{clang_tidy.yml => .clang_tidy.yml} | 2 +- .github/workflows/{codeql.yml => .codeql.yml} | 2 +- .../workflows/{coverage.yml => .coverage.yml} | 2 +- .../{emscripten.yml => .emscripten.yml} | 2 +- .github/workflows/{gcc.yml => .gcc.yml} | 2 +- .../workflows/{install.yml => .install.yml} | 2 +- .github/workflows/{macosx.yml => .macosx.yml} | 2 +- .../{rarearchs.yml => .rarearchs.yml} | 2 +- .../workflows/{release.yml => .release.yml} | 2 +- .../workflows/{samples.yml => .samples.yml} | 2 +- .../workflows/{windows.yml => .windows.yml} | 2 +- .github/{workflows-src => workflows}/Makefile | 26 +++++++++++-------- .github/workflows/README.md | 25 ++++++++++++++++++ .../bash/benchmarks-install.bash | 0 .../bash/benchmarks-run.bash | 0 .../bash/benchmarks-vars-1.bash | 0 .../bash/benchmarks-vars-2.bash | 0 .../bash/clang-checkout.bash | 0 .../bash/gcc-checkout.bash | 0 .../bash/gcc-configure.bash | 0 .../bash/install-configure.bash | 0 .../bash/install-preinstall.bash | 0 .../bash/rarearchs-test-install.bash | 0 .../bash/rarearchs-test-run.bash | 0 .../bash/release-create-source-packages.bash | 0 .../bash/release-normalize.bash | 0 .../bash/release-package-python.bash | 0 .../bash/release-save-vars.bash | 0 .../bash/release-shared-normalize.bash | 0 .../bash/release-test-with-python.bash | 0 .../bash/release-vars-1.bash | 0 .../bash/release-vars-2.bash | 0 .../benchmarks.ys} | 0 .../clang.yml => workflows/clang.ys} | 0 .../clang_tidy.ys} | 0 .../codeql.yml => workflows/codeql.ys} | 0 .../coverage.yml => workflows/coverage.ys} | 0 .../emscripten.ys} | 0 .../gcc.yml => workflows/gcc.ys} | 0 .../install.yml => workflows/install.ys} | 0 .../macosx.yml => workflows/macosx.ys} | 0 .../rarearchs.yml => workflows/rarearchs.ys} | 0 .../release.yml => workflows/release.ys} | 0 .../samples.yml => workflows/samples.ys} | 0 .../share/env.yaml | 0 .../windows.yml => workflows/windows.ys} | 0 .../{workflows-src => workflows}/ys/common.ys | 2 +- 50 files changed, 54 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows-src/README.md rename .github/workflows/{benchmarks.yml => .benchmarks.yml} (99%) rename .github/workflows/{clang.yml => .clang.yml} (99%) rename .github/workflows/{clang_tidy.yml => .clang_tidy.yml} (98%) rename .github/workflows/{codeql.yml => .codeql.yml} (93%) rename .github/workflows/{coverage.yml => .coverage.yml} (97%) rename .github/workflows/{emscripten.yml => .emscripten.yml} (97%) rename .github/workflows/{gcc.yml => .gcc.yml} (99%) rename .github/workflows/{install.yml => .install.yml} (99%) rename .github/workflows/{macosx.yml => .macosx.yml} (98%) rename .github/workflows/{rarearchs.yml => .rarearchs.yml} (98%) rename .github/workflows/{release.yml => .release.yml} (99%) rename .github/workflows/{samples.yml => .samples.yml} (97%) rename .github/workflows/{windows.yml => .windows.yml} (98%) rename .github/{workflows-src => workflows}/Makefile (57%) create mode 100644 .github/workflows/README.md rename .github/{workflows-src => workflows}/bash/benchmarks-install.bash (100%) rename .github/{workflows-src => workflows}/bash/benchmarks-run.bash (100%) rename .github/{workflows-src => workflows}/bash/benchmarks-vars-1.bash (100%) rename .github/{workflows-src => workflows}/bash/benchmarks-vars-2.bash (100%) rename .github/{workflows-src => workflows}/bash/clang-checkout.bash (100%) rename .github/{workflows-src => workflows}/bash/gcc-checkout.bash (100%) rename .github/{workflows-src => workflows}/bash/gcc-configure.bash (100%) rename .github/{workflows-src => workflows}/bash/install-configure.bash (100%) rename .github/{workflows-src => workflows}/bash/install-preinstall.bash (100%) rename .github/{workflows-src => workflows}/bash/rarearchs-test-install.bash (100%) rename .github/{workflows-src => workflows}/bash/rarearchs-test-run.bash (100%) rename .github/{workflows-src => workflows}/bash/release-create-source-packages.bash (100%) rename .github/{workflows-src => workflows}/bash/release-normalize.bash (100%) rename .github/{workflows-src => workflows}/bash/release-package-python.bash (100%) rename .github/{workflows-src => workflows}/bash/release-save-vars.bash (100%) rename .github/{workflows-src => workflows}/bash/release-shared-normalize.bash (100%) rename .github/{workflows-src => workflows}/bash/release-test-with-python.bash (100%) rename .github/{workflows-src => workflows}/bash/release-vars-1.bash (100%) rename .github/{workflows-src => workflows}/bash/release-vars-2.bash (100%) rename .github/{workflows-src/benchmarks.yml => workflows/benchmarks.ys} (100%) rename .github/{workflows-src/clang.yml => workflows/clang.ys} (100%) rename .github/{workflows-src/clang_tidy.yml => workflows/clang_tidy.ys} (100%) rename .github/{workflows-src/codeql.yml => workflows/codeql.ys} (100%) rename .github/{workflows-src/coverage.yml => workflows/coverage.ys} (100%) rename .github/{workflows-src/emscripten.yml => workflows/emscripten.ys} (100%) rename .github/{workflows-src/gcc.yml => workflows/gcc.ys} (100%) rename .github/{workflows-src/install.yml => workflows/install.ys} (100%) rename .github/{workflows-src/macosx.yml => workflows/macosx.ys} (100%) rename .github/{workflows-src/rarearchs.yml => workflows/rarearchs.ys} (100%) rename .github/{workflows-src/release.yml => workflows/release.ys} (100%) rename .github/{workflows-src/samples.yml => workflows/samples.ys} (100%) rename .github/{workflows-src => workflows}/share/env.yaml (100%) rename .github/{workflows-src/windows.yml => workflows/windows.ys} (100%) rename .github/{workflows-src => workflows}/ys/common.ys (98%) diff --git a/.github/workflows-src/README.md b/.github/workflows-src/README.md deleted file mode 100644 index 862aead87..000000000 --- a/.github/workflows-src/README.md +++ /dev/null @@ -1,23 +0,0 @@ -.github/workflows -================= - -Source files for generating `.github/workflows/*.yml` files. - - -## Synopsis - -```bash -$ make build -$ make test -``` - - -## Description - -Edit files in this directory and run `make build` to generate the files used by -GitHub Actions (the files in `.github/workflows/`). - -Running `make test` runs `make build` and shows the diff in the -`.github/workflows/` directory. -If you are only refactoring the source files, you should see no diff when you -run this. diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/.benchmarks.yml similarity index 99% rename from .github/workflows/benchmarks.yml rename to .github/workflows/.benchmarks.yml index 82e6c10d5..f46f4d42c 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/.benchmarks.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/benchmarks.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/benchmarks.ys name: benchmarks defaults: diff --git a/.github/workflows/clang.yml b/.github/workflows/.clang.yml similarity index 99% rename from .github/workflows/clang.yml rename to .github/workflows/.clang.yml index 9abe472e9..7148977ab 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/.clang.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/clang.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/clang.ys name: clang defaults: diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/.clang_tidy.yml similarity index 98% rename from .github/workflows/clang_tidy.yml rename to .github/workflows/.clang_tidy.yml index 650084a09..360f48da1 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/.clang_tidy.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/clang_tidy.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/clang_tidy.ys name: clang_tidy defaults: diff --git a/.github/workflows/codeql.yml b/.github/workflows/.codeql.yml similarity index 93% rename from .github/workflows/codeql.yml rename to .github/workflows/.codeql.yml index 1f56aae31..099cb62e3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/.codeql.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/codeql.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/codeql.ys name: CodeQL 'on': diff --git a/.github/workflows/coverage.yml b/.github/workflows/.coverage.yml similarity index 97% rename from .github/workflows/coverage.yml rename to .github/workflows/.coverage.yml index 52e8c9b59..b742db026 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/.coverage.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/coverage.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/coverage.ys name: coverage defaults: diff --git a/.github/workflows/emscripten.yml b/.github/workflows/.emscripten.yml similarity index 97% rename from .github/workflows/emscripten.yml rename to .github/workflows/.emscripten.yml index d9fe0d2c8..24afabf69 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/.emscripten.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/emscripten.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/emscripten.ys name: emscripten defaults: diff --git a/.github/workflows/gcc.yml b/.github/workflows/.gcc.yml similarity index 99% rename from .github/workflows/gcc.yml rename to .github/workflows/.gcc.yml index eb98ec263..03967e9d4 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/.gcc.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/gcc.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/gcc.ys name: gcc defaults: diff --git a/.github/workflows/install.yml b/.github/workflows/.install.yml similarity index 99% rename from .github/workflows/install.yml rename to .github/workflows/.install.yml index 72c33ac8e..6b2defbc2 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/.install.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/install.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/install.ys name: test_install defaults: diff --git a/.github/workflows/macosx.yml b/.github/workflows/.macosx.yml similarity index 98% rename from .github/workflows/macosx.yml rename to .github/workflows/.macosx.yml index 5fcd26a51..5c54432ce 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/.macosx.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/macosx.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/macosx.ys name: macosx defaults: diff --git a/.github/workflows/rarearchs.yml b/.github/workflows/.rarearchs.yml similarity index 98% rename from .github/workflows/rarearchs.yml rename to .github/workflows/.rarearchs.yml index 0873645f4..8d6aca4fd 100644 --- a/.github/workflows/rarearchs.yml +++ b/.github/workflows/.rarearchs.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/rarearchs.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/rarearchs.ys name: rarearchs defaults: diff --git a/.github/workflows/release.yml b/.github/workflows/.release.yml similarity index 99% rename from .github/workflows/release.yml rename to .github/workflows/.release.yml index 112fa6a62..001fbcedc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/.release.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/release.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/release.ys name: release defaults: diff --git a/.github/workflows/samples.yml b/.github/workflows/.samples.yml similarity index 97% rename from .github/workflows/samples.yml rename to .github/workflows/.samples.yml index b4a0e59c4..b5787f054 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/.samples.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/samples.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/samples.ys name: samples defaults: diff --git a/.github/workflows/windows.yml b/.github/workflows/.windows.yml similarity index 98% rename from .github/workflows/windows.yml rename to .github/workflows/.windows.yml index c58f62089..808329645 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/.windows.yml @@ -1,4 +1,4 @@ -# DO NOT EDIT - GENERATED FROM .github/workflows-ys/windows.yml +# DO NOT EDIT - GENERATED FROM .github/workflows/windows.ys name: windows defaults: diff --git a/.github/workflows-src/Makefile b/.github/workflows/Makefile similarity index 57% rename from .github/workflows-src/Makefile rename to .github/workflows/Makefile index 7f40cbe55..6be02816f 100644 --- a/.github/workflows-src/Makefile +++ b/.github/workflows/Makefile @@ -4,8 +4,9 @@ YS_VERSION := 0.1.87 YS_PREFIX := /tmp/rapidyaml YS := $(YS_PREFIX)/bin/ys-$(YS_VERSION) -SOURCE_FILES := $(wildcard *.yml) -TARGET_FILES := $(SOURCE_FILES:%=../workflows/%) +SOURCE_FILES := $(wildcard *.ys) +TARGET_FILES := $(SOURCE_FILES:%.ys=%.yml) +TARGET_FILES := $(TARGET_FILES:%=.%) export PATH := $(YS_PREFIX)/bin:$(PATH) export YSPATH := $(shell pwd -P)/ys @@ -16,30 +17,33 @@ default: build: $(TARGET_FILES) test: force build - @git diff --exit-code ../workflows && \ - echo -e '\nPASS - No normative changes to .github/workflows' + @git diff --exit-code .*.yml && \ + echo -e '\nPASS - No normative changes to .github/workflows/.*.yml' DIFF_ORIG_COMMIT ?= HEAD diff: - @for f in $(SOURCE_FILES); do \ - f=$${f##*/}; \ + @for s in $(SOURCE_FILES); do \ + s=$${s##*/}; \ + t=$${s%.yml}; \ + [[ $$(git show $(DIFF_ORIG_COMMIT):.github/workflows/.$$t \ + 2>/dev/null) ]] && t=.$$t; \ diff -u --color=auto \ <(yq -P 'sort_keys(..)' \ - -o=props <(git show $(DIFF_ORIG_COMMIT):.github/workflows/$$f) | \ + -o=props <(git show $(DIFF_ORIG_COMMIT):.github/workflows/$$t) | \ grep -Ev '(^$$|^#)' \ ) \ <(yq -P 'sort_keys(..)' \ - -o=props ../workflows/$$f | \ + -o=props ../workflows/$$s | \ grep -Ev '(^$$|^#)'\ ); \ done force: - touch *.yml + touch *.ys -../workflows/%: % $(YS) +.%.yml: %.ys $(YS) @[ -f $@ ] && chmod a+w $@ - @echo "# DO NOT EDIT - GENERATED FROM .github/workflows-ys/$<" > $@ + @echo "# DO NOT EDIT - GENERATED FROM .github/workflows/$<" > $@ @echo >> $@ ys -Y $< >> $@ @chmod a-w $@ diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 000000000..beb3c2e97 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,25 @@ +`.github/workflows/*.ys` +======================== + +Use YAMLScript for GHA workflows + + +## Synopsis + +```bash +$ make build +$ make test +$ make diff +``` + + +## Description + +Edit the `*.ys` files in this directory and run `make build` to generate the +files used by GitHub Actions (`.*.yml`). + +Running `make test` runs `make build` and shows the diff in the of the workflow +`.foo.yml` files. + +If you are only refactoring the `*.ys` source files, you should see no diff +when you run this. diff --git a/.github/workflows-src/bash/benchmarks-install.bash b/.github/workflows/bash/benchmarks-install.bash similarity index 100% rename from .github/workflows-src/bash/benchmarks-install.bash rename to .github/workflows/bash/benchmarks-install.bash diff --git a/.github/workflows-src/bash/benchmarks-run.bash b/.github/workflows/bash/benchmarks-run.bash similarity index 100% rename from .github/workflows-src/bash/benchmarks-run.bash rename to .github/workflows/bash/benchmarks-run.bash diff --git a/.github/workflows-src/bash/benchmarks-vars-1.bash b/.github/workflows/bash/benchmarks-vars-1.bash similarity index 100% rename from .github/workflows-src/bash/benchmarks-vars-1.bash rename to .github/workflows/bash/benchmarks-vars-1.bash diff --git a/.github/workflows-src/bash/benchmarks-vars-2.bash b/.github/workflows/bash/benchmarks-vars-2.bash similarity index 100% rename from .github/workflows-src/bash/benchmarks-vars-2.bash rename to .github/workflows/bash/benchmarks-vars-2.bash diff --git a/.github/workflows-src/bash/clang-checkout.bash b/.github/workflows/bash/clang-checkout.bash similarity index 100% rename from .github/workflows-src/bash/clang-checkout.bash rename to .github/workflows/bash/clang-checkout.bash diff --git a/.github/workflows-src/bash/gcc-checkout.bash b/.github/workflows/bash/gcc-checkout.bash similarity index 100% rename from .github/workflows-src/bash/gcc-checkout.bash rename to .github/workflows/bash/gcc-checkout.bash diff --git a/.github/workflows-src/bash/gcc-configure.bash b/.github/workflows/bash/gcc-configure.bash similarity index 100% rename from .github/workflows-src/bash/gcc-configure.bash rename to .github/workflows/bash/gcc-configure.bash diff --git a/.github/workflows-src/bash/install-configure.bash b/.github/workflows/bash/install-configure.bash similarity index 100% rename from .github/workflows-src/bash/install-configure.bash rename to .github/workflows/bash/install-configure.bash diff --git a/.github/workflows-src/bash/install-preinstall.bash b/.github/workflows/bash/install-preinstall.bash similarity index 100% rename from .github/workflows-src/bash/install-preinstall.bash rename to .github/workflows/bash/install-preinstall.bash diff --git a/.github/workflows-src/bash/rarearchs-test-install.bash b/.github/workflows/bash/rarearchs-test-install.bash similarity index 100% rename from .github/workflows-src/bash/rarearchs-test-install.bash rename to .github/workflows/bash/rarearchs-test-install.bash diff --git a/.github/workflows-src/bash/rarearchs-test-run.bash b/.github/workflows/bash/rarearchs-test-run.bash similarity index 100% rename from .github/workflows-src/bash/rarearchs-test-run.bash rename to .github/workflows/bash/rarearchs-test-run.bash diff --git a/.github/workflows-src/bash/release-create-source-packages.bash b/.github/workflows/bash/release-create-source-packages.bash similarity index 100% rename from .github/workflows-src/bash/release-create-source-packages.bash rename to .github/workflows/bash/release-create-source-packages.bash diff --git a/.github/workflows-src/bash/release-normalize.bash b/.github/workflows/bash/release-normalize.bash similarity index 100% rename from .github/workflows-src/bash/release-normalize.bash rename to .github/workflows/bash/release-normalize.bash diff --git a/.github/workflows-src/bash/release-package-python.bash b/.github/workflows/bash/release-package-python.bash similarity index 100% rename from .github/workflows-src/bash/release-package-python.bash rename to .github/workflows/bash/release-package-python.bash diff --git a/.github/workflows-src/bash/release-save-vars.bash b/.github/workflows/bash/release-save-vars.bash similarity index 100% rename from .github/workflows-src/bash/release-save-vars.bash rename to .github/workflows/bash/release-save-vars.bash diff --git a/.github/workflows-src/bash/release-shared-normalize.bash b/.github/workflows/bash/release-shared-normalize.bash similarity index 100% rename from .github/workflows-src/bash/release-shared-normalize.bash rename to .github/workflows/bash/release-shared-normalize.bash diff --git a/.github/workflows-src/bash/release-test-with-python.bash b/.github/workflows/bash/release-test-with-python.bash similarity index 100% rename from .github/workflows-src/bash/release-test-with-python.bash rename to .github/workflows/bash/release-test-with-python.bash diff --git a/.github/workflows-src/bash/release-vars-1.bash b/.github/workflows/bash/release-vars-1.bash similarity index 100% rename from .github/workflows-src/bash/release-vars-1.bash rename to .github/workflows/bash/release-vars-1.bash diff --git a/.github/workflows-src/bash/release-vars-2.bash b/.github/workflows/bash/release-vars-2.bash similarity index 100% rename from .github/workflows-src/bash/release-vars-2.bash rename to .github/workflows/bash/release-vars-2.bash diff --git a/.github/workflows-src/benchmarks.yml b/.github/workflows/benchmarks.ys similarity index 100% rename from .github/workflows-src/benchmarks.yml rename to .github/workflows/benchmarks.ys diff --git a/.github/workflows-src/clang.yml b/.github/workflows/clang.ys similarity index 100% rename from .github/workflows-src/clang.yml rename to .github/workflows/clang.ys diff --git a/.github/workflows-src/clang_tidy.yml b/.github/workflows/clang_tidy.ys similarity index 100% rename from .github/workflows-src/clang_tidy.yml rename to .github/workflows/clang_tidy.ys diff --git a/.github/workflows-src/codeql.yml b/.github/workflows/codeql.ys similarity index 100% rename from .github/workflows-src/codeql.yml rename to .github/workflows/codeql.ys diff --git a/.github/workflows-src/coverage.yml b/.github/workflows/coverage.ys similarity index 100% rename from .github/workflows-src/coverage.yml rename to .github/workflows/coverage.ys diff --git a/.github/workflows-src/emscripten.yml b/.github/workflows/emscripten.ys similarity index 100% rename from .github/workflows-src/emscripten.yml rename to .github/workflows/emscripten.ys diff --git a/.github/workflows-src/gcc.yml b/.github/workflows/gcc.ys similarity index 100% rename from .github/workflows-src/gcc.yml rename to .github/workflows/gcc.ys diff --git a/.github/workflows-src/install.yml b/.github/workflows/install.ys similarity index 100% rename from .github/workflows-src/install.yml rename to .github/workflows/install.ys diff --git a/.github/workflows-src/macosx.yml b/.github/workflows/macosx.ys similarity index 100% rename from .github/workflows-src/macosx.yml rename to .github/workflows/macosx.ys diff --git a/.github/workflows-src/rarearchs.yml b/.github/workflows/rarearchs.ys similarity index 100% rename from .github/workflows-src/rarearchs.yml rename to .github/workflows/rarearchs.ys diff --git a/.github/workflows-src/release.yml b/.github/workflows/release.ys similarity index 100% rename from .github/workflows-src/release.yml rename to .github/workflows/release.ys diff --git a/.github/workflows-src/samples.yml b/.github/workflows/samples.ys similarity index 100% rename from .github/workflows-src/samples.yml rename to .github/workflows/samples.ys diff --git a/.github/workflows-src/share/env.yaml b/.github/workflows/share/env.yaml similarity index 100% rename from .github/workflows-src/share/env.yaml rename to .github/workflows/share/env.yaml diff --git a/.github/workflows-src/windows.yml b/.github/workflows/windows.ys similarity index 100% rename from .github/workflows-src/windows.yml rename to .github/workflows/windows.ys diff --git a/.github/workflows-src/ys/common.ys b/.github/workflows/ys/common.ys similarity index 98% rename from .github/workflows-src/ys/common.ys rename to .github/workflows/ys/common.ys index e45b865bb..23f560e8d 100644 --- a/.github/workflows-src/ys/common.ys +++ b/.github/workflows/ys/common.ys @@ -3,7 +3,7 @@ #---------------------------------------------------------- defn workflow-setup(name=nil overrides={}):: - name =: name || FILE.replace(/.*\//).replace(/\.yml$/) + name =: name || FILE.replace(/.*\//).replace(/\.ys$/) name:: name defaults: run: From d725d6acb950d6614ac861d35b1636008fe56de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Mon, 6 Jan 2025 10:46:14 -0500 Subject: [PATCH 19/22] Wrap some long workflow lines --- .github/workflows/clang.ys | 6 ++++-- .github/workflows/gcc.ys | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clang.ys b/.github/workflows/clang.ys index c479b8bf0..069291f9d 100644 --- a/.github/workflows/clang.ys +++ b/.github/workflows/clang.ys @@ -50,12 +50,14 @@ jobs: #---------------------------------------------------------------------------- clang_extended: :: setup-job('clang') - name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + name: "extended/${{matrix.cxx}}/c++${{matrix.std}}/\ + ${{matrix.bt}}/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)"}) + 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') diff --git a/.github/workflows/gcc.ys b/.github/workflows/gcc.ys index 618bfcf00..c0ffe528e 100644 --- a/.github/workflows/gcc.ys +++ b/.github/workflows/gcc.ys @@ -12,7 +12,8 @@ jobs: 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') @@ -68,7 +69,8 @@ jobs: strategy: fail-fast: false matrix: - item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :bitlinks 'shared64 static32', :img "$a(%4)"}) + item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3 + :bitlinks 'shared64 static32', :img "$a(%4)"}) include: - ! item(11 5 'Debug' '18.04') - ! item(11 5 'Release' '18.04') @@ -127,7 +129,8 @@ jobs: #---------------------------------------------------------------------------- gccsan: :: setup-job('gcc') - name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + name: "gccsan/${{matrix.cxx}}/c++${{matrix.std}}/\ + ${{matrix.bt}}/vg${{matrix.vg}}" :: runs-on-docker-c4core('22.04') strategy: fail-fast: false From 3cf6fcb6992ddee0b18ad6a671a09bb61e8d0dc1 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Wed, 8 Jan 2025 12:15:46 +0000 Subject: [PATCH 20/22] prefer plain files instead of dot files --- .github/workflows/Makefile | 14 +++++++++----- .../workflows/{.benchmarks.yml => benchmarks.yml} | 0 .github/workflows/{.clang.yml => clang.yml} | 0 .../workflows/{.clang_tidy.yml => clang_tidy.yml} | 0 .github/workflows/{.codeql.yml => codeql.yml} | 0 .github/workflows/{.coverage.yml => coverage.yml} | 0 .../workflows/{.emscripten.yml => emscripten.yml} | 0 .github/workflows/{.gcc.yml => gcc.yml} | 1 + .github/workflows/{.install.yml => install.yml} | 0 .github/workflows/{.macosx.yml => macosx.yml} | 0 .../workflows/{.rarearchs.yml => rarearchs.yml} | 0 .github/workflows/{.release.yml => release.yml} | 0 .github/workflows/{.samples.yml => samples.yml} | 0 .github/workflows/{.windows.yml => windows.yml} | 0 14 files changed, 10 insertions(+), 5 deletions(-) rename .github/workflows/{.benchmarks.yml => benchmarks.yml} (100%) rename .github/workflows/{.clang.yml => clang.yml} (100%) rename .github/workflows/{.clang_tidy.yml => clang_tidy.yml} (100%) rename .github/workflows/{.codeql.yml => codeql.yml} (100%) rename .github/workflows/{.coverage.yml => coverage.yml} (100%) rename .github/workflows/{.emscripten.yml => emscripten.yml} (100%) rename .github/workflows/{.gcc.yml => gcc.yml} (99%) rename .github/workflows/{.install.yml => install.yml} (100%) rename .github/workflows/{.macosx.yml => macosx.yml} (100%) rename .github/workflows/{.rarearchs.yml => rarearchs.yml} (100%) rename .github/workflows/{.release.yml => release.yml} (100%) rename .github/workflows/{.samples.yml => samples.yml} (100%) rename .github/workflows/{.windows.yml => windows.yml} (100%) diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile index 6be02816f..fc08020a1 100644 --- a/.github/workflows/Makefile +++ b/.github/workflows/Makefile @@ -4,21 +4,19 @@ YS_VERSION := 0.1.87 YS_PREFIX := /tmp/rapidyaml YS := $(YS_PREFIX)/bin/ys-$(YS_VERSION) +INPUT_FILES := $(wildcard */*) SOURCE_FILES := $(wildcard *.ys) TARGET_FILES := $(SOURCE_FILES:%.ys=%.yml) -TARGET_FILES := $(TARGET_FILES:%=.%) export PATH := $(YS_PREFIX)/bin:$(PATH) export YSPATH := $(shell pwd -P)/ys -default: - build: $(TARGET_FILES) test: force build @git diff --exit-code .*.yml && \ - echo -e '\nPASS - No normative changes to .github/workflows/.*.yml' + echo -e '\nPASS - No normative changes to .github/workflows/*.yml' DIFF_ORIG_COMMIT ?= HEAD diff: @@ -41,14 +39,20 @@ diff: force: touch *.ys -.%.yml: %.ys $(YS) +%.yml: %.ys $(YS) $(INPUT_FILES) @[ -f $@ ] && chmod a+w $@ @echo "# DO NOT EDIT - GENERATED FROM .github/workflows/$<" > $@ @echo >> $@ ys -Y $< >> $@ @chmod a-w $@ + @echo " `wc -ml $<`" + @echo " `wc -ml $@`" # Auto install a specific version of ys (under /tmp): $(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)" diff --git a/.github/workflows/.benchmarks.yml b/.github/workflows/benchmarks.yml similarity index 100% rename from .github/workflows/.benchmarks.yml rename to .github/workflows/benchmarks.yml diff --git a/.github/workflows/.clang.yml b/.github/workflows/clang.yml similarity index 100% rename from .github/workflows/.clang.yml rename to .github/workflows/clang.yml diff --git a/.github/workflows/.clang_tidy.yml b/.github/workflows/clang_tidy.yml similarity index 100% rename from .github/workflows/.clang_tidy.yml rename to .github/workflows/clang_tidy.yml diff --git a/.github/workflows/.codeql.yml b/.github/workflows/codeql.yml similarity index 100% rename from .github/workflows/.codeql.yml rename to .github/workflows/codeql.yml diff --git a/.github/workflows/.coverage.yml b/.github/workflows/coverage.yml similarity index 100% rename from .github/workflows/.coverage.yml rename to .github/workflows/coverage.yml diff --git a/.github/workflows/.emscripten.yml b/.github/workflows/emscripten.yml similarity index 100% rename from .github/workflows/.emscripten.yml rename to .github/workflows/emscripten.yml diff --git a/.github/workflows/.gcc.yml b/.github/workflows/gcc.yml similarity index 99% rename from .github/workflows/.gcc.yml rename to .github/workflows/gcc.yml index 03967e9d4..02d2f5fb4 100644 --- a/.github/workflows/.gcc.yml +++ b/.github/workflows/gcc.yml @@ -727,6 +727,7 @@ jobs: continue-on-error: true runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu18.04:latest + name: arm/c++${{matrix.cxx}}/${{matrix.bt}} strategy: fail-fast: false matrix: diff --git a/.github/workflows/.install.yml b/.github/workflows/install.yml similarity index 100% rename from .github/workflows/.install.yml rename to .github/workflows/install.yml diff --git a/.github/workflows/.macosx.yml b/.github/workflows/macosx.yml similarity index 100% rename from .github/workflows/.macosx.yml rename to .github/workflows/macosx.yml diff --git a/.github/workflows/.rarearchs.yml b/.github/workflows/rarearchs.yml similarity index 100% rename from .github/workflows/.rarearchs.yml rename to .github/workflows/rarearchs.yml diff --git a/.github/workflows/.release.yml b/.github/workflows/release.yml similarity index 100% rename from .github/workflows/.release.yml rename to .github/workflows/release.yml diff --git a/.github/workflows/.samples.yml b/.github/workflows/samples.yml similarity index 100% rename from .github/workflows/.samples.yml rename to .github/workflows/samples.yml diff --git a/.github/workflows/.windows.yml b/.github/workflows/windows.yml similarity index 100% rename from .github/workflows/.windows.yml rename to .github/workflows/windows.yml From 1ea0a8c9ba98c40351c69cb35e2d00b1e3efcd1c Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Mon, 6 Jan 2025 19:15:31 +0000 Subject: [PATCH 21/22] fix PR checkout problems, fix & reuse gettags, cleanup --- .github/workflows/Makefile | 12 +- .github/workflows/bash/benchmarks-vars-1.bash | 7 - .github/workflows/bash/benchmarks-vars-2.bash | 14 - .github/workflows/bash/gcc-checkout.bash | 11 - .github/workflows/bash/gcc-configure.bash | 6 - .github/workflows/bash/release-save-vars.bash | 8 - .github/workflows/bash/release-vars-1.bash | 7 - .github/workflows/bash/release-vars-2.bash | 13 - .github/workflows/benchmarks.yml | 90 +++++-- .github/workflows/benchmarks.ys | 76 ++---- .github/workflows/clang.yml | 52 +++- .github/workflows/clang.ys | 6 +- .github/workflows/clang_tidy.yml | 2 +- .github/workflows/coverage.yml | 9 +- .github/workflows/coverage.ys | 16 +- .github/workflows/gcc.yml | 248 ++++++++++++++---- .github/workflows/gcc.ys | 23 +- .github/workflows/macosx.yml | 2 +- .github/workflows/rarearchs.yml | 2 +- .github/workflows/release.yml | 114 ++++++-- .github/workflows/release.ys | 40 +-- .github/workflows/samples.yml | 15 +- .github/workflows/samples.ys | 13 +- .github/workflows/windows.yml | 2 +- .github/workflows/ys/common.ys | 129 ++++++++- samples/fetch_content/CMakeLists.txt | 15 +- samples/fetch_content/run.sh | 12 +- 27 files changed, 626 insertions(+), 318 deletions(-) delete mode 100644 .github/workflows/bash/benchmarks-vars-1.bash delete mode 100644 .github/workflows/bash/benchmarks-vars-2.bash delete mode 100644 .github/workflows/bash/gcc-checkout.bash delete mode 100644 .github/workflows/bash/gcc-configure.bash delete mode 100644 .github/workflows/bash/release-save-vars.bash delete mode 100644 .github/workflows/bash/release-vars-1.bash delete mode 100644 .github/workflows/bash/release-vars-2.bash diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile index fc08020a1..e3f022301 100644 --- a/.github/workflows/Makefile +++ b/.github/workflows/Makefile @@ -14,8 +14,9 @@ export YSPATH := $(shell pwd -P)/ys build: $(TARGET_FILES) + test: force build - @git diff --exit-code .*.yml && \ + @git diff --exit-code $(TARGET_FILES) && \ echo -e '\nPASS - No normative changes to .github/workflows/*.yml' DIFF_ORIG_COMMIT ?= HEAD @@ -40,15 +41,18 @@ force: touch *.ys %.yml: %.ys $(YS) $(INPUT_FILES) - @[ -f $@ ] && chmod a+w $@ + @echo "$@" + if [ -f "$@" ] ; then chmod a+w $@ ; fi @echo "# DO NOT EDIT - GENERATED FROM .github/workflows/$<" > $@ @echo >> $@ - ys -Y $< >> $@ + $(YS) -Y $< >> $@ @chmod a-w $@ @echo " `wc -ml $<`" @echo " `wc -ml $@`" -# Auto install a specific version of ys (under /tmp): + +# Auto install a specific version of ys +install-ys: $(YS) $(YS): curl -s https://yamlscript.org/install | \ BIN=1 VERSION=$(YS_VERSION) PREFIX=$(YS_PREFIX) bash diff --git a/.github/workflows/bash/benchmarks-vars-1.bash b/.github/workflows/bash/benchmarks-vars-1.bash deleted file mode 100644 index 2b69d1205..000000000 --- a/.github/workflows/bash/benchmarks-vars-1.bash +++ /dev/null @@ -1,7 +0,0 @@ -# https://github.community/t/how-to-get-just-the-tag-name/16241/11 -SRC_TAG=${GITHUB_REF#refs/tags/} -SRC_VERSION=${GITHUB_REF#refs/tags/v} -cat < vars.sh -export SRC_TAG=$SRC_TAG -export SRC_VERSION=$SRC_VERSION -EOF diff --git a/.github/workflows/bash/benchmarks-vars-2.bash b/.github/workflows/bash/benchmarks-vars-2.bash deleted file mode 100644 index 43f9154b1..000000000 --- a/.github/workflows/bash/benchmarks-vars-2.bash +++ /dev/null @@ -1,14 +0,0 @@ -set -x -branch_name=${GITHUB_REF#refs/heads/} -# builds triggered from PRs have the branch_name like this: refs/pull/150/merge -# so filter to eg pr0150_merge -branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` -# sanitize the branch name; eg merge/foo-bar -> merge_foo_bar -branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` -git config --global --add safe.directory $(pwd) -SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 -SRC_VERSION="${branch_name}-${SRC_TAG}" -cat < vars.sh -export SRC_TAG=$SRC_TAG -export SRC_VERSION=$SRC_VERSION -EOF diff --git a/.github/workflows/bash/gcc-checkout.bash b/.github/workflows/bash/gcc-checkout.bash deleted file mode 100644 index dd6c74143..000000000 --- a/.github/workflows/bash/gcc-checkout.bash +++ /dev/null @@ -1,11 +0,0 @@ -set -x -echo GITHUB_REF=$GITHUB_REF -echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF -branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 -echo branch=$branch -git init -q . -git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 -git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY -git fetch origin $branch -git reset --hard FETCH_HEAD -git submodule update --init --recursive diff --git a/.github/workflows/bash/gcc-configure.bash b/.github/workflows/bash/gcc-configure.bash deleted file mode 100644 index 62efab660..000000000 --- a/.github/workflows/bash/gcc-configure.bash +++ /dev/null @@ -1,6 +0,0 @@ -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 diff --git a/.github/workflows/bash/release-save-vars.bash b/.github/workflows/bash/release-save-vars.bash deleted file mode 100644 index c6ab4cc45..000000000 --- a/.github/workflows/bash/release-save-vars.bash +++ /dev/null @@ -1,8 +0,0 @@ -source vars.sh -version_body=${{github.workspace}}/changelog/$SRC_VERSION.md -if [ ! -f $version_body ] ; then - echo "version body file was not found: $version_body" - exit 1 -fi -echo "VERSION=$SRC_VERSION >> $GITHUB_OUTPUT" -echo "VERSION_BODY=$version_body >> $GITHUB_OUTPUT" diff --git a/.github/workflows/bash/release-vars-1.bash b/.github/workflows/bash/release-vars-1.bash deleted file mode 100644 index 2b69d1205..000000000 --- a/.github/workflows/bash/release-vars-1.bash +++ /dev/null @@ -1,7 +0,0 @@ -# https://github.community/t/how-to-get-just-the-tag-name/16241/11 -SRC_TAG=${GITHUB_REF#refs/tags/} -SRC_VERSION=${GITHUB_REF#refs/tags/v} -cat < vars.sh -export SRC_TAG=$SRC_TAG -export SRC_VERSION=$SRC_VERSION -EOF diff --git a/.github/workflows/bash/release-vars-2.bash b/.github/workflows/bash/release-vars-2.bash deleted file mode 100644 index 7deeaa8cb..000000000 --- a/.github/workflows/bash/release-vars-2.bash +++ /dev/null @@ -1,13 +0,0 @@ -set -x -branch_name=${GITHUB_REF#refs/heads/} -# builds triggered from PRs have the branch_name like this: refs/pull/150/merge -# so filter to eg pr0150_merge -branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` -# sanitize the branch name; eg merge/foo-bar -> merge_foo_bar -branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` -SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 -SRC_VERSION="${branch_name}-${SRC_TAG}" -cat < vars.sh -export SRC_TAG=$SRC_TAG -export SRC_VERSION=$SRC_VERSION -EOF diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index f46f4d42c..a47289d83 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -21,7 +21,7 @@ jobs: gettag: runs-on: ubuntu-latest steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -29,37 +29,59 @@ jobs: - name: Variables (from tag) if: contains(github.ref, 'tags/v') run: | + set -exo pipefail # https://github.community/t/how-to-get-just-the-tag-name/16241/11 SRC_TAG=${GITHUB_REF#refs/tags/} SRC_VERSION=${GITHUB_REF#refs/tags/v} - cat < vars.sh + SRC_VERSION_BODY=`pwd`/changelog/$SRC_VERSION.md + if [ ! -f $SRC_VERSION_BODY ] ; then + echo "version body file was not found: $SRC_VERSION_BODY" + exit 1 + fi + cat <> vars.sh export SRC_TAG=$SRC_TAG export SRC_VERSION=$SRC_VERSION + export SRC_VERSION_BODY=$SRC_VERSION_BODY EOF - name: Variables (from commit, no tag) if: ${{ !contains(github.ref, 'tags/v') }} run: | - set -x + set -exo pipefail branch_name=${GITHUB_REF#refs/heads/} # builds triggered from PRs have the branch_name like this: refs/pull/150/merge # so filter to eg pr0150_merge branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` - git config --global --add safe.directory $(pwd) SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 SRC_VERSION="${branch_name}-${SRC_TAG}" cat < vars.sh export SRC_TAG=$SRC_TAG export SRC_VERSION=$SRC_VERSION EOF - - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - name: Save vars.sh uses: actions/upload-artifact@v3 with: name: vars.sh path: ./vars.sh + - name: Show vars.sh + run: cat vars.sh + - name: Source vars.sh + run: source vars.sh + - name: Env (common) + run: | + source vars.sh + echo "SRC_TAG=$SRC_TAG" >> $GITHUB_ENV + echo "SRC_VERSION=$SRC_VERSION" >> $GITHUB_ENV + - name: Env (from tag) + if: contains(github.ref, 'tags/v') + run: | + echo "SRC_VERSION_BODY=$SRC_VERSION_BODY" >> $GITHUB_ENV + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: echo 'nothing to do' + - name: Verify vars.sh + run: env | grep SRC benchmarks: name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}} needs: gettag @@ -115,18 +137,36 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - 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: Download vars.sh uses: actions/download-artifact@v3 with: name: vars.sh path: ./ + - name: Show vars.sh + run: cat vars.sh + - name: Source vars.sh + run: source vars.sh + - name: Env (common) + run: | + source vars.sh + echo "SRC_TAG=$SRC_TAG" >> $GITHUB_ENV + echo "SRC_VERSION=$SRC_VERSION" >> $GITHUB_ENV + - name: Env (from tag) + if: contains(github.ref, 'tags/v') + run: | + echo "SRC_VERSION_BODY=$SRC_VERSION_BODY" >> $GITHUB_ENV + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: echo 'nothing to do' + - name: Verify vars.sh + run: env | grep SRC + - 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: Install python 3.10 for plotting @@ -142,38 +182,46 @@ jobs: pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt python -c 'import munch ; print("ok!") ; exit(0)' echo $? + - name: set build env vars + run: | + echo "NUM_JOBS_BUILD=1" >> $GITHUB_ENV + echo "CMAKE_FLAGS=\"-DPython_EXECUTABLE=$(which python)\"" >> $GITHUB_ENV + - name: check build env vars + run: | + echo NUM_JOBS_BUILD=$NUM_JOBS_BUILD + echo "CMAKE_FLAGS=\"$CMAKE_FLAGS\"" - name: shared64-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared64 + 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run + run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-run - name: shared64-plot - run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot + run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot - name: static64-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test static64 + 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run + run: source .github/setenv.sh && c4_run_target static64 ryml-bm-run - name: static64-plot - run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot + run: source .github/setenv.sh && c4_run_target static64 ryml-bm-plot - name: static32-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test static32 + 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run + run: source .github/setenv.sh && c4_run_target static32 ryml-bm-run - name: static32-plot - run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot + run: source .github/setenv.sh && c4_run_target static32 ryml-bm-plot - name: shared32-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared32 + 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: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run + run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-run - name: shared32-plot - run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot + run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot - name: gather benchmark results run: | set -x diff --git a/.github/workflows/benchmarks.ys b/.github/workflows/benchmarks.ys index ca00d8388..f6e9a5250 100644 --- a/.github/workflows/benchmarks.ys +++ b/.github/workflows/benchmarks.ys @@ -8,21 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - :: checkout-action - - name: Variables (from tag) - if: contains(github.ref, 'tags/v') - run:: bash('benchmarks-vars-1') - - name: Variables (from commit, no tag) - if: ${{ !contains(github.ref, 'tags/v') }} - run:: bash('benchmarks-vars-2') - - name: Verify vars.sh - run: - cat vars.sh ; - source vars.sh ; - echo $SRC_TAG ; - echo $SRC_VERSION - - name: Save vars.sh - uses: actions/upload-artifact@v3 - with: {name: vars.sh, path: ./vars.sh} + - :: version-discover benchmarks: name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}} @@ -32,9 +18,7 @@ jobs: strategy: fail-fast: false matrix: - item =: - \({:std %1, :cxx %2, :bt 'Release', - :os %3, :bitlinks 'static64 static32'}) + 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') @@ -43,17 +27,13 @@ jobs: - ! 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, cxx: xcode, xcver: 15, bt: Release, os: macos-13, bitlinks: static64} env:: -{'BM' 'ON'} + load('share/env.yaml') steps: - :: checkout-action + - :: version-get-vars - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - name: show info run: source .github/setenv.sh && c4_show_info - name: Install python 3.10 for plotting @@ -61,56 +41,48 @@ jobs: 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 + run: | + echo NUM_JOBS_BUILD=$NUM_JOBS_BUILD + echo "CMAKE_FLAGS=\"$CMAKE_FLAGS\"" - name: shared64-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && - source .github/setenv.sh && c4_cfg_test shared64 + 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: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target shared64 ryml-bm-run + run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-run - name: shared64-plot - run: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot - + run: source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot - name: static64-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && - source .github/setenv.sh && c4_cfg_test static64 + 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: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target static64 ryml-bm-run + run: source .github/setenv.sh && c4_run_target static64 ryml-bm-run - name: static64-plot - run: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target static64 ryml-bm-plot - + run: source .github/setenv.sh && c4_run_target static64 ryml-bm-plot - name: static32-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && - source .github/setenv.sh && c4_cfg_test static32 + 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: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target static32 ryml-bm-run + run: source .github/setenv.sh && c4_run_target static32 ryml-bm-run - name: static32-plot - run: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target static32 ryml-bm-plot - + run: source .github/setenv.sh && c4_run_target static32 ryml-bm-plot - name: shared32-configure------------------------------------------------- - run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && - source .github/setenv.sh && c4_cfg_test shared32 + 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: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target shared32 ryml-bm-run + run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-run - name: shared32-plot - run: export NUM_JOBS_BUILD=1 && - source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot + run: source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot - name: gather benchmark results run:: bash('benchmarks-run') - - name: upload benchmark result artifacts uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 7148977ab..ba41a32d0 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -57,7 +57,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action + docker) uses: actions/checkout@v4 with: submodules: recursive @@ -138,7 +138,7 @@ jobs: OS: ${{matrix.os}} CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON steps: - - name: checkout + - name: checkout (action + docker) uses: actions/checkout@v4 with: submodules: recursive @@ -219,7 +219,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action + docker) uses: actions/checkout@v4 with: submodules: recursive @@ -433,22 +433,54 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (manually) run: | - set -xe - env + set -xeo pipefail + env | sort echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + branch=$branch:$localbranch + echo "naming locally as $branch" + fi + fi + # finally, create the local repo git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo git fetch origin $branch git reset --hard FETCH_HEAD git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || echo -n + # show the last commit + git log --name-status HEAD^..HEAD - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info @@ -571,7 +603,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action + docker) uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/clang.ys b/.github/workflows/clang.ys index 069291f9d..c479b8bf0 100644 --- a/.github/workflows/clang.ys +++ b/.github/workflows/clang.ys @@ -50,14 +50,12 @@ jobs: #---------------------------------------------------------------------------- clang_extended: :: setup-job('clang') - name: "extended/${{matrix.cxx}}/c++${{matrix.std}}/\ - ${{matrix.bt}}/vg${{matrix.vg}}" + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/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)"}) + 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') diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index 360f48da1..02a75aae5 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -81,7 +81,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action + docker) uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b742db026..c0b07820f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,7 +24,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip coverage')) || contains(github.event.head_commit.message, 'only coverage') continue-on-error: true - name: coverage/c++${{matrix.std}}${{matrix.cmk}} + name: coverage/c++${{matrix.std}}${{matrix.namesfx}} runs-on: ${{matrix.os}} strategy: fail-fast: false @@ -43,11 +43,13 @@ jobs: bt: Coverage os: ubuntu-20.04 cmk: -DRYML_DBG=ON + namesfx: /dbg - std: 17 cxx: g++-9 bt: Coverage os: ubuntu-20.04 cmk: -DRYML_DBG=ON + namesfx: /dbg env: STD: ${{matrix.std}} CXX_: ${{matrix.cxx}} @@ -61,10 +63,11 @@ jobs: CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} steps: - - name: checkout + - 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 @@ -80,7 +83,7 @@ jobs: with: name: coverage-static64 path: | - build/static64/lcov/ + build/static64/lcov build/static64/coverage3-final_filtered.lcov - name: static64-submit-codecov run: source .github/setenv.sh && c4_submit_coverage static64 codecov diff --git a/.github/workflows/coverage.ys b/.github/workflows/coverage.ys index 7bc14efb2..8568d62b6 100644 --- a/.github/workflows/coverage.ys +++ b/.github/workflows/coverage.ys @@ -6,7 +6,7 @@ jobs: coverage: :: setup-job('coverage') - name: coverage/c++${{matrix.std}}${{matrix.cmk}} + name: coverage/c++${{matrix.std}}${{matrix.namesfx}} runs-on: ${{matrix.os}} strategy: fail-fast: false @@ -16,8 +16,8 @@ jobs: - ! item(11) - ! item(17) # test also with the debug code enabled - - ! item(11) + {:cmk '-DRYML_DBG=ON'} - - ! item(17) + {:cmk '-DRYML_DBG=ON'} + - ! item(11) + {:cmk '-DRYML_DBG=ON', :namesfx '/dbg'} + - ! item(17) + {:cmk '-DRYML_DBG=ON', :namesfx '/dbg'} env: !:merge* - ! load('share/env.yaml') - CMAKE_FLAGS: ${{matrix.cmk}} @@ -27,11 +27,8 @@ jobs: # https://github.com/lemurheavy/coveralls-public/issues/1665 # https://docs.coveralls.io/parallel-build-webhook # COVERALLS_PARALLEL: true - steps: - - name: checkout - uses: actions/checkout@v4 - with: {submodules: recursive} + - :: checkout-action - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - name: show info @@ -47,18 +44,16 @@ jobs: with: name: coverage-static64 path: | - build/static64/lcov/ + build/static64/lcov build/static64/coverage3-final_filtered.lcov - name: static64-submit-codecov run: source .github/setenv.sh && c4_submit_coverage static64 codecov - # Coveralls disabled: # https://github.com/lemurheavy/coveralls-public/issues/1665 #- name: static64-submit-coveralls # run: if [ ${{matrix.std}} == 17 ] ; # then ( source .github/setenv.sh && # c4_submit_coverage static64 coveralls ) ; fi - - name: static32-configure------------------------------------------------- run: source .github/setenv.sh && c4_cfg_test static32 - name: static32-build @@ -74,7 +69,6 @@ jobs: build/static32/coverage3-final_filtered.lcov - name: static32-submit-codecov run: source .github/setenv.sh && c4_submit_coverage static32 codecov - # Coveralls disabled: # https://github.com/lemurheavy/coveralls-public/issues/1665 #- name: static32-submit-coveralls diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 02d2f5fb4..84fe306c4 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -81,22 +81,54 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (manually) run: | - set -xe - env + set -xeo pipefail + env | sort echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + branch=$branch:$localbranch + echo "naming locally as $branch" + fi + fi + # finally, create the local repo git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo git fetch origin $branch git reset --hard FETCH_HEAD git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || echo -n + # show the last commit + git log --name-status HEAD^..HEAD - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info @@ -158,7 +190,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action + docker) uses: actions/checkout@v4 with: submodules: recursive @@ -243,22 +275,54 @@ jobs: OS: ${{matrix.os}} CMAKE_FLAGS: -DRYML_WITH_TAB_TOKENS=ON steps: - - name: checkout + - name: checkout (manually) run: | - set -xe - env + set -xeo pipefail + env | sort echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + branch=$branch:$localbranch + echo "naming locally as $branch" + fi + fi + # finally, create the local repo git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo git fetch origin $branch git reset --hard FETCH_HEAD git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || echo -n + # show the last commit + git log --name-status HEAD^..HEAD - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info @@ -338,22 +402,54 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (manually) run: | - set -xe - env + set -xeo pipefail + env | sort echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + branch=$branch:$localbranch + echo "naming locally as $branch" + fi + fi + # finally, create the local repo git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo git fetch origin $branch git reset --hard FETCH_HEAD git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || echo -n + # show the last commit + git log --name-status HEAD^..HEAD - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info @@ -395,7 +491,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip gcc')) || contains(github.event.head_commit.message, 'only gcc') continue-on-error: true - name: gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu${{matrix.img}}:latest strategy: @@ -540,22 +636,54 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (manually) run: | - set -xe - env + set -xeo pipefail + env | sort echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + branch=$branch:$localbranch + echo "naming locally as $branch" + fi + fi + # finally, create the local repo git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo git fetch origin $branch git reset --hard FETCH_HEAD git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || echo -n + # show the last commit + git log --name-status HEAD^..HEAD - run: c4core-install ${{matrix.cxx}} - name: show info run: source .github/setenv.sh && c4_show_info @@ -597,7 +725,7 @@ jobs: (!contains(github.event.head_commit.message, 'skip gcc')) || contains(github.event.head_commit.message, 'only gcc') continue-on-error: true - name: gccsan/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} + name: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}} runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu22.04:latest strategy: @@ -678,7 +806,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action + docker) uses: actions/checkout@v4 with: submodules: recursive @@ -727,41 +855,35 @@ jobs: continue-on-error: true runs-on: ubuntu-latest container: ghcr.io/biojppm/c4core/ubuntu18.04:latest - name: arm/c++${{matrix.cxx}}/${{matrix.bt}} + name: arm/c++${{matrix.std}}/${{matrix.bt}} strategy: fail-fast: false matrix: include: - std: 11 bt: Debug - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake cxx: arm-linux-gnueabihf-gcc - os: ubuntu-20.04 + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - std: 11 bt: Release - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake cxx: arm-linux-gnueabihf-gcc - os: ubuntu-20.04 + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - std: 14 bt: Debug - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake cxx: arm-linux-gnueabihf-gcc - os: ubuntu-20.04 + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - std: 14 bt: Release - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake cxx: arm-linux-gnueabihf-gcc - os: ubuntu-20.04 + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - std: 17 bt: Debug - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake cxx: arm-linux-gnueabihf-gcc - os: ubuntu-20.04 + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake - std: 17 bt: Release - toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake cxx: arm-linux-gnueabihf-gcc - os: ubuntu-20.04 + toolchain: ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake env: TOOLCHAIN: ${{matrix.toolchain}} STD: ${{matrix.std}} @@ -773,22 +895,54 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (manually) run: | - set -xe - env + set -xeo pipefail + env | sort echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + branch=$branch:$localbranch + echo "naming locally as $branch" + fi + fi + # finally, create the local repo git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo git fetch origin $branch git reset --hard FETCH_HEAD git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || echo -n + # show the last commit + git log --name-status HEAD^..HEAD - name: install gcc-arm-linux-gnueabihf run: c4core-install arm-linux-gnueabihf; c4core-install qemu - name: show info diff --git a/.github/workflows/gcc.ys b/.github/workflows/gcc.ys index c0ffe528e..a838cd394 100644 --- a/.github/workflows/gcc.ys +++ b/.github/workflows/gcc.ys @@ -4,6 +4,7 @@ :: workflow-setup() jobs: + #---------------------------------------------------------------------------- gcc_canary: :: setup-job('gcc') @@ -43,7 +44,13 @@ jobs: - name: show info run: source .github/setenv.sh && c4_show_info - name: configure - run:: bash('gcc-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 @@ -82,9 +89,7 @@ jobs: #---------------------------------------------------------------------------- gcc_extended: :: setup-job('gcc') - name:: - -'gcc_extended/${{matrix.cxx}}/c++${{matrix.std}}/' + - '${{matrix.bt}}/vg${{matrix.vg}}' + name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}} :: runs-on-docker-c4core('${{matrix.img}}') strategy: fail-fast: false @@ -129,8 +134,7 @@ jobs: #---------------------------------------------------------------------------- gccsan: :: setup-job('gcc') - name: "gccsan/${{matrix.cxx}}/c++${{matrix.std}}/\ - ${{matrix.bt}}/vg${{matrix.vg}}" + name: gccsan/${{matrix.bt}}/${{matrix.cxx}}/c++${{matrix.std}} :: runs-on-docker-c4core('22.04') strategy: fail-fast: false @@ -146,14 +150,13 @@ jobs: #---------------------------------------------------------------------------- arm: :: setup-job('gcc') + runs-on-docker-c4core('18.04') - runs-on: ubuntu-latest + name: arm/c++${{matrix.std}}/${{matrix.bt}} strategy: fail-fast: false matrix: item =: - \({:std %1, :bt %2, - :toolchain 'ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake', - :cxx 'arm-linux-gnueabihf-gcc', :os 'ubuntu-20.04'}) + \({:std %1, :bt %2, :cxx 'arm-linux-gnueabihf-gcc', + :toolchain 'ext/c4core/cmake/Toolchain-Arm-ubuntu.cmake'}) include: # these jobs take much longer, so run only one bitlink pair per job to # profit from parallelism diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml index 5c54432ce..bb69113af 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/macosx.yml @@ -79,7 +79,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/rarearchs.yml b/.github/workflows/rarearchs.yml index 8d6aca4fd..b4350c89f 100644 --- a/.github/workflows/rarearchs.yml +++ b/.github/workflows/rarearchs.yml @@ -85,7 +85,7 @@ jobs: bt: Release arch: s390x steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 001fbcedc..b33726c4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: continue-on-error: false runs-on: ubuntu-latest steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -39,17 +39,24 @@ jobs: - name: Variables (from tag) if: contains(github.ref, 'tags/v') run: | + set -exo pipefail # https://github.community/t/how-to-get-just-the-tag-name/16241/11 SRC_TAG=${GITHUB_REF#refs/tags/} SRC_VERSION=${GITHUB_REF#refs/tags/v} - cat < vars.sh + SRC_VERSION_BODY=`pwd`/changelog/$SRC_VERSION.md + if [ ! -f $SRC_VERSION_BODY ] ; then + echo "version body file was not found: $SRC_VERSION_BODY" + exit 1 + fi + cat <> vars.sh export SRC_TAG=$SRC_TAG export SRC_VERSION=$SRC_VERSION + export SRC_VERSION_BODY=$SRC_VERSION_BODY EOF - name: Variables (from commit, no tag) if: ${{ !contains(github.ref, 'tags/v') }} run: | - set -x + set -exo pipefail branch_name=${GITHUB_REF#refs/heads/} # builds triggered from PRs have the branch_name like this: refs/pull/150/merge # so filter to eg pr0150_merge @@ -62,13 +69,29 @@ jobs: export SRC_TAG=$SRC_TAG export SRC_VERSION=$SRC_VERSION EOF - - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - name: Save vars.sh uses: actions/upload-artifact@v3 with: name: vars.sh path: ./vars.sh + - name: Show vars.sh + run: cat vars.sh + - name: Source vars.sh + run: source vars.sh + - name: Env (common) + run: | + source vars.sh + echo "SRC_TAG=$SRC_TAG" >> $GITHUB_ENV + echo "SRC_VERSION=$SRC_VERSION" >> $GITHUB_ENV + - name: Env (from tag) + if: contains(github.ref, 'tags/v') + run: | + echo "SRC_VERSION_BODY=$SRC_VERSION_BODY" >> $GITHUB_ENV + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: echo 'nothing to do' + - name: Verify vars.sh + run: env | grep SRC src: if: | (!contains(github.event.head_commit.message, 'skip all')) || @@ -78,7 +101,7 @@ jobs: needs: gettag runs-on: ubuntu-latest steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -88,6 +111,24 @@ jobs: with: name: vars.sh path: ./ + - name: Show vars.sh + run: cat vars.sh + - name: Source vars.sh + run: source vars.sh + - name: Env (common) + run: | + source vars.sh + echo "SRC_TAG=$SRC_TAG" >> $GITHUB_ENV + echo "SRC_VERSION=$SRC_VERSION" >> $GITHUB_ENV + - name: Env (from tag) + if: contains(github.ref, 'tags/v') + run: | + echo "SRC_VERSION_BODY=$SRC_VERSION_BODY" >> $GITHUB_ENV + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: echo 'nothing to do' + - name: Verify vars.sh + run: env | grep SRC - name: Install python 3.9 uses: actions/setup-python@v5 with: @@ -159,7 +200,7 @@ jobs: os: macos-13 cxx: xcode steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -169,6 +210,24 @@ jobs: with: name: vars.sh path: ./ + - name: Show vars.sh + run: cat vars.sh + - name: Source vars.sh + run: source vars.sh + - name: Env (common) + run: | + source vars.sh + echo "SRC_TAG=$SRC_TAG" >> $GITHUB_ENV + echo "SRC_VERSION=$SRC_VERSION" >> $GITHUB_ENV + - name: Env (from tag) + if: contains(github.ref, 'tags/v') + run: | + echo "SRC_VERSION_BODY=$SRC_VERSION_BODY" >> $GITHUB_ENV + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: echo 'nothing to do' + - name: Verify vars.sh + run: env | grep SRC - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - name: show info @@ -202,7 +261,7 @@ jobs: name: python/src runs-on: ubuntu-latest steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -328,7 +387,7 @@ jobs: osname: linux os: ubuntu-20.04 steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -381,7 +440,7 @@ jobs: - python_src - python_wheels steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -397,25 +456,30 @@ jobs: name: dist path: dist - name: Verify existing artifacts - run: ls -lFhp assets/; ls -lFhp dist/ - - name: Restore vars.sh - if: contains(github.ref, 'tags/v') + run: ls -lFhp assets/ dist/ + - name: Download vars.sh uses: actions/download-artifact@v3 with: name: vars.sh path: ./ - - name: Save vars for following steps - if: contains(github.ref, 'tags/v') - id: vars + - name: Show vars.sh + run: cat vars.sh + - name: Source vars.sh + run: source vars.sh + - name: Env (common) run: | source vars.sh - version_body=${{github.workspace}}/changelog/$SRC_VERSION.md - if [ ! -f $version_body ] ; then - echo "version body file was not found: $version_body" - exit 1 - fi - echo "VERSION=$SRC_VERSION >> $GITHUB_OUTPUT" - echo "VERSION_BODY=$version_body >> $GITHUB_OUTPUT" + echo "SRC_TAG=$SRC_TAG" >> $GITHUB_ENV + echo "SRC_VERSION=$SRC_VERSION" >> $GITHUB_ENV + - name: Env (from tag) + if: contains(github.ref, 'tags/v') + run: | + echo "SRC_VERSION_BODY=$SRC_VERSION_BODY" >> $GITHUB_ENV + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: echo 'nothing to do' + - name: Verify vars.sh + run: env | grep SRC - name: Move Python packages to assets folder if: contains(github.ref, 'tags/v') run: mv -fv dist/*src.zip assets/. @@ -427,8 +491,8 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: tag_name: ${{github.ref}} - release_name: Release ${{steps.vars.outputs.VERSION}} - body_path: ${{steps.vars.outputs.VERSION_BODY}} + release_name: Release ${{steps.vars.outputs.SRC_VERSION}} + body_path: ${{steps.vars.outputs.SRC_VERSION_BODY}} draft: true prerelease: ${{contains(github.ref, 'rc')}} - name: Upload assets to Github Release diff --git a/.github/workflows/release.ys b/.github/workflows/release.ys index d07c6255f..23ebc2a60 100644 --- a/.github/workflows/release.ys +++ b/.github/workflows/release.ys @@ -29,17 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - :: checkout-action - - name: Variables (from tag) - if: contains(github.ref, 'tags/v') - run:: bash('release-vars-1') - - name: Variables (from commit, no tag) - if: ${{ !contains(github.ref, 'tags/v') }} - run:: bash('release-vars-2') - - name: Verify vars.sh - run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION - - name: Save vars.sh - uses: actions/upload-artifact@v3 - with: {name: vars.sh, path: ./vars.sh} + - :: version-discover #---------------------------------------------------------------------------- # create source packages @@ -50,15 +40,12 @@ jobs: runs-on: ubuntu-latest steps: - :: checkout-action - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} + - :: version-get-vars - name: Install python 3.9 uses: actions/setup-python@v5 with: { python-version: 3.9 } - name: Install requirements - run: - sudo -E pip install git-archive-all + run: sudo -E pip install git-archive-all - name: Create source packages run:: bash('release-create-source-packages') - name: Save source artifacts @@ -107,9 +94,7 @@ jobs: gen: STGZ, mime: x-sh, os: macos-13, cxx: xcode} steps: - :: checkout-action - - name: Download vars.sh - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} + - :: version-get-vars - name: install requirements run: source .github/reqs.sh && c4_install_test_requirements $OS - name: show info @@ -298,18 +283,9 @@ jobs: uses: actions/download-artifact@v3 with: {name: dist, path: dist} - name: Verify existing artifacts - run: - ls -lFhp assets/; - ls -lFhp dist/ + run: ls -lFhp assets/ dist/ # Github - - name: Restore vars.sh - if: contains(github.ref, 'tags/v') - uses: actions/download-artifact@v3 - with: {name: vars.sh, path: ./} - - name: Save vars for following steps - if: contains(github.ref, 'tags/v') - id: vars - run:: bash('release-save-vars') + - :: version-get-vars - name: Move Python packages to assets folder if: contains(github.ref, 'tags/v') run: mv -fv dist/*src.zip assets/. @@ -321,8 +297,8 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: tag_name: ${{github.ref}} - release_name: Release ${{steps.vars.outputs.VERSION}} - body_path: ${{steps.vars.outputs.VERSION_BODY}} + release_name: Release ${{steps.vars.outputs.SRC_VERSION}} + body_path: ${{steps.vars.outputs.SRC_VERSION_BODY}} draft: true prerelease: ${{contains(github.ref, 'rc')}} - name: Upload assets to Github Release diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index b5787f054..9db79466d 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -51,9 +51,8 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} CMANY: 'ON' - RYMLSHA: ${{github.event.pull_request.head.sha}} steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive @@ -79,4 +78,14 @@ jobs: - name: custom_c4core run: cd samples/custom_c4core && ./run.sh $BT - name: fetch_content - run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA + run: | + # run this sample only if the branch exists on the repo + set -xe + cd samples/fetch_content + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + echo branch=$branch + if [ ! -z "$(git ls-remote $repo | grep $branch)" ] ; then + ./run.sh $BT $branch "$repo" + fi diff --git a/.github/workflows/samples.ys b/.github/workflows/samples.ys index 6a2fa7fc8..89b44c7ad 100644 --- a/.github/workflows/samples.ys +++ b/.github/workflows/samples.ys @@ -20,7 +20,6 @@ jobs: env: !:merge* - ! load('share/env.yaml') - CMANY: ON - RYMLSHA: ${{github.event.pull_request.head.sha}} steps: - :: checkout-action - name: python3 @@ -43,4 +42,14 @@ jobs: - name: custom_c4core run: cd samples/custom_c4core && ./run.sh $BT - name: fetch_content - run: cd samples/fetch_content && ./run.sh $BT $RYMLSHA + run: | + # run this sample only if the branch exists on the repo + set -xe + cd samples/fetch_content + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + echo branch=$branch + if [ ! -z "$(git ls-remote $repo | grep $branch)" ] ; then + ./run.sh $BT $branch "$repo" + fi diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 808329645..236240edd 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -90,7 +90,7 @@ jobs: LINT: ${{matrix.lint}} OS: ${{matrix.os}} steps: - - name: checkout + - name: checkout (action) uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/ys/common.ys b/.github/workflows/ys/common.ys index 23f560e8d..31ca8bc43 100644 --- a/.github/workflows/ys/common.ys +++ b/.github/workflows/ys/common.ys @@ -48,7 +48,7 @@ defn runs-on-docker-c4core(which):: #---------------------------------------------------------- checkout-action =:: -- name: checkout +- name: checkout (action) uses: actions/checkout@v4 # use fetch-depth to ensure all tags are fetched with: {submodules: recursive, fetch-depth: 0} @@ -56,7 +56,7 @@ checkout-action =:: #---------------------------------------------------------- checkout-action-docker =:: -- name: checkout +- name: checkout (action + docker) uses: actions/checkout@v4 # use fetch-depth to ensure all tags are fetched with: {submodules: recursive, fetch-depth: 0} @@ -66,25 +66,134 @@ checkout-action-docker =:: #---------------------------------------------------------- + checkout-manual =:: -# This provides a manual checkout because the nodejs version -# prevents use of checkout@v3 or v4 action on ubuntu18.04. -- name: checkout +# This provides a manual checkout, needed because the nodejs version +# prevents use of checkout@v3/v4 action on ubuntu18.04 +- name: checkout (manually) run: | - set -xe - env + set -xeo pipefail + env | sort echo GITHUB_SERVER_URL=$GITHUB_SERVER_URL echo GITHUB_REPOSITORY=$GITHUB_REPOSITORY echo GITHUB_REF=$GITHUB_REF + echo GITHUB_REF_NAME=$GITHUB_REF_NAME echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF - branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366 + repo=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # check the branch + # https://stackoverflow.com/questions/58033366 + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} echo branch=$branch + # does the branch exist in the repo? + if [ -z "$(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + # refs/pull/485/merge -> pull/485/head + branch=`echo ${GITHUB_REF#refs/} | sed -e 's:merge:head:g'` + echo "... falling back to $branch" + # does the fallback exist? + if [ -z "(git ls-remote $repo | grep $branch)" ] ; then + echo "branch $branch does not exist on $repo" + exit 1 + else + echo "branch $branch exists on $repo" + localbranch=$(echo $branch | sed -e 's@[/:]@_@g') + branch=$branch:$localbranch + echo "naming locally as $branch" + fi + fi + # finally, create the local repo git init -q . - git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 - git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + # needed for running in the docker image. + # see https://github.com/actions/checkout/issues/1169 + git config --system --add safe.directory '*' + # finally, do it! + git remote add origin $repo git fetch origin $branch git reset --hard FETCH_HEAD git submodule update --init --recursive + # show the log + git log --graph --date=relative --date-order --color=always \ + --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' \ + | head -30 \ + || echo -n + # show the last commit + git log --name-status HEAD^..HEAD + + +#---------------------------------------------------------- + +version-env =:: +- name: Env (common) + run: | + source vars.sh + echo "SRC_TAG=$SRC_TAG" >> $GITHUB_ENV + echo "SRC_VERSION=$SRC_VERSION" >> $GITHUB_ENV +- name: Env (from tag) + if: contains(github.ref, 'tags/v') + run: | + echo "SRC_VERSION_BODY=$SRC_VERSION_BODY" >> $GITHUB_ENV +- name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: echo 'nothing to do' + + +version-discover =:: +- name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run: | + set -exo pipefail + # https://github.community/t/how-to-get-just-the-tag-name/16241/11 + SRC_TAG=${GITHUB_REF#refs/tags/} + SRC_VERSION=${GITHUB_REF#refs/tags/v} + SRC_VERSION_BODY=`pwd`/changelog/$SRC_VERSION.md + if [ ! -f $SRC_VERSION_BODY ] ; then + echo "version body file was not found: $SRC_VERSION_BODY" + exit 1 + fi + cat <> vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + export SRC_VERSION_BODY=$SRC_VERSION_BODY + EOF +- name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: | + set -exo pipefail + branch_name=${GITHUB_REF#refs/heads/} + # builds triggered from PRs have the branch_name like this: refs/pull/150/merge + # so filter to eg pr0150_merge + branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` + # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar + branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` + SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 + SRC_VERSION="${branch_name}-${SRC_TAG}" + cat < vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF +- name: Save vars.sh + uses: actions/upload-artifact@v3 + with: {name: vars.sh, path: ./vars.sh} +- name: Show vars.sh + run: cat vars.sh +- name: Source vars.sh + run: source vars.sh +- :: version-env +- name: Verify vars.sh + run: env | grep SRC + + +version-get-vars =:: +- name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} +- name: Show vars.sh + run: cat vars.sh +- name: Source vars.sh + run: source vars.sh +- :: version-env +- name: Verify vars.sh + run: env | grep SRC #---------------------------------------------------------- diff --git a/samples/fetch_content/CMakeLists.txt b/samples/fetch_content/CMakeLists.txt index 2e313b26b..8f3499606 100644 --- a/samples/fetch_content/CMakeLists.txt +++ b/samples/fetch_content/CMakeLists.txt @@ -1,20 +1,13 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) project(ryml-quickstart LANGUAGES CXX) -if(RYML_BRANCH_NAME STREQUAL "") - find_program(GIT git REQUIRED) - execute_process(COMMAND git rev-parse --abbrev-ref HEAD - OUTPUT_VARIABLE RYML_BRANCH_NAME - OUTPUT_STRIP_TRAILING_WHITESPACE) -endif() -if(RYML_BRANCH_NAME STREQUAL HEAD) - set(RYML_BRANCH_NAME master) -endif() +set(RYML_REPO_URL https://github.com/biojppm/rapidyaml CACHE STRING "") +set(RYML_BRANCH_NAME master CACHE STRING "") +message(STATUS "FetchContent from repo: ${RYML_REPO_URL}") message(STATUS "FetchContent from branch: ${RYML_BRANCH_NAME}") - include(FetchContent) FetchContent_Declare(ryml - GIT_REPOSITORY https://github.com/biojppm/rapidyaml.git + GIT_REPOSITORY ${RYML_REPO_URL} GIT_TAG ${RYML_BRANCH_NAME} GIT_SHALLOW FALSE # ensure submodules are checked out ) diff --git a/samples/fetch_content/run.sh b/samples/fetch_content/run.sh index cb1d7a008..306471453 100755 --- a/samples/fetch_content/run.sh +++ b/samples/fetch_content/run.sh @@ -2,11 +2,17 @@ # take the build type from the command line, or default to release cfg=${1:-Release} -# force cmake's FetchContent to choose a specific branch, or default to nothing -branch=${2:-} +# force cmake's FetchContent to choose a specific branch, or use the default +branch=${2:-master} +# force cmake's FetchContent to choose a specific repo, or use the default +repo=${3:-https://github.com/biojppm/rapidyaml} + # make sure to run from where this file is cd $(dirname $0) # configure the sample -cmake -S . -B ./build/$cfg -DCMAKE_BUILD_TYPE=$cfg -DRYML_BRANCH_NAME="$branch" +cmake -S . -B ./build/$cfg \ + -DCMAKE_BUILD_TYPE=$cfg \ + -DRYML_BRANCH_NAME=$branch \ + -DRYML_REPO_URL=$repo # build and run the sample cmake --build ./build/$cfg --config $cfg --target run From 728065beb766e9632a1fb50e494b376e0d4d4303 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Thu, 9 Jan 2025 11:09:22 +0000 Subject: [PATCH 22/22] Add workflow to check status of ys-generated worklows only infra --- .github/workflows/infra.yml | 45 +++++++++++++++++++++++++++++++++++++ .github/workflows/infra.ys | 25 +++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/infra.yml create mode 100644 .github/workflows/infra.ys diff --git a/.github/workflows/infra.yml b/.github/workflows/infra.yml new file mode 100644 index 000000000..1715f8ef7 --- /dev/null +++ b/.github/workflows/infra.yml @@ -0,0 +1,45 @@ +# DO NOT EDIT - GENERATED FROM .github/workflows/infra.ys + +name: infra +defaults: + run: + shell: bash -e -x {0} +'on': + workflow_dispatch: null + push: + branches: + - master + pull_request: + branches: + - master +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: null +jobs: + 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 + steps: + - name: checkout (action) + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: install ys + run: make -C .github/workflows install-ys + - name: generate workflows + run: make -C .github/workflows build + - name: test workflows + run: | + make -C .github/workflows test + status=$? + if [ $status != 0 ] ; then + echo "ERROR: generated workflows are out of date" + fi + exit $status diff --git a/.github/workflows/infra.ys b/.github/workflows/infra.ys new file mode 100644 index 000000000..06d94862c --- /dev/null +++ b/.github/workflows/infra.ys @@ -0,0 +1,25 @@ +!yamlscript/v0: + +:: use(common) +:: workflow-setup() + +jobs: + + #---------------------------------------------------------------------------- + check_workflows: + :: setup-job('infra') + runs-on: ubuntu-22.04 + steps: + - :: checkout-action + - name: install ys + run: make -C .github/workflows install-ys + - name: generate workflows + run: make -C .github/workflows build + - name: test workflows + run: | + make -C .github/workflows test + status=$? + if [ $status != 0 ] ; then + echo "ERROR: generated workflows are out of date" + fi + exit $status