diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 035ffff..34f62a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,7 @@ on: env: PKG_VERSION: "2.1.0" PKG_RELEASE: "1" + ABSEIL_VERSION: "20230125.3" jobs: build: @@ -23,15 +24,34 @@ jobs: - name: Install Dependencies run: | sudo apt-get update - sudo apt-get install -y build-essential cmake libabsl-dev clang checkinstall + sudo apt-get install -y build-essential cmake clang checkinstall zlib1g-dev musl-tools - - name: Create build directory - run: mkdir build + - name: Build Static Abseil + run: | + git clone https://github.com/abseil/abseil-cpp.git + cd abseil-cpp + mkdir build && cd build + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DABSL_BUILD_TESTING=OFF \ + -DABSL_USE_GOOGLETEST_HEAD=OFF \ + -DCMAKE_CXX_STANDARD=17 \ + -DBUILD_SHARED_LIBS=OFF \ + .. + make -j$(nproc) + make install + ldconfig - name: Configure the project run: | - cd build - CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DUSE_CLANG=ON -DBUILD_STATIC=OFF .. + mkdir build; cd build + CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release \ + -DUSE_CLANG=ON \ + -DBUILD_STATIC=ON \ + -DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc -static-libstdc++" \ + -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \ + -DCMAKE_EXE_LINKER_FLAGS_INIT="-static" \ + .. - name: Build the project run: | @@ -45,7 +65,7 @@ jobs: --pkgversion=${{ env.PKG_VERSION }} \ --pkgrelease=${{ env.PKG_RELEASE }} \ --maintainer="maintainer@example.com" \ - --requires="libabsl20220623t64" \ + --requires="" \ --default \ --pakdir=. \ --backup=no \ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a7f610e --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# CMake build directories +build/ +CMakeFiles/ +CMakeCache.txt +cmake_install.cmake +compile_commands.json +CTestTestfile.cmake +Testing/ +_deps/ + +# Compiled files +*.o +*.obj +*.exe +*.out +*.app +*.dll +*.so +*.dylib + +# IDE specific files +.vscode/ +.idea/ +*.swp +*.swo +.DS_Store + +# Generated files +Makefile +*.make +*.cmake +!CMakeLists.txt + +# Dependencies +_deps/ +vcpkg_installed/ + +# Debug symbols +*.pdb +*.dSYM/ + +# Generated documentation +docs/_build/ \ No newline at end of file diff --git a/utils.h b/utils.h index 954d13e..ad50b97 100644 --- a/utils.h +++ b/utils.h @@ -16,6 +16,7 @@ #define UTILS_H_ #include +#include #include "absl/strings/string_view.h"