diff --git a/.github/workflows/linux_cmake_build.yml b/.github/workflows/linux_cmake_build.yml new file mode 100644 index 00000000..fb415869 --- /dev/null +++ b/.github/workflows/linux_cmake_build.yml @@ -0,0 +1,338 @@ +name: Linux GCC CMake build + +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + BUILD_DEV_ALL_PRESET: gcc_dev_all + BUILD_FOLDER_DEV_ALL: _build_gcc_dev_all + BUILD_DEV_SINGLE_PRESET: gcc_dev_single + BUILD_FOLDER_DEV_SINGLE: _build_gcc_dev_single + BUILD_DEV_INTERFACE_PRESET: gcc_dev_interface + BUILD_FOLDER_DEV_INTERFACE: _build_gcc_dev_interface + +jobs: + build_all: + name: GCC single and interface Lib + # The CMake configure and build commands are platform agnostic and should work equally + # well on Windows or Mac. You can convert this to a matrix build if you need + # cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + with: + submodules: true + + - name: System Packages + run: | + sudo apt-get install ninja-build doxygen graphviz cppcheck clang-tidy + + - name: Check environment + run: | + cmake --version + gcc --version + clang --version + ninja --version + doxygen --version + cppcheck --version + clang-tidy --version + + - name: Configure CMake + run: | + cmake --list-presets + cmake --preset=${{env.BUILD_DEV_ALL_PRESET}} + + - name: Static Analysis + working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + run: cmake --build . --target cppcheck_static_analysis + + - name: Build Release + working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + run: | + cmake --build . --parallel 2 --config Debug + ctest --parallel 2 -C Debug + cmake --build . --parallel 2 --config Release + + # - name: Bootstrap through CMake + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc --config Release + + # - name: BuildExe Layout setup + # working-directory: ${{github.workspace}}/.. + # run: | + # mkdir buildcc_home + # export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" + # echo $BUILDCC_HOME + # cd buildcc_home + # mkdir buildcc + # mkdir libs + # mkdir extensions + # cd .. + # ls + + # - name: BuildExe IM example tiny-process-library + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" + # echo $BUILDCC_HOME + # cmake --build . --target run_buildexe_im_tpl_linux_gcc --config Release + + - name: CPack Release + working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + run: | + cpack -C Release -G ZIP + + - name: Upload CPack + uses: actions/upload-artifact@v7 + with: + name: "BuildExe_Linux" + path: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}/BuildCC-0.1.1-Linux.zip + + # - name: Install + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # sudo cmake --install . --config Release + + # - name: AfterInstall Example + # working-directory: ${{github.workspace}}/example/gcc/AfterInstall + # run: | + # cmake -B build -G "Ninja Multi-Config" + # cmake --build build --parallel 2 --config Release + # ./build/Release/build + + # - name: Hybrid Single Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_single_example --config Release + + # - name: Hybrid Simple Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_simple_example_linux --config Release + + # - name: Hybrid Foolib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_foolib_example_linux --config Release + + # - name: Hybrid External Lib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_externallib_example_linux --config Release + + # - name: Hybrid Custom Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_customtarget_example_linux --config Release + + # - name: Hybrid Generic Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_generic_example --config Release + + # - name: Hybrid PCH Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_pch_example_linux --config Release + + # - name: Hybrid Dep Chaining Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_depchaining_example_linux --config Release + + # - name: Hybrid Target Info Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_targetinfo_example_linux --config Release + + # build_single: + # name: GCC single lib + # runs-on: ubuntu-latest + + # steps: + # - uses: actions/checkout@v6 + # with: + # submodules: true + + # - name: System Packages + # run: | + # sudo apt-get install ninja-build doxygen graphviz cppcheck clang-tidy + + # - name: Install LCOV + # run: | + # git clone -b v1.15 https://github.com/linux-test-project/lcov.git + # ls + # cd lcov + # sudo make install + # lcov --version + + # - name: Check environment + # run: | + # cmake --version + # gcc --version + # clang --version + # ninja --version + # doxygen --version + # cppcheck --version + # clang-tidy --version + + # - name: Configure CMake + # run: | + # cmake --list-presets + # cmake --preset=${{env.BUILD_DEV_SINGLE_PRESET}} + + # - name: Static Analysis + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: cmake --build . --target cppcheck_static_analysis + + # - name: Build Debug and test + # # Linux has 2 cores + # run: | + # cmake --build --list-presets + # cmake --build --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 --config Debug + # ctest --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 -C Debug + + # - name: Codecov + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target lcov_coverage + # cat ../codecov.yml | curl --data-binary @- https://codecov.io/validate + # bash <(curl -s https://codecov.io/bash) -f coverage_truncated.info || echo "Codecov did not collect coverage reports" + + # - name: Build Release for example + # run: | + # cmake --build --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 --config Release + + # - name: Bootstrap through CMake + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc --config Release + + # - name: BuildExe Layout setup + # working-directory: ${{github.workspace}}/.. + # run: | + # mkdir buildcc_home + # export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" + # echo $BUILDCC_HOME + # cd buildcc_home + # mkdir buildcc + # mkdir libs + # mkdir extensions + # cd .. + # ls + + # - name: BuildExe IM example tiny-process-library + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" + # echo $BUILDCC_HOME + # cmake --build . --target run_buildexe_im_tpl_linux_gcc --config Release + + # # - name: TODO, BuildExe SM simple hyrid example + + # - name: Install + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # sudo cmake --install . --config Release + + # - name: AfterInstall Example + # working-directory: ${{github.workspace}}/example/gcc/AfterInstall + # run: | + # cmake -B build -G "Ninja Multi-Config" + # cmake --build build --parallel 2 --config Release + # ./build/Release/build + + # - name: Hybrid Single Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_single_example --config Release + + # - name: Hybrid Simple Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_simple_example_linux --config Release + + # - name: Hybrid Foolib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_foolib_example_linux --config Release + + # - name: Hybrid External Lib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_externallib_example_linux --config Release + + # - name: Hybrid Custom Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_customtarget_example_linux --config Release + + # - name: Hybrid Generic Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_generic_example --config Release + + # - name: Hybrid PCH Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_pch_example_linux --config Release + + # - name: Hybrid Dep Chaining Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_depchaining_example_linux --config Release + + # - name: Hybrid Target Info Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} + # run: | + # cmake --build . --target run_hybrid_targetinfo_example_linux --config Release + + # build_interface: + # name: GCC interface lib + # runs-on: ubuntu-latest + + # steps: + # - uses: actions/checkout@v6 + # with: + # submodules: true + + # - name: System Packages + # run: | + # sudo apt-get install ninja-build doxygen graphviz cppcheck clang-tidy + + # - name: Check environment + # run: | + # cmake --version + # gcc --version + # clang --version + # ninja --version + # doxygen --version + # cppcheck --version + # clang-tidy --version + + # - name: Configure CMake + # run: | + # cmake --list-presets + # cmake --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} + + # - name: Static Analysis + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_INTERFACE}} + # run: cmake --build . --target cppcheck_static_analysis + + # - name: Build Debug + # # Linux has 2 cores + # run: | + # cmake --build --list-presets + # cmake --build --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2 --config Debug + + # - name: Test + # run: | + # ctest --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2 -C Debug diff --git a/.github/workflows/linux_gcc_cmake_build.yml b/.github/workflows/linux_gcc_cmake_build.yml deleted file mode 100644 index 2f3de693..00000000 --- a/.github/workflows/linux_gcc_cmake_build.yml +++ /dev/null @@ -1,336 +0,0 @@ -name: Linux GCC CMake build - -on: - push: - branches: [main] - pull_request: - branches: [main] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - BUILD_DEV_ALL_PRESET: gcc_dev_all - BUILD_FOLDER_DEV_ALL: _build_gcc_dev_all - BUILD_DEV_SINGLE_PRESET: gcc_dev_single - BUILD_FOLDER_DEV_SINGLE: _build_gcc_dev_single - BUILD_DEV_INTERFACE_PRESET: gcc_dev_interface - BUILD_FOLDER_DEV_INTERFACE: _build_gcc_dev_interface - -jobs: - build_all: - name: GCC single and interface Lib - # The CMake configure and build commands are platform agnostic and should work equally - # well on Windows or Mac. You can convert this to a matrix build if you need - # cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: System Packages - run: | - sudo apt-get install ninja-build doxygen graphviz cppcheck clang-tidy - - - name: Check environment - run: | - cmake --version - gcc --version - clang --version - ninja --version - doxygen --version - cppcheck --version - clang-tidy --version - - - name: Configure CMake - run: | - cmake --list-presets - cmake --preset=${{env.BUILD_DEV_ALL_PRESET}} - - - name: Static Analysis - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: cmake --build . --target cppcheck_static_analysis - - - name: Build Release - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --parallel 2 --config Release - - - name: Bootstrap through CMake - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc --config Release - - - name: BuildExe Layout setup - working-directory: ${{github.workspace}}/.. - run: | - mkdir buildcc_home - export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" - echo $BUILDCC_HOME - cd buildcc_home - mkdir buildcc - mkdir libs - mkdir extensions - cd .. - ls - - - name: BuildExe IM example tiny-process-library - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" - echo $BUILDCC_HOME - cmake --build . --target run_buildexe_im_tpl_linux_gcc --config Release - - - name: CPack Release - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cpack -C Release -G ZIP - - - name: Upload CPack - uses: actions/upload-artifact@v3 - with: - name: "BuildExe_Linux" - path: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}/BuildCC-0.1.1-Linux.zip - - - name: Install - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - sudo cmake --install . --config Release - - - name: AfterInstall Example - working-directory: ${{github.workspace}}/example/gcc/AfterInstall - run: | - cmake -B build -G "Ninja Multi-Config" - cmake --build build --parallel 2 --config Release - ./build/Release/build - - - name: Hybrid Single Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_single_example --config Release - - - name: Hybrid Simple Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_simple_example_linux --config Release - - - name: Hybrid Foolib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_foolib_example_linux --config Release - - - name: Hybrid External Lib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_externallib_example_linux --config Release - - - name: Hybrid Custom Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_customtarget_example_linux --config Release - - - name: Hybrid Generic Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_generic_example --config Release - - - name: Hybrid PCH Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_pch_example_linux --config Release - - - name: Hybrid Dep Chaining Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_depchaining_example_linux --config Release - - - name: Hybrid Target Info Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_targetinfo_example_linux --config Release - - build_single: - name: GCC single lib - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: System Packages - run: | - sudo apt-get install ninja-build doxygen graphviz cppcheck clang-tidy - - - name: Install LCOV - run: | - git clone -b v1.15 https://github.com/linux-test-project/lcov.git - ls - cd lcov - sudo make install - lcov --version - - - name: Check environment - run: | - cmake --version - gcc --version - clang --version - ninja --version - doxygen --version - cppcheck --version - clang-tidy --version - - - name: Configure CMake - run: | - cmake --list-presets - cmake --preset=${{env.BUILD_DEV_SINGLE_PRESET}} - - - name: Static Analysis - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: cmake --build . --target cppcheck_static_analysis - - - name: Build Debug and test - # Linux has 2 cores - run: | - cmake --build --list-presets - cmake --build --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 --config Debug - ctest --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 -C Debug - - - name: Codecov - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target lcov_coverage - cat ../codecov.yml | curl --data-binary @- https://codecov.io/validate - bash <(curl -s https://codecov.io/bash) -f coverage_truncated.info || echo "Codecov did not collect coverage reports" - - - name: Build Release for example - run: | - cmake --build --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 --config Release - - - name: Bootstrap through CMake - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc --config Release - - - name: BuildExe Layout setup - working-directory: ${{github.workspace}}/.. - run: | - mkdir buildcc_home - export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" - echo $BUILDCC_HOME - cd buildcc_home - mkdir buildcc - mkdir libs - mkdir extensions - cd .. - ls - - - name: BuildExe IM example tiny-process-library - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - export BUILDCC_HOME="${{github.workspace}}/../buildcc_home" - echo $BUILDCC_HOME - cmake --build . --target run_buildexe_im_tpl_linux_gcc --config Release - - # - name: TODO, BuildExe SM simple hyrid example - - - name: Install - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - sudo cmake --install . --config Release - - - name: AfterInstall Example - working-directory: ${{github.workspace}}/example/gcc/AfterInstall - run: | - cmake -B build -G "Ninja Multi-Config" - cmake --build build --parallel 2 --config Release - ./build/Release/build - - - name: Hybrid Single Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_single_example --config Release - - - name: Hybrid Simple Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_simple_example_linux --config Release - - - name: Hybrid Foolib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_foolib_example_linux --config Release - - - name: Hybrid External Lib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_externallib_example_linux --config Release - - - name: Hybrid Custom Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_customtarget_example_linux --config Release - - - name: Hybrid Generic Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_generic_example --config Release - - - name: Hybrid PCH Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_pch_example_linux --config Release - - - name: Hybrid Dep Chaining Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_depchaining_example_linux --config Release - - - name: Hybrid Target Info Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}} - run: | - cmake --build . --target run_hybrid_targetinfo_example_linux --config Release - - build_interface: - name: GCC interface lib - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: System Packages - run: | - sudo apt-get install ninja-build doxygen graphviz cppcheck clang-tidy - - - name: Check environment - run: | - cmake --version - gcc --version - clang --version - ninja --version - doxygen --version - cppcheck --version - clang-tidy --version - - - name: Configure CMake - run: | - cmake --list-presets - cmake --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} - - - name: Static Analysis - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_INTERFACE}} - run: cmake --build . --target cppcheck_static_analysis - - - name: Build Debug - # Linux has 2 cores - run: | - cmake --build --list-presets - cmake --build --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2 --config Debug - - - name: Test - run: | - ctest --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2 -C Debug diff --git a/.github/workflows/msvc-analysis.yml b/.github/workflows/msvc-analysis.yml index 5590b87c..169e1b60 100644 --- a/.github/workflows/msvc-analysis.yml +++ b/.github/workflows/msvc-analysis.yml @@ -13,8 +13,6 @@ on: branches: [main] pull_request: branches: [main] - schedule: - - cron: "43 11 * * 4" env: # Path to the CMake build directory. @@ -25,11 +23,11 @@ env: jobs: analyze: name: Analyze - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: submodules: true @@ -61,7 +59,7 @@ jobs: # Upload SARIF file as an Artifact to download and view - name: Upload SARIF as an Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v7 with: name: sarif-file path: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 59c8c35a..8950f2d3 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -11,9 +11,9 @@ env: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 with: submodules: true @@ -37,7 +37,7 @@ jobs: cmake --build . --target sphinx_documentation - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/output diff --git a/.github/workflows/win_cmake_build.yml b/.github/workflows/win_cmake_build.yml index 3844fb97..95a1e2d1 100644 --- a/.github/workflows/win_cmake_build.yml +++ b/.github/workflows/win_cmake_build.yml @@ -21,14 +21,16 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: windows-2019 + runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 with: submodules: true - - uses: ilammy/msvc-dev-cmd@v1 + - uses: TheMrMilchmann/setup-msvc-dev@v4 + with: + arch: x64 - name: Check environment run: | @@ -44,41 +46,36 @@ jobs: cmake --list-presets cmake --preset=${{env.BUILD_MSVC_PRESET}} - - name: Build Debug and test + - name: Build Debug, Test and Release working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} run: | cmake --build . --parallel 2 --config Debug - ctest . --parallel 2 -C Debug - - - name: Build Release - # Linux has 2 cores - run: | - cmake --build --list-presets - cmake --build --preset=${{env.BUILD_MSVC_PRESET}} --config Release --parallel 2 - - - name: Bootstrap through CMake - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --target run_buildcc_lib_bootstrap_win_msvc --parallel 2 - - - name: BuildExe Layout setup - working-directory: ${{github.workspace}}/.. - run: | - mkdir buildcc_home - $env:BUILDCC_HOME = "${{github.workspace}}/../buildcc_home" - $env:BUILDCC_HOME - cd buildcc_home - mkdir buildcc - mkdir libs - mkdir extensions - cd .. - dir - - - name: BuildExe IM example tiny-process-library - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - $env:BUILDCC_HOME = "${{github.workspace}}/../buildcc_home" - cmake --build . --config Release --target run_buildexe_im_tpl_win_msvc + ctest --parallel 2 -C Debug + cmake --build . --parallel 2 --config Release + + # - name: Bootstrap through CMake + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --target run_buildcc_lib_bootstrap_win_msvc --parallel 2 + + # - name: BuildExe Layout setup + # working-directory: ${{github.workspace}}/.. + # run: | + # mkdir buildcc_home + # $env:BUILDCC_HOME = "${{github.workspace}}/../buildcc_home" + # $env:BUILDCC_HOME + # cd buildcc_home + # mkdir buildcc + # mkdir libs + # mkdir extensions + # cd .. + # dir + + # - name: BuildExe IM example tiny-process-library + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # $env:BUILDCC_HOME = "${{github.workspace}}/../buildcc_home" + # cmake --build . --config Release --target run_buildexe_im_tpl_win_msvc # - name: TODO, BuildExe SM simple hyrid example @@ -88,162 +85,164 @@ jobs: cpack -C Release -G ZIP - name: Upload CPack - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v7 with: name: "BuildExe_Win" path: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}}/BuildCC-0.1.1-win64.zip - - name: Install - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --install . --config Release - - - name: AfterInstall Example - working-directory: ${{github.workspace}}/example/gcc/AfterInstall - run: | - $env:Path += ";C:/Program Files (x86)/BuildCC" - cmake -B build - cmake --build build --config Release --parallel 2 - cd build/Release - ls - .\build.exe - - - name: Hybrid Single Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_single_example - - - name: Hybrid Simple Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_simple_example_win - - - name: Hybrid Foolib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_foolib_example_win - - - name: Hybrid External Lib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_externallib_example_win - - - name: Hybrid Custom Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_customtarget_example_win - - - name: Hybrid Generic Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_generic_example - - - name: Hybrid PCH Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_pch_example_win - - - name: Hybrid Dep Chaining Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_depchaining_example_win - - - name: Hybrid Target Info Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} - run: | - cmake --build . --config Release --parallel 2 --target run_hybrid_targetinfo_example_win - - build_clang: - name: Clang single and interface Lib - # The CMake configure and build commands are platform agnostic and should work equally - # well on Windows or Mac. You can convert this to a matrix build if you need - # cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: windows-2019 - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - uses: ilammy/msvc-dev-cmd@v1 - - - name: Check environment - run: | - cmake --version - cl ? - clang --version - clang-tidy --version - python --version - pip --version - - - name: Configure CMake - run: | - cmake --list-presets - cmake --preset=${{env.BUILD_CLANG_PRESET}} - - - name: Build - # Linux has 2 cores - run: | - cmake --build --list-presets - cmake --build --preset=${{env.BUILD_CLANG_PRESET}} --parallel 2 --config Release - - - name: Install - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --install . --config Release - - - name: AfterInstall Example - working-directory: ${{github.workspace}}/example/gcc/AfterInstall - run: | - $env:Path += ";C:/Program Files (x86)/BuildCC" - cmake -B build - cmake --build build --parallel 2 --config Release - cd build/Release - ls - .\build.exe - - - name: Hybrid Single Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_single_example --config Release - - - name: Hybrid Simple Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_simple_example_win --config Release - - - name: Hybrid Foolib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_foolib_example_win --config Release - - - name: Hybrid External Lib Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_externallib_example_win --config Release - - - name: Hybrid Custom Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_customtarget_example_win --config Release - - - name: Hybrid Generic Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_generic_example --config Release - - - name: Hybrid PCH Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_pch_example_win --config Release - - - name: Hybrid Dep Chaining Target Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_depchaining_example_win --config Release - - - name: Hybrid Target Info Example - working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} - run: | - cmake --build . --target run_hybrid_targetinfo_example_win --config Release + # - name: Install + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --install . --config Release + + # - name: AfterInstall Example + # working-directory: ${{github.workspace}}/example/gcc/AfterInstall + # run: | + # $env:Path += ";C:/Program Files (x86)/BuildCC" + # cmake -B build + # cmake --build build --config Release --parallel 2 + # cd build/Release + # ls + # .\build.exe + + # - name: Hybrid Single Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_single_example + + # - name: Hybrid Simple Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_simple_example_win + + # - name: Hybrid Foolib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_foolib_example_win + + # - name: Hybrid External Lib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_externallib_example_win + + # - name: Hybrid Custom Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_customtarget_example_win + + # - name: Hybrid Generic Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_generic_example + + # - name: Hybrid PCH Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_pch_example_win + + # - name: Hybrid Dep Chaining Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_depchaining_example_win + + # - name: Hybrid Target Info Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}} + # run: | + # cmake --build . --config Release --parallel 2 --target run_hybrid_targetinfo_example_win + + # build_clang: + # name: Clang single and interface Lib + # # The CMake configure and build commands are platform agnostic and should work equally + # # well on Windows or Mac. You can convert this to a matrix build if you need + # # cross-platform coverage. + # # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + # runs-on: windows-latest + + # steps: + # - uses: actions/checkout@v6 + # with: + # submodules: true + + # - uses: TheMrMilchmann/setup-msvc-dev@v4 + # with: + # arch: x64 + + # - name: Check environment + # run: | + # cmake --version + # cl ? + # clang --version + # clang-tidy --version + # python --version + # pip --version + + # - name: Configure CMake + # run: | + # cmake --list-presets + # cmake --preset=${{env.BUILD_CLANG_PRESET}} + + # - name: Build + # # Linux has 2 cores + # run: | + # cmake --build --list-presets + # cmake --build --preset=${{env.BUILD_CLANG_PRESET}} --parallel 2 --config Release + + # - name: Install + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --install . --config Release + + # - name: AfterInstall Example + # working-directory: ${{github.workspace}}/example/gcc/AfterInstall + # run: | + # $env:Path += ";C:/Program Files (x86)/BuildCC" + # cmake -B build + # cmake --build build --parallel 2 --config Release + # cd build/Release + # ls + # .\build.exe + + # - name: Hybrid Single Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_single_example --config Release + + # - name: Hybrid Simple Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_simple_example_win --config Release + + # - name: Hybrid Foolib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_foolib_example_win --config Release + + # - name: Hybrid External Lib Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_externallib_example_win --config Release + + # - name: Hybrid Custom Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_customtarget_example_win --config Release + + # - name: Hybrid Generic Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_generic_example --config Release + + # - name: Hybrid PCH Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_pch_example_win --config Release + + # - name: Hybrid Dep Chaining Target Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_depchaining_example_win --config Release + + # - name: Hybrid Target Info Example + # working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}} + # run: | + # cmake --build . --target run_hybrid_targetinfo_example_win --config Release diff --git a/.gitmodules b/.gitmodules index 97699a1c..788c8a05 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,6 +19,6 @@ [submodule "tiny-process-library"] path = third_party/tiny-process-library url = https://gitlab.com/eidheim/tiny-process-library.git -[submodule "optional"] - path = third_party/tl_optional - url = https://github.com/TartanLlama/optional.git +[submodule "third_party/subprocess.h"] + path = third_party/subprocess.h + url = https://github.com/sheredom/subprocess.h.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 669219e2..1a157a5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,6 @@ include(cmake/target/spdlog.cmake) include(cmake/target/cli11.cmake) include(cmake/target/taskflow.cmake) include(cmake/target/tpl.cmake) -include(cmake/target/tl_optional.cmake) if (${TESTING}) include(cmake/target/cpputest.cmake) diff --git a/CMakePresets.json b/CMakePresets.json index 6b1d4c4b..960d15f1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -106,7 +106,7 @@ "name": "msvc_dev_all", "displayName": "MSVC all options", "description": "MSVC build with all developer options", - "generator": "Visual Studio 16 2019", + "generator": "Visual Studio 17 2022", "binaryDir": "${sourceDir}/_build_msvc_dev_all", "cacheVariables": { "BUILDCC_INSTALL": true, @@ -127,7 +127,7 @@ "name": "msvc_analysis", "displayName": "MSVC Analysis", "description": "MSVC Analysis for CI/CD", - "generator": "Visual Studio 16 2019", + "generator": "Visual Studio 17 2022", "binaryDir": "${sourceDir}/_build_msvc_analysis", "cacheVariables": { "BUILDCC_INSTALL": false, @@ -200,6 +200,17 @@ "noTestsAction": "error", "stopOnFailure": true } + }, + { + "name": "msvc_dev_all", + "configurePreset": "msvc_dev_all", + "output": { + "outputOnFailure": true + }, + "execution": { + "noTestsAction": "error", + "stopOnFailure": true + } } ] -} +} \ No newline at end of file diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 00000000..770ebe74 --- /dev/null +++ b/Changelog.md @@ -0,0 +1,67 @@ +# CHANGELOG + +## Long Term goals + +- [Discussion] Supported plugin requirements by users +- [Discussion] Customizability requirements by users +- [Discussion] Target and Generator interfaces for standardization by compilers. (White paper) +- [Community Support] MacOS testing and CI/CD + +## 0.2.x + +- `Append*` APIs +- `Add*WithFormat` or `Append*WithFormat` APIs + +## 0.1.4 + +- Config options updates as per Target requirements + - Update configs to use ``fmt::format`` with format specifiers for "{prefix}{value}{suffix}" for customizability. For example: `/D{preprocessor}` for msvc or `-D{preprocessor}` for gcc etc +- Target specialized clang + - Clang behaves differently depending on its backend + - Option 1: Consider adding more options to ``ToolchainId`` and different Clang specializations. For example: ``Target_gcc_clang`` or ``Target_msvc_clang`` or ``Target_mingw_clang`` etc + - Option 2: Consider making a ``Target_clang`` that changes behaviour as per the ``target_triple_architecture`` present in the ``toolchain`` + - What other flavours of clang are present? + +## 0.1.3 + +- Make a common interface / internal library which contains all utility functions and libraries +- New generators + - Currently we only have a simple Generator which is similar to our FileIOGenerator (input -> subprocess commands -> outputs) + - Read the ``faq`` generators to make more varied and robust generators. + +## 0.1.2 + +- Serialization Interface +- Namespace changes + - Remove ``buildcc::env`` + - We should only have 3 namespaces ``buildcc``, ``buildcc::plugin`` and ``buildcc::internal`` +- Environment updates + - Remove ``buildcc::env`` + - Refactor free / static functions and variables into classes with static members and variables. For example. ``buildcc::env::init`` should become ``buildcc::Environment::Init`` +- Args and Register module updates + - Pch command from command line + - Make Register functions static. ``Register::Build`` + - Update ``CallbackIf``, ``Build`` and ``Test`` APIs for the ``state`` variable usage +- Unit testing and mocking for BuildExe + +# 0.1.1 + +Complete working proof of concept of the following + +- BuildCC library +- BuildCC bootstrap "script" files (Basic) +- BuildExe executable (Standalone) + +Contains the following working features + +**BuildCC** +- Supported plugin + - Clang Compile Commands +- Toolchain, Generator, TargetInfo and Target interfaces +- Specialized Toolchain for GCC, MSVC and MINGW +- Specialized Target for GCC, MSVC and MINGW + +**BuildExe** +- Immediate mode +- Script mode +- Local Package Manager with git diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index b19d3a63..747c628f 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -24,13 +24,6 @@ These third party libraries are added as submodules since they aren't meant to b - cpputest (Unit Testing / Mocking) -## Utility - -- tl_optional (Better optional support) - - Synced with branch origin/master (May 2, 2021) - - Commit Id: c28fcf74d207fc667c4ed3dbae4c251ea551c8c1 - - Needed fix: #45 - ## Tools - [x] clangformat (auto) diff --git a/README.md b/README.md index d3abdfa3..0bfdd805 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,13 @@ Build C, C++ and ASM files in C++ - `C++17 filesystem` library support - `C++11 thread` library support - Third Party Libraries (See License below) - - Nlohmann::Json v3.11.2 - - Taskflow v3.1.0 - - CLI11 v2.1.0 - - Tiny Process Library v2.0.4 - - fmt v8.0.1 - - spdlog v1.9.2 - - CppUTest v4.0 - - Tl::Optional (master) + - Nlohmann::Json + - Taskflow + - CLI11 + - Tiny Process Library + - fmt + - spdlog + - CppUTest # General Information @@ -179,4 +178,3 @@ _BuildCC_ is licensed under the Apache License, Version 2.0. See [LICENSE](LICEN - [Nlohmann::Json](https://github.com/nlohmann/json) (JSON Serialization) [MIT License] [Header Only] - [CLI11](https://github.com/CLIUtils/CLI11) (Argument Parsing) [BSD-3-Clause License] [Header Only] - [CppUTest](https://github.com/cpputest/cpputest) (Unit Testing/Mocking) [BSD-3-Clause License] -- [Tl::Optional](https://github.com/TartanLlama/optional) (Optional support) [CC0-1.0 License] diff --git a/TODO.md b/TODO.md index 87a228cb..f7bdaa32 100644 --- a/TODO.md +++ b/TODO.md @@ -1,71 +1,3 @@ -# Versions - -# 0.1.1 - -Complete working proof of concept of the following - -- BuildCC library -- BuildCC bootstrap "script" files (Basic) -- BuildExe executable (Standalone) - -Contains the following working features - -**BuildCC** -- Supported plugin - - Clang Compile Commands -- Toolchain, Generator, TargetInfo and Target interfaces -- Specialized Toolchain for GCC, MSVC and MINGW -- Specialized Target for GCC, MSVC and MINGW - -**BuildExe** -- Immediate mode -- Script mode -- Local Package Manager with git - -## 0.1.2 - -- Serialization Interface -- Namespace changes - - Remove ``buildcc::env`` - - We should only have 3 namespaces ``buildcc``, ``buildcc::plugin`` and ``buildcc::internal`` -- Environment updates - - Remove ``buildcc::env`` - - Refactor free / static functions and variables into classes with static members and variables. For example. ``buildcc::env::init`` should become ``buildcc::Environment::Init`` -- Args and Register module updates - - Pch command from command line - - Make Register functions static. ``Register::Build`` - - Update ``CallbackIf``, ``Build`` and ``Test`` APIs for the ``state`` variable usage -- Unit testing and mocking for BuildExe - -## 0.1.3 - -- Make a common interface / internal library which contains all utility functions and libraries -- New generators - - Currently we only have a simple Generator which is similar to our FileIOGenerator (input -> subprocess commands -> outputs) - - Read the ``faq`` generators to make more varied and robust generators. - -## 0.1.4 - -- Config options updates as per Target requirements - - Update configs to use ``fmt::format`` with format specifiers for "{prefix}{value}{suffix}" for customizability. For example: `/D{preprocessor}` for msvc or `-D{preprocessor}` for gcc etc -- Target specialized clang - - Clang behaves differently depending on its backend - - Option 1: Consider adding more options to ``ToolchainId`` and different Clang specializations. For example: ``Target_gcc_clang`` or ``Target_msvc_clang`` or ``Target_mingw_clang`` etc - - Option 2: Consider making a ``Target_clang`` that changes behaviour as per the ``target_triple_architecture`` present in the ``toolchain`` - - What other flavours of clang are present? - -## 0.2.x - -- `Append*` APIs -- `Add*WithFormat` or `Append*WithFormat` APIs - -## Long Term goals - -- [Discussion] Supported plugin requirements by users -- [Discussion] Customizability requirements by users -- [Discussion] Target and Generator interfaces for standardization by compilers. (White paper) -- [Community Support] MacOS testing and CI/CD - # Feature - [ ] Bootstrapping diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 924fa351..a16ff8e9 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -8,7 +8,6 @@ target_sources(buildcc_lib_bootstrap PRIVATE src/build_spdlog.cpp src/build_taskflow.cpp src/build_tpl.cpp - src/build_tl_optional.cpp src/build_buildcc.cpp ) diff --git a/bootstrap/include/bootstrap/build_buildcc.h b/bootstrap/include/bootstrap/build_buildcc.h index bef6fdf3..dcb59cec 100644 --- a/bootstrap/include/bootstrap/build_buildcc.h +++ b/bootstrap/include/bootstrap/build_buildcc.h @@ -24,7 +24,6 @@ #include "build_nlohmann_json.h" #include "build_spdlog.h" #include "build_taskflow.h" -#include "build_tl_optional.h" #include "build_tpl.h" namespace buildcc { @@ -32,7 +31,7 @@ namespace buildcc { void buildcc_cb(BaseTarget &target, const TargetInfo &nlohmann_json_ho, const TargetInfo &fmt_ho, const TargetInfo &spdlog_ho, const TargetInfo &cli11_ho, const TargetInfo &taskflow_ho, - const TargetInfo &tl_optional_ho, const BaseTarget &tpl); + const BaseTarget &tpl); /** * @brief @@ -46,7 +45,6 @@ class BuildBuildCC { static constexpr const char *const kFmtHoName = "fmtlib_ho"; static constexpr const char *const kSpdlogHoName = "spdlog_ho"; static constexpr const char *const kTaskflowHoName = "taskflow_ho"; - static constexpr const char *const kTlOptionalHoName = "tl_optional_ho"; // Executable static constexpr const char *const kFlatcExeName = "flatc"; @@ -83,9 +81,6 @@ class BuildBuildCC { TargetInfo &GetTaskflowHo() { return storage_.Ref(kTaskflowHoName); } - TargetInfo &GetTlOptionalHo() { - return storage_.Ref(kTlOptionalHoName); - } private: const BaseToolchain &toolchain_; diff --git a/bootstrap/include/bootstrap/build_tl_optional.h b/bootstrap/include/bootstrap/build_tl_optional.h deleted file mode 100644 index 4ca39e01..00000000 --- a/bootstrap/include/bootstrap/build_tl_optional.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2021-2022 Niket Naidu. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef BOOTSTRAP_BUILD_TL_OPTIONAL_H_ -#define BOOTSTRAP_BUILD_TL_OPTIONAL_H_ - -#include "buildcc.h" - -namespace buildcc { - -void tl_optional_ho_cb(TargetInfo &info); - -} // namespace buildcc - -#endif diff --git a/bootstrap/main.buildcc.cpp b/bootstrap/main.buildcc.cpp index 4eafe255..806c4627 100644 --- a/bootstrap/main.buildcc.cpp +++ b/bootstrap/main.buildcc.cpp @@ -20,7 +20,6 @@ #include "bootstrap/build_fmtlib.h" #include "bootstrap/build_spdlog.h" #include "bootstrap/build_taskflow.h" -#include "bootstrap/build_tl_optional.h" #include "bootstrap/build_tpl.h" #include "bootstrap/build_buildcc.h" diff --git a/bootstrap/src/build_buildcc.cpp b/bootstrap/src/build_buildcc.cpp index 38c2072c..fa75c460 100644 --- a/bootstrap/src/build_buildcc.cpp +++ b/bootstrap/src/build_buildcc.cpp @@ -21,7 +21,7 @@ namespace buildcc { void buildcc_cb(BaseTarget &target, const TargetInfo &nlohmann_json_ho, const TargetInfo &fmt_ho, const TargetInfo &spdlog_ho, const TargetInfo &cli11_ho, const TargetInfo &taskflow_ho, - const TargetInfo &tl_optional_ho, const BaseTarget &tpl) { + const BaseTarget &tpl) { // NOTE, Build as single lib target.AddIncludeDir("", true); @@ -102,9 +102,6 @@ void buildcc_cb(BaseTarget &target, const TargetInfo &nlohmann_json_ho, // TASKFLOW HO target.Insert(taskflow_ho, kInsertOptions); - // TL OPTIONAL HO - target.Insert(tl_optional_ho, kInsertOptions); - // TPL LIB target.AddLibDep(tpl); target.Insert(tpl, kInsertOptions); @@ -201,12 +198,6 @@ void BuildBuildCC::Initialize() { TargetEnv(env_.GetTargetRootDir() / "third_party" / "taskflow", env_.GetTargetBuildDir())); - // tl optional HO lib - (void)storage_.Add( - kTlOptionalHoName, toolchain_, - TargetEnv(env_.GetTargetRootDir() / "third_party" / "tl_optional", - env_.GetTargetBuildDir())); - // Tiny-process-library lib // TODO, Make this a generic selection between StaticTarget and // DynamicTarget @@ -230,7 +221,6 @@ void BuildBuildCC::Setup(const ArgToolchainState &state) { auto &fmt_ho_lib = GetFmtHo(); auto &spdlog_ho_lib = GetSpdlogHo(); auto &taskflow_ho_lib = GetTaskflowHo(); - auto &tl_optional_ho_lib = GetTlOptionalHo(); auto &tpl_lib = GetTpl(); auto &buildcc_lib = GetBuildcc(); Reg::Toolchain(state) @@ -239,13 +229,11 @@ void BuildBuildCC::Setup(const ArgToolchainState &state) { .Func(fmt_ho_cb, fmt_ho_lib) .Func(spdlog_ho_cb, spdlog_ho_lib) .Func(taskflow_ho_cb, taskflow_ho_lib) - .Func(tl_optional_ho_cb, tl_optional_ho_lib) .Func(global_flags_cb, tpl_lib, toolchain_) .Build(tpl_cb, tpl_lib) .Func(global_flags_cb, buildcc_lib, toolchain_) .Build(buildcc_cb, buildcc_lib, nlohmann_json_ho_lib, fmt_ho_lib, - spdlog_ho_lib, cli11_ho_lib, taskflow_ho_lib, tl_optional_ho_lib, - tpl_lib) + spdlog_ho_lib, cli11_ho_lib, taskflow_ho_lib, tpl_lib) .Dep(buildcc_lib, tpl_lib); } diff --git a/bootstrap/src/build_taskflow.cpp b/bootstrap/src/build_taskflow.cpp index 4852235a..3a6761a8 100644 --- a/bootstrap/src/build_taskflow.cpp +++ b/bootstrap/src/build_taskflow.cpp @@ -21,13 +21,13 @@ namespace buildcc { void taskflow_ho_cb(TargetInfo &info) { info.AddIncludeDir(""); info.GlobHeaders("taskflow"); + info.GlobHeaders("taskflow/algorithm"); info.GlobHeaders("taskflow/core"); - info.GlobHeaders("taskflow/core/algorithm"); info.GlobHeaders("taskflow/cuda"); - info.GlobHeaders("taskflow/cuda/cuda_algorithm"); + info.GlobHeaders("taskflow/cuda/algorithm"); info.GlobHeaders("taskflow/dsl"); info.GlobHeaders("taskflow/sycl"); - info.GlobHeaders("taskflow/sycl/sycl_algorithm"); + info.GlobHeaders("taskflow/sycl/algorithm"); info.GlobHeaders("taskflow/utility"); } diff --git a/bootstrap/src/build_tl_optional.cpp b/bootstrap/src/build_tl_optional.cpp deleted file mode 100644 index 3ac8926c..00000000 --- a/bootstrap/src/build_tl_optional.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2021-2022 Niket Naidu. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "bootstrap/build_tl_optional.h" - -namespace buildcc { - -void tl_optional_ho_cb(TargetInfo &info) { - info.AddIncludeDir("include"); - info.GlobHeaders("include/tl"); -} - -} // namespace buildcc diff --git a/buildcc/CMakeLists.txt b/buildcc/CMakeLists.txt index 074288d2..6fca9523 100644 --- a/buildcc/CMakeLists.txt +++ b/buildcc/CMakeLists.txt @@ -12,7 +12,6 @@ if(${BUILDCC_BUILD_AS_SINGLE_LIB}) ) target_link_libraries(buildcc PUBLIC fmt::fmt - tl::optional nlohmann_json::nlohmann_json Taskflow CLI11::CLI11 diff --git a/buildcc/lib/env/CMakeLists.txt b/buildcc/lib/env/CMakeLists.txt index 4bba5a42..1b6fa56a 100644 --- a/buildcc/lib/env/CMakeLists.txt +++ b/buildcc/lib/env/CMakeLists.txt @@ -17,7 +17,6 @@ if (${TESTING}) ) target_link_libraries(mock_env PUBLIC fmt::fmt - tl::optional Taskflow CppUTest @@ -101,7 +100,6 @@ if(${BUILDCC_BUILD_AS_INTERFACE}) ) target_link_libraries(env PUBLIC fmt::fmt - tl::optional ) target_compile_options(env PRIVATE ${BUILD_COMPILE_FLAGS}) target_link_options(env PRIVATE ${BUILD_LINK_FLAGS}) diff --git a/buildcc/lib/env/include/env/optional.h b/buildcc/lib/env/include/env/optional.h index ed594535..9c3f16bb 100644 --- a/buildcc/lib/env/include/env/optional.h +++ b/buildcc/lib/env/include/env/optional.h @@ -17,11 +17,11 @@ #ifndef ENV_OPTIONAL_H_ #define ENV_OPTIONAL_H_ -#include "tl/optional.hpp" +#include namespace buildcc::env { -template using optional = tl::optional; +template using optional = std::optional; } // namespace buildcc::env diff --git a/buildcc/lib/toolchain/include/toolchain/api/toolchain_verify.h b/buildcc/lib/toolchain/include/toolchain/api/toolchain_verify.h index 389b54d1..666e5417 100644 --- a/buildcc/lib/toolchain/include/toolchain/api/toolchain_verify.h +++ b/buildcc/lib/toolchain/include/toolchain/api/toolchain_verify.h @@ -92,7 +92,8 @@ constexpr const char *const kVerifiedToolchainFormat = R"({{ template <> struct fmt::formatter : formatter { template - auto format(const buildcc::ToolchainCompilerInfo &vt, FormatContext &ctx) { + auto format(const buildcc::ToolchainCompilerInfo &vt, + FormatContext &ctx) const { std::string verified_toolchain_info = fmt::format(kVerifiedToolchainFormat, vt.path.string(), vt.compiler_version, vt.target_arch); diff --git a/buildcc/lib/toolchain/include/toolchain/common/toolchain_id.h b/buildcc/lib/toolchain/include/toolchain/common/toolchain_id.h index d19ea6d6..166d838f 100644 --- a/buildcc/lib/toolchain/include/toolchain/common/toolchain_id.h +++ b/buildcc/lib/toolchain/include/toolchain/common/toolchain_id.h @@ -35,7 +35,7 @@ enum class ToolchainId { template <> struct fmt::formatter : formatter { template - auto format(buildcc::ToolchainId id, FormatContext &ctx) { + auto format(buildcc::ToolchainId id, FormatContext &ctx) const { std::string id_name; switch (id) { case buildcc::ToolchainId::Gcc: diff --git a/buildcc/plugins/src/clang_compile_commands.cpp b/buildcc/plugins/src/clang_compile_commands.cpp index d3cd92e6..c1ef59f7 100644 --- a/buildcc/plugins/src/clang_compile_commands.cpp +++ b/buildcc/plugins/src/clang_compile_commands.cpp @@ -24,6 +24,7 @@ // third party #include "fmt/format.h" +#include "fmt/ranges.h" namespace { diff --git a/buildcc/schema/include/schema/path.h b/buildcc/schema/include/schema/path.h index 0c07863f..75091733 100644 --- a/buildcc/schema/include/schema/path.h +++ b/buildcc/schema/include/schema/path.h @@ -27,6 +27,7 @@ // Third party #include "fmt/format.h" +#include "fmt/ranges.h" #include "nlohmann/json.hpp" namespace fs = std::filesystem; @@ -251,7 +252,7 @@ inline fs::path string_as_path(const std::string &p) { template <> struct fmt::formatter : formatter { template - auto format(const fs::path &p, FormatContext &ctx) { + auto format(const fs::path &p, FormatContext &ctx) const { return formatter::format(buildcc::path_as_display_string(p), ctx); } diff --git a/buildexe/CMakeLists.txt b/buildexe/CMakeLists.txt index b78f1030..0be01982 100644 --- a/buildexe/CMakeLists.txt +++ b/buildexe/CMakeLists.txt @@ -21,7 +21,6 @@ target_sources(buildexe PRIVATE ../bootstrap/src/build_spdlog.cpp ../bootstrap/src/build_taskflow.cpp ../bootstrap/src/build_tpl.cpp - ../bootstrap/src/build_tl_optional.cpp ) target_include_directories(buildexe PRIVATE include diff --git a/cmake/target/cpputest.cmake b/cmake/target/cpputest.cmake index ffd19450..af9dfa43 100644 --- a/cmake/target/cpputest.cmake +++ b/cmake/target/cpputest.cmake @@ -1,8 +1,3 @@ -set(C++11 ON CACHE BOOL "CppUTests C++11 support") -set(CPPUTEST_FLAGS OFF CACHE BOOL "CppUTests Flags off") -set(WERROR ON CACHE BOOL "CppUTests all errors") -set(LONGLONG ON CACHE BOOL "CppUTests Long Long support") -set(TESTS OFF CACHE BOOL "CppUTests tests off") -set(TESTS_BUILD_DISCOVER OFF CACHE BOOL "CppUTests Tests discover") -set(VERBOSE_CONFIG OFF CACHE BOOL "Config print to screen") +set(CPPUTEST_USE_LONG_LONG ON CACHE BOOL "CppUTest Long Long support") +set(CPPUTEST_MEM_LEAK_DETECTION_DISABLED ON CACHE BOOL "CppUTest memory leak detection") add_subdirectory(third_party/cpputest) diff --git a/cmake/target/tl_optional.cmake b/cmake/target/tl_optional.cmake deleted file mode 100644 index f7afb525..00000000 --- a/cmake/target/tl_optional.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set(OPTIONAL_ENABLE_TESTS OFF CACHE BOOL "TL_OPTIONAL Tests") -add_subdirectory(third_party/tl_optional) diff --git a/third_party/CLI11 b/third_party/CLI11 index ac29910a..a13bed3e 160000 --- a/third_party/CLI11 +++ b/third_party/CLI11 @@ -1 +1 @@ -Subproject commit ac29910a69e9699c15cad9cb95cecce453433edb +Subproject commit a13bed3e5aead2f3afc0e5c935c8fc6ca500bfce diff --git a/third_party/cpputest b/third_party/cpputest index 67d2dfd4..79c066ef 160000 --- a/third_party/cpputest +++ b/third_party/cpputest @@ -1 +1 @@ -Subproject commit 67d2dfd41e13f09ff218aa08e2d35f1c32f032a1 +Subproject commit 79c066ef278263b25d7c4512ccddce81345050a3 diff --git a/third_party/fmt b/third_party/fmt index d141cdbe..e6a8751d 160000 --- a/third_party/fmt +++ b/third_party/fmt @@ -1 +1 @@ -Subproject commit d141cdbeb0fb422a3fb7173b285fd38e0d1772dc +Subproject commit e6a8751df7a68144952d5b21b0d4a76327b6c9f7 diff --git a/third_party/json b/third_party/json index bc889afb..55f93686 160000 --- a/third_party/json +++ b/third_party/json @@ -1 +1 @@ -Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d +Subproject commit 55f93686c01528224f448c19128836e7df245f72 diff --git a/third_party/spdlog b/third_party/spdlog index eb322062..79524ddd 160000 --- a/third_party/spdlog +++ b/third_party/spdlog @@ -1 +1 @@ -Subproject commit eb3220622e73a4889eee355ffa37972b3cac3df5 +Subproject commit 79524ddd08a4ec981b7fea76afd08ee05f83755d diff --git a/third_party/subprocess.h b/third_party/subprocess.h new file mode 160000 index 00000000..1438b682 --- /dev/null +++ b/third_party/subprocess.h @@ -0,0 +1 @@ +Subproject commit 1438b682ac033fe948a41d8822db125cdd0946cb diff --git a/third_party/taskflow b/third_party/taskflow index 86460588..f1490ffc 160000 --- a/third_party/taskflow +++ b/third_party/taskflow @@ -1 +1 @@ -Subproject commit 86460588739bc15205e491ed3ef35030f6bec040 +Subproject commit f1490ffc286eba418107c4aa9b8913e8ca76443c diff --git a/third_party/tiny-process-library b/third_party/tiny-process-library index 93edd949..8bbb5a21 160000 --- a/third_party/tiny-process-library +++ b/third_party/tiny-process-library @@ -1 +1 @@ -Subproject commit 93edd94959a2cc8aec1ea4ec5df82835b2b05bac +Subproject commit 8bbb5a211c5c9df8ee69301da9d22fb977b27dc1 diff --git a/third_party/tl_optional b/third_party/tl_optional deleted file mode 160000 index c28fcf74..00000000 --- a/third_party/tl_optional +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c28fcf74d207fc667c4ed3dbae4c251ea551c8c1