diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9e45f5b..dc8304a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-22.04 # Optionally install the cmake for vcpkg -COPY ./package.sh /tmp/ +COPY ./build_support/package.sh /tmp/ RUN chmod +x /tmp/package.sh \ && /tmp/package.sh \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fc028a8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI Pipeline + +on: + push: + branches: [ main ] + pull_request: + types: [opened, synchronize] + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Dependencies + run: | + chmod +x ./build_support/package.sh + ./build_support/package.sh + + - name: Configure CMake + run: cmake -B build -DCMAKE_BUILD_TYPE=Release + + - name: Check Format + run: cmake --build build --target check-format + + - name: Build + run: cmake --build build + + - name: Test + run: cmake --build build -t test-lib \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index b92b27c..55a91ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,15 +30,11 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/src) if(HAS_BENCHES) include(3rdParty) include_googletest() - set(CMAKE_BUILD_TYPE Release) include_benchmark() message(STATUS "Building benches") add_subdirectory(benches) endif(HAS_BENCHES) -# The below needs to be built in Debug mode -set(CMAKE_BUILD_TYPE Debug) - if(HAS_MSAN) include(Sanitizers) message(STATUS "Building Sanitizers") diff --git a/.devcontainer/package.sh b/build_support/package.sh similarity index 92% rename from .devcontainer/package.sh rename to build_support/package.sh index 68fb17c..809f444 100644 --- a/.devcontainer/package.sh +++ b/build_support/package.sh @@ -6,9 +6,9 @@ # set -e -apt-get -y update +sudo apt-get -y update -apt-get -y install \ +sudo apt-get -y install \ build-essential \ clang-12 \ clang-format-12 \