diff --git a/.github/ciimage/Dockerfile.archlinux b/.github/ciimage/Dockerfile.archlinux index bab6fd36..30244af7 100644 --- a/.github/ciimage/Dockerfile.archlinux +++ b/.github/ciimage/Dockerfile.archlinux @@ -11,13 +11,10 @@ RUN pacman -Syu --noconfirm && \ clang \ gdb \ llvm \ - rust \ - cargo \ wget \ python \ python-pip \ git \ - cmake \ meson \ ninja \ tzdata && \ diff --git a/.github/ciimage/Dockerfile.debian b/.github/ciimage/Dockerfile.debian index 493087ca..f114ade3 100644 --- a/.github/ciimage/Dockerfile.debian +++ b/.github/ciimage/Dockerfile.debian @@ -15,7 +15,6 @@ RUN apt-get update && \ gdb \ llvm \ libstdc++-8-dev \ - cmake \ wget \ python3 \ python3-pip \ diff --git a/.github/ciimage/Dockerfile.fedora b/.github/ciimage/Dockerfile.fedora index 64738840..abfc98a4 100644 --- a/.github/ciimage/Dockerfile.fedora +++ b/.github/ciimage/Dockerfile.fedora @@ -13,15 +13,13 @@ RUN dnf -y update && \ clang \ gdb \ llvm \ - rust \ - cargo \ wget \ python3 \ python3-pip \ git && \ dnf clean all # Install Meson and Ninja using pip -RUN python3 -m pip install --no-cache-dir cmake meson ninja +RUN python3 -m pip install --no-cache-dir meson ninja # Set environment variables ENV CC=/usr/bin/clang diff --git a/.github/ciimage/Dockerfile.ubuntu b/.github/ciimage/Dockerfile.ubuntu index 6da4310d..a44a4961 100644 --- a/.github/ciimage/Dockerfile.ubuntu +++ b/.github/ciimage/Dockerfile.ubuntu @@ -15,8 +15,6 @@ RUN apt-get update && \ gdb \ llvm \ libstdc++-10-dev \ - rustc \ - cargo \ wget \ python3 \ python3-pip \ @@ -25,7 +23,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN python3 -m pip install --no-cache-dir cmake meson ninja +RUN python3 -m pip install --no-cache-dir meson ninja # Set environment variables ENV CC=/usr/bin/gcc diff --git a/.github/workflows/cmake_ci.yml b/.github/workflows/cmake_ci.yml deleted file mode 100644 index 3b3952ea..00000000 --- a/.github/workflows/cmake_ci.yml +++ /dev/null @@ -1,283 +0,0 @@ -name: CMake CI - -on: - push: - paths: - - "**.c" - - "**.h" - - "**.cpp" - - "**.hpp" - - "**.py" - - "**.build" - - "**.options" - pull_request: - paths: - - "**.c" - - "**.h" - - "**.cpp" - - "**.hpp" - - "**.py" - - "**.build" - - "**.options" - -jobs: - build_msvc: - name: Building on MSVC ${{ matrix.msvc_version }} - runs-on: windows-latest - strategy: - matrix: - msvc_version: [2015, 2017, 2019, 2022] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install CMake and Ninja - shell: pwsh - run: | - python -m pip install --upgrade pip - python -m pip install cmake ninja - if ($env:msvc_version -eq "2015") { - choco install visualstudio2015buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --includeRecommended --includeOptional --passive" - } elseif ($env:msvc_version -eq "2017") { - choco install visualstudio2017buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive" - } elseif ($env:msvc_version -eq "2019") { - choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive" - } elseif ($env:msvc_version -eq "2022") { - choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive" - } - $env:CC="cl.exe" - $env:CXX="cl.exe" - - - name: Configure CMake - run: cmake -S . -B build_msvc_${{ matrix.msvc_version }} -G "Ninja" -DWITH_TESTS=ON - - - name: Build - run: cmake --build build_msvc_${{ matrix.msvc_version }} --config Release - - - name: Upload Build Log - if: failure() - uses: actions/upload-artifact@v4 - with: - name: windows_msvc_${{ matrix.msvc_version }}_cmake_buildlog - path: build_msvc_${{ matrix.msvc_version }}/build.ninja - - build_macosx: - name: Building on macOS with Xcode ${{ matrix.xcode_version }} - runs-on: macos-latest - strategy: - matrix: - xcode_version: ["15.2", "15.3"] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install Xcode - run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode_version }}.app - - - name: Install CMake and Ninja - run: | - python -m pip install cmake ninja - - - name: Configure CMake - run: cmake -S . -B builddir -G "Ninja" -DWITH_TESTS=ON - - - name: Build - run: cmake --build builddir --config Release - - - name: Upload Build Log - if: failure() - uses: actions/upload-artifact@v4 - with: - name: macos_xcode_${{ matrix.xcode_version }}_cmake_buildlog - path: builddir/build.ninja - - build_msys: - name: Building on MSYS ${{ matrix.architecture }} - runs-on: windows-latest - strategy: - matrix: - architecture: [x86, x64] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up MSYS2 - uses: msys2/setup-msys2@v2 - with: - update: true - - - name: Set environment variables - run: | - echo "CC=/mingw${{ matrix.architecture }}/bin/gcc.exe" >> $GITHUB_ENV - echo "CXX=/mingw${{ matrix.architecture }}/bin/g++.exe" >> $GITHUB_ENV - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install CMake and Ninja - run: | - python -m pip install cmake ninja - - - name: Configure CMake - run: cmake -S . -B builddir -G "Ninja" -DWITH_TESTS=ON - - - name: Build - run: cmake --build builddir --config Release - - - name: Upload Build Log - if: failure() - uses: actions/upload-artifact@v4 - with: - name: msys_${{ matrix.architecture }}_cmake_buildlog - path: builddir/build.ninja - - build_posix: - name: Build on Linux ${{ matrix.distro }} - runs-on: ubuntu-latest - - strategy: - matrix: - distro: [ubuntu, fedora, archlinux, debian] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ matrix.distro }} - restore-keys: | - ${{ runner.os }}-buildx - - - name: Build Docker Image - run: | - docker build \ - --file .github/ciimage/Dockerfile.${{ matrix.distro }} \ - --tag ${GITHUB_REPOSITORY}:${{ matrix.distro }} . - - - name: Run CMake Build in Docker Container - run: | - docker run --rm \ - -v ${{ github.workspace }}:/workspace \ - -w /workspace \ - ${GITHUB_REPOSITORY}:${{ matrix.distro }} \ - /bin/bash -c " - apt-get update - cmake -S . -B builddir -G Ninja -DWITH_TESTS=ON - cmake --build builddir --config Release" - - build_cross: - name: Building on Bedrock ${{ matrix.architecture }} - runs-on: ubuntu-latest # Using Ubuntu as the base system for cross-compilation - - strategy: - matrix: - architecture: [arm, arm64, mips, mipsel, riscv64, ppc, ppc64le, sparc64, s390x] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install Cross-Compilation Toolchain - run: | - sudo apt-get update - if [ "${{ matrix.architecture }}" == "arm" ]; then - sudo apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi - elif [ "${{ matrix.architecture }}" == "arm64" ]; then - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - elif [ "${{ matrix.architecture }}" == "mips" ]; then - sudo apt-get install -y gcc-mips-linux-gnu g++-mips-linux-gnu - elif [ "${{ matrix.architecture }}" == "mipsel" ]; then - sudo apt-get install -y gcc-mipsel-linux-gnu g++-mipsel-linux-gnu - elif [ "${{ matrix.architecture }}" == "riscv64" ]; then - sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu - elif [ "${{ matrix.architecture }}" == "ppc" ]; then - sudo apt-get install -y gcc-powerpc-linux-gnu g++-powerpc-linux-gnu - elif [ "${{ matrix.architecture }}" == "ppc64le" ]; then - sudo apt-get install -y gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu - elif [ "${{ matrix.architecture }}" == "sparc64" ]; then - sudo apt-get install -y gcc-sparc64-linux-gnu g++-sparc64-linux-gnu - elif [ "${{ matrix.architecture }}" == "s390x" ]; then - sudo apt-get install -y gcc-s390x-linux-gnu g++-s390x-linux-gnu - fi - - - name: Set Cross-Compilation Environment Variables - run: | - if [ "${{ matrix.architecture }}" == "arm" ]; then - echo "CC=arm-linux-gnueabi-gcc" >> $GITHUB_ENV - echo "CXX=arm-linux-gnueabi-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "arm64" ]; then - echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=aarch64-linux-gnu-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "mips" ]; then - echo "CC=mips-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=mips-linux-gnu-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "mipsel" ]; then - echo "CC=mipsel-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=mipsel-linux-gnu-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "riscv64" ]; then - echo "CC=riscv64-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=riscv64-linux-gnu-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "ppc" ]; then - echo "CC=powerpc-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=powerpc-linux-gnu-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "ppc64le" ]; then - echo "CC=powerpc64le-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=powerpc64le-linux-gnu-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "sparc64" ]; then - echo "CC=sparc64-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=sparc64-linux-gnu-g++" >> $GITHUB_ENV - elif [ "${{ matrix.architecture }}" == "s390x" ]; then - echo "CC=s390x-linux-gnu-gcc" >> $GITHUB_ENV - echo "CXX=s390x-linux-gnu-g++" >> $GITHUB_ENV - fi - - - name: Install CMake and Ninja - run: | - python -m pip install cmake ninja - - - name: Configure CMake - run: cmake -S . -B builddir -G "Ninja" -DWITH_TESTS=ON - - - name: Build - run: cmake --build builddir --config Release - - - name: Upload Build Log - if: failure() - uses: actions/upload-artifact@v4 - with: - name: cross_${{ matrix.architecture }}_cmake_buildlog - path: builddir/build.ninja - \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 630e0ffe..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# CMakeLists.txt -cmake_minimum_required(VERSION 3.13.4) - -# Project metadata -project(FossilTest VERSION 1.1.6 LANGUAGES C CXX) - -# Set the C and C++ standards -set(CMAKE_C_STANDARD 11) -set(CMAKE_C_EXTENSIONS OFF) # Ensure strict C11 compliance -set(CMAKE_CXX_STANDARD 20) -set(CMAKE_CXX_EXTENSIONS OFF) # Ensure strict C++20 compliance - -# Options -option(WITH_TEST "Enable Fossil Test for this project" OFF) - -# Add subdirectory for source code -add_subdirectory(code) diff --git a/README.md b/README.md index 58a42984..926cb060 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ Together, **Fossil Test**, **Fossil Mock**, and **Fossil Mark** offer a powerful To get started with Fossil Test, ensure you have the following installed: - **Meson Build System**: If you don’t have Meson installed, follow the installation instructions on the official [Meson website](https://mesonbuild.com/Getting-meson.html). -- **CMake Build System**: If you don’t have CMake installed, follow the installation instructions on the official [CMake website](https://cmake.org/getting-started/). --- @@ -53,7 +52,7 @@ To get started with Fossil Test, ensure you have the following installed: # ====================== [wrap-git] url = https://github.com/fossillogic/fossil-test.git - revision = v1.1.6 + revision = v1.1.7 [provide] fossil-test = fossil_test_dep @@ -67,36 +66,6 @@ To get started with Fossil Test, ensure you have the following installed: --- -#### Adding Fossil Test Dependency With CMake - -To use Fossil Test with CMake, follow these steps: - -1. **Install CMake**: - Install CMake version `3.13.4` or newer: - - ```sh - python -m pip install cmake # To install CMake - python -m pip install --upgrade cmake # To upgrade CMake - ``` - -2. **Find and Integrate Fossil Test**: - After installing CMake, you can integrate Fossil Test as a dependency. Add the following lines to your `CMakeLists.txt` file: - - ```cmake - # Find Fossil Test package - find_package(FossilTest REQUIRED) - - # Link the Fossil Test to your project - target_link_libraries(your_target FossilTest) - ``` - -3. **Configure Your CMake Project**: - Make sure to configure your CMake project to include the necessary paths and dependencies for Fossil Test. Typically, you’ll want to make sure the `FossilTest` library is correctly linked in your build configuration. - - This will ensure that Fossil Test is included and properly built with your project. - ---- - **Note**: For the best experience, always use the latest release of Fossil Test. Visit the [Fossil Test Releases](https://github.com/fossillogic/fossil-test/releases) page for the latest versions. ## Fossil Test CLI Usage diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt deleted file mode 100644 index a633a8a7..00000000 --- a/code/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -# code/CMakeLists.txt - -# Add subdirectories for logic and tests -add_subdirectory(logic) diff --git a/code/logic/CMakeLists.txt b/code/logic/CMakeLists.txt deleted file mode 100644 index 098bde59..00000000 --- a/code/logic/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# code/logic/CMakeLists.txt - -# Define the include directories -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -# Collect all header files in logic/fossil/* -file(GLOB HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/fossil/*.h) - -# List the source files -set(TEST_CODE - mocking.c - testing.c - marking.c -) - -# Create the library target -add_library(fossil-test STATIC ${TEST_CODE} ${HEADER_FILES}) - -# Set the library to be installed -install(TARGETS fossil-test - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin -) - -# Install the header files -install(FILES ${HEADER_FILES} DESTINATION include/fossil) - -# Declare the dependency -add_library(fossil_test_dep INTERFACE) -target_link_libraries(fossil_test_dep INTERFACE fossil-test) -target_include_directories(fossil_test_dep INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/code/logic/testing.c b/code/logic/testing.c index 88e5fe93..8e784890 100644 --- a/code/logic/testing.c +++ b/code/logic/testing.c @@ -273,7 +273,7 @@ static const char *FOSSIL_TEST_COMMANDS[] = { "dry-run [enable|disable] - Enables or disables dry-run mode\n" }; -static const char *FOSSIL_TEST_VERSION = "1.1.6"; // Version of Fossil Test +static const char *FOSSIL_TEST_VERSION = "1.1.7"; // Version of Fossil Test static const char *FOSSIL_TEST_AUTHOR = "Michael Gene Brockus (Dreamer)"; // Author of Fossil Test static const char *FOSSIL_TEST_LICENSE = "Mozilla Public License 2.0"; // License of Fossil Test diff --git a/meson.build b/meson.build index c96ae8f3..4ea0f547 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('Fossil Test', 'c', 'cpp', meson_version: '>=1.3.0', license: 'MPL-2.0', - version: '1.1.6', + version: '1.1.7', default_options: ['c_std=c11,c18', 'cpp_std=c++20']) subdir('code')