From f4b9820336f77ca0ca280738861899c919b9be30 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Mon, 12 Aug 2024 20:05:37 +0100 Subject: [PATCH] ci: workaround for nodejs version f*ck*p from github --- .github/reqs.sh | 1 + .github/workflows/clang.yml | 169 ++++++++++++++------------- .github/workflows/clang_tidy.yml | 20 ++-- .github/workflows/gcc.yml | 192 ++++++++++++++++++++----------- src/c4/yml/tree.cpp | 1 + 5 files changed, 229 insertions(+), 154 deletions(-) diff --git a/.github/reqs.sh b/.github/reqs.sh index 14a3afae9..784e4b245 100644 --- a/.github/reqs.sh +++ b/.github/reqs.sh @@ -163,6 +163,7 @@ function c4_install_test_requirements_ubuntu_impl() fi if [ "$PIP_PKG" != "" ]; then + sudo pip3 install importlib_metadata sudo pip3 install setuptools-rust sudo pip3 install --upgrade pip sudo pip3 install $PIP_PKG diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 911163d65..ad3d2e251 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -1,6 +1,7 @@ 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 @@ -31,20 +32,20 @@ jobs: 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 + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image strategy: fail-fast: false matrix: include: - - {std: 20, cxx: "10" , bt: Debug , bitlinks: shared64 static32} - - {std: 20, cxx: "10" , bt: Release, bitlinks: shared64 static32} - - {std: 11, cxx: "6.0", bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: "6.0", bt: Release, bitlinks: shared64 static32} - env: {STD: "${{matrix.std}}", CXX_: "clang++-${{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@v3, with: {submodules: recursive}} + - {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_ + - 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 @@ -67,25 +68,26 @@ jobs: - {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/ubuntu18.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image strategy: fail-fast: false matrix: include: - - {std: 20, cxx: "10" , bt: Debug , bitlinks: shared64 static32} - - {std: 20, cxx: "10" , bt: Release, bitlinks: shared64 static32} - - {std: 11, cxx: "6.0", bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: "6.0", bt: Release, bitlinks: shared64 static32} - env: {STD: "${{matrix.std}}", CXX_: "clang++-${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", + - {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@v3, with: {submodules: recursive}} + - {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} @@ -116,21 +118,20 @@ jobs: 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 + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image strategy: fail-fast: false matrix: include: - - {std: 20, cxx: "10" , bt: Debug , bitlinks: shared64 static32} - - {std: 20, cxx: "10" , bt: Release, bitlinks: shared64 static32} - - {std: 11, cxx: "6.0", bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: "6.0", bt: Release, bitlinks: shared64 static32} - env: {CXXFLAGS: "-fno-exceptions -fno-rtti", STD: "${{matrix.std}}", CXX_: "clang++-${{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@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 - - run: c4core-install $CXX_ + - {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 @@ -164,39 +165,51 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: "16" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "16" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "15" , bt: Debug , vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: "15" , bt: Release, vg: on, img: ubuntu22.04} # install of clang15 fails on ubuntu18.04 - - {std: 11, cxx: "14" , bt: Debug , vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: "14" , bt: Release, vg: on, img: ubuntu22.04} # install of clang14 fails on ubuntu18.04 - - {std: 11, cxx: "13" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "13" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "12" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "12" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "11" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "11" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "10" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "10" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "9" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "9" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "8" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "8" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "7" , bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "7" , bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "6.0", bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "6.0", bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "5.0", bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "5.0", bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "4.0", bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "4.0", bt: Release, vg: on, img: ubuntu18.04} - - {std: 11, cxx: "3.9", bt: Debug , vg: on, img: ubuntu18.04} - - {std: 11, cxx: "3.9", bt: Release, vg: on, img: ubuntu18.04} - env: {STD: "${{matrix.std}}", CXX_: "clang++-${{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} # 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: - - {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 - - run: c4core-install $CXX_ + # 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 + 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 $GITHUB_HEAD_REF + 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 @@ -221,36 +234,36 @@ jobs: #---------------------------------------------------------------------------- clangsan: - name: clang/${{matrix.cxx}}/${{matrix.bt}}/c++${{matrix.std}} + 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/ubuntu18.04:latest # use the docker image + container: ghcr.io/biojppm/c4core/ubuntu22.04:latest # use the docker image strategy: fail-fast: false matrix: include: - - {std: 11, cxx: "16" , bt: asan, bitlinks: static64} - - {std: 14, cxx: "16" , bt: asan, bitlinks: static64} - - {std: 17, cxx: "16" , bt: asan, bitlinks: static64} - - {std: 20, cxx: "16" , bt: asan, bitlinks: static64} - - {std: 11, cxx: "16" , bt: lsan, bitlinks: static64} - - {std: 14, cxx: "16" , bt: lsan, bitlinks: static64} - - {std: 17, cxx: "16" , bt: lsan, bitlinks: static64} - - {std: 20, cxx: "16" , bt: lsan, bitlinks: static64} - - {std: 11, cxx: "16" , bt: tsan, bitlinks: static64} - - {std: 14, cxx: "16" , bt: tsan, bitlinks: static64} - - {std: 17, cxx: "16" , bt: tsan, bitlinks: static64} - - {std: 20, cxx: "16" , bt: tsan, bitlinks: static64} - - {std: 11, cxx: "16" , bt: ubsan, bitlinks: static64} - - {std: 14, cxx: "16" , bt: ubsan, bitlinks: static64} - - {std: 17, cxx: "16" , bt: ubsan, bitlinks: static64} - - {std: 20, cxx: "16" , bt: ubsan, bitlinks: static64} - env: {STD: "${{matrix.std}}", CXX_: "clang++-${{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@v3, with: {submodules: recursive}} + - {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_ + - 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 @@ -294,7 +307,7 @@ jobs: # - {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@v3, with: {submodules: recursive}} +# - {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} diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index cd79d7e8c..ef5c6ccf2 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -31,23 +31,23 @@ jobs: 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 + 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++-16, bt: Debug , lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-16, bt: Debug , lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-16, bt: Debug , lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-16, bt: Debug , lint: clang-tidy, bitlinks: static32} - - {std: 11, cxx: clang++-16, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared64} - - {std: 11, cxx: clang++-16, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: shared32} - - {std: 11, cxx: clang++-16, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static64} - - {std: 11, cxx: clang++-16, bt: ReleaseWithDebInfo, lint: clang-tidy, bitlinks: static32} + - {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@v3, with: {submodules: recursive}} + - {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} diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index e3660d926..22309063c 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -1,6 +1,7 @@ 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 @@ -31,23 +32,34 @@ jobs: 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 + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image strategy: fail-fast: false matrix: include: - - {std: 11, cxx: g++-7 , bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: g++-7 , bt: Release, bitlinks: shared64 static32} - - {std: 20, cxx: g++-10 , bt: Debug , bitlinks: shared64 static32} - - {std: 20, cxx: g++-10 , bt: Release, bitlinks: shared64 static32} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32} + - {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: - - {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 '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + 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 $GITHUB_HEAD_REF + 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--------------------------------------------------- @@ -85,7 +97,7 @@ jobs: - {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@v3, with: {submodules: recursive}} + - {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} @@ -110,25 +122,36 @@ jobs: 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 + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image strategy: fail-fast: false matrix: include: - - {std: 11, cxx: g++-7 , bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: g++-7 , bt: Release, bitlinks: shared64 static32} - - {std: 20, cxx: g++-10 , bt: Debug , bitlinks: shared64 static32} - - {std: 20, cxx: g++-10 , bt: Release, bitlinks: shared64 static32} - - {std: 11, cxx: g++-5 , bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: g++-5 , bt: Release, bitlinks: shared64 static32} - - {std: 11, cxx: g++-4.8, bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: g++-4.8, bt: Release, bitlinks: shared64 static32} + - {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: - - {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 '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + 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 $GITHUB_HEAD_REF + 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--------------------------------------------------- @@ -158,19 +181,30 @@ jobs: 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 + container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest # use the docker image strategy: fail-fast: false matrix: include: - - {std: 11, cxx: g++-7 , bt: Debug , bitlinks: shared64 static32} - - {std: 11, cxx: g++-7 , bt: Release, bitlinks: shared64 static32} - - {std: 20, cxx: g++-10 , bt: Debug , bitlinks: shared64 static32} - - {std: 20, cxx: g++-10 , bt: Release, bitlinks: shared64 static32} + - {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: - - {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 '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + 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 $GITHUB_HEAD_REF + 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--------------------------------------------------- @@ -206,21 +240,25 @@ jobs: matrix: include: # VALGRIND - - {std: 11, cxx: g++-12, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 11, cxx: g++-12, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-12, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 14, cxx: g++-12, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-12, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 17, cxx: g++-12, bt: Release, vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-12, bt: Debug , vg: ON, img: ubuntu22.04} - - {std: 20, cxx: g++-12, bt: Release, vg: ON, img: ubuntu22.04} + - {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++-11 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-11 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-10 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-10 , bt: Release, img: ubuntu18.04} - - {std: 11, cxx: g++-9 , bt: Debug , img: ubuntu18.04} - - {std: 11, cxx: g++-9 , bt: Release, img: ubuntu18.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} @@ -235,8 +273,19 @@ jobs: - {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: - - {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 '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + 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 $GITHUB_HEAD_REF + 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--------------------------------------------------- @@ -271,25 +320,25 @@ jobs: fail-fast: false matrix: include: - - {std: 11, cxx: g++-12, bt: asan, bitlinks: static64} - - {std: 14, cxx: g++-12, bt: asan, bitlinks: static64} - - {std: 17, cxx: g++-12, bt: asan, bitlinks: static64} - - {std: 20, cxx: g++-12, bt: asan, bitlinks: static64} - - {std: 11, cxx: g++-12, bt: lsan, bitlinks: static64} - - {std: 14, cxx: g++-12, bt: lsan, bitlinks: static64} - - {std: 17, cxx: g++-12, bt: lsan, bitlinks: static64} - - {std: 20, cxx: g++-12, bt: lsan, bitlinks: static64} - - {std: 11, cxx: g++-12, bt: tsan, bitlinks: static64} - - {std: 14, cxx: g++-12, bt: tsan, bitlinks: static64} - - {std: 17, cxx: g++-12, bt: tsan, bitlinks: static64} - - {std: 20, cxx: g++-12, bt: tsan, bitlinks: static64} - - {std: 11, cxx: g++-12, bt: ubsan, bitlinks: static64} - - {std: 14, cxx: g++-12, bt: ubsan, bitlinks: static64} - - {std: 17, cxx: g++-12, bt: ubsan, bitlinks: static64} - - {std: 20, cxx: g++-12, 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@v3, with: {submodules: recursive}} + - {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} @@ -317,7 +366,7 @@ jobs: #---------------------------------------------------------------------------- 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() # 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: @@ -333,8 +382,19 @@ jobs: - {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: - - {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 '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169 + #... so we checkout manually: + - name: checkout + run: | + set -x + 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 $GITHUB_HEAD_REF + git reset --hard FETCH_HEAD + git submodule update --init --recursive - name: install gcc-arm-linux-gnueabihf run: | c4core-install arm-linux-gnueabihf diff --git a/src/c4/yml/tree.cpp b/src/c4/yml/tree.cpp index a5fe9c6ff..e20940151 100644 --- a/src/c4/yml/tree.cpp +++ b/src/c4/yml/tree.cpp @@ -5,6 +5,7 @@ C4_SUPPRESS_WARNING_MSVC_WITH_PUSH(4296/*expression is always 'boolean_value'*/) +C4_SUPPRESS_WARNING_MSVC(4702/*unreachable code*/) C4_SUPPRESS_WARNING_GCC_CLANG_WITH_PUSH("-Wold-style-cast") C4_SUPPRESS_WARNING_GCC("-Wtype-limits") C4_SUPPRESS_WARNING_GCC("-Wuseless-cast")