etl/.github/workflows/gcc-syntax-checks.yml
John Wellbelove c98000a41a
Removed ETL_USE_TYPE_TRAITS_BUILTINS macro (#1616)
* Removed ETL_USE_TYPE_TRAITS_BUILTINS macro

* Added ETL_DISABLE_BUILTIN_FUNCTIONS to allow tests to to be run without using builtins

* clang-format updates

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-10-12 18:41:26 +01:00

513 lines
15 KiB
YAML

name: gcc syntax checks
on:
push:
branches: [ master, development, pull-request/* ]
paths:
- '.github/workflows/**'
- 'include/**'
- 'test/**'
- 'CMakeLists.txt'
- 'cmake/**'
- 'BUILD.bazel'
- 'MODULE.bazel*'
- 'meson.build'
- 'meson_options.txt'
- 'subprojects/**'
- '.devcontainer/**'
pull_request:
branches: [ master, development, pull-request/* ]
types: [opened, synchronize, reopened]
paths:
- '.github/workflows/**'
- 'include/**'
- 'test/**'
- 'CMakeLists.txt'
- 'cmake/**'
- 'BUILD.bazel'
- 'MODULE.bazel*'
- 'meson.build'
- 'meson_options.txt'
- 'subprojects/**'
- '.devcontainer/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-gcc-cpp03-linux-STL:
name: Syntax Check - GCC C++03 Linux STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp03-linux-No-STL:
name: Syntax Check - GCC C++03 Linux No STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp11-linux-STL:
name: Syntax Check - GCC C++11 Linux STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp11-linux-No-STL:
name: Syntax Check - GCC C++11 Linux No STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp11-linux-STL-Force-CPP03:
name: Syntax Check - GCC C++11 Linux STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp11-linux-No-STL-Force-CPP03:
name: Syntax Check - GCC C++11 Linux No STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp14-linux-STL:
name: Syntax Check - GCC C++14 Linux STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp14-linux-No-STL:
name: Syntax Check - GCC C++14 Linux No STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp14-linux-STL-Force-CPP03:
name: Syntax Check - GCC C++14 Linux STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp14-linux-No-STL-Force-CPP03:
name: Syntax Check - GCC C++14 Linux No STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp17-linux-STL:
name: Syntax Check - GCC C++17 Linux STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp17-linux-No-STL:
name: Syntax Check - GCC C++17 Linux No STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp17-linux-STL-Force-CPP03:
name: Syntax Check - GCC C++17 Linux STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp17-linux-No-STL-Force-CPP03:
name: Syntax Check - GCC C++17 Linux No STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp20-linux-STL:
name: Syntax Check - GCC C++20 Linux STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp20-linux-No-STL:
name: Syntax Check - GCC C++20 Linux No STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp20-linux-STL-Force-CPP03:
name: Syntax Check - GCC C++20 Linux STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp20-linux-No-STL-Force-CPP03:
name: Syntax Check - GCC C++20 Linux No STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp23-linux-STL:
name: Syntax Check - GCC C++23 Linux STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp23-linux-No-STL:
name: Syntax Check - GCC C++23 Linux No STL
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp23-linux-STL-Force-CPP03:
name: Syntax Check - GCC C++23 Linux STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp23-linux-No-STL-Force-CPP03:
name: Syntax Check - GCC C++23 Linux No STL Force C++03
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v6.0.3
- name: Build
run: |
export CC=gcc
export CXX=g++
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check
gcc --version
make -j "$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp26-linux-STL:
name: Syntax Check - GCC C++26 Linux STL
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.3
- name: Build Docker image
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
- name: Build
run: |
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
cd /workspaces/etl && \
export CC=gcc && \
export CXX=g++ && \
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./test/syntax_check && \
gcc --version && \
make -j \$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp26-linux-No-STL:
name: Syntax Check - GCC C++26 Linux No STL
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.3
- name: Build Docker image
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
- name: Build
run: |
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
cd /workspaces/etl && \
export CC=gcc && \
export CXX=g++ && \
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./test/syntax_check && \
gcc --version && \
make -j \$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp26-linux-STL-Force-CPP03:
name: Syntax Check - GCC C++26 Linux STL Force C++03
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.3
- name: Build Docker image
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
- name: Build
run: |
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
cd /workspaces/etl && \
export CC=gcc && \
export CXX=g++ && \
cmake -DNO_STL=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./test/syntax_check && \
gcc --version && \
make -j \$(getconf _NPROCESSORS_ONLN)"
build-gcc-cpp26-linux-No-STL-Force-CPP03:
name: Syntax Check - GCC C++26 Linux No STL Force C++03
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.3
- name: Build Docker image
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
- name: Build
run: |
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
cd /workspaces/etl && \
export CC=gcc && \
export CXX=g++ && \
cmake -DNO_STL=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./test/syntax_check && \
gcc --version && \
make -j \$(getconf _NPROCESSORS_ONLN)"