* add ptread link to fix cmake build under linux
* add cmake to linux and macos platform
* separate make and cmake workflow
---------
Co-authored-by: Sebastián A <redacted>
on: [push, pull_request]
jobs:
- ubuntu-latest:
+ ubuntu-latest-make:
runs-on: ubuntu-latest
steps:
run: |
make
- macOS-latest:
+ ubuntu-latest-cmake:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Clone
+ uses: actions/checkout@v1
+
+ - name: Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install build-essential
+
+ - name: Build
+ run: |
+ mkdir build
+ cd build
+ cmake ..
+ cmake --build . --config Release
+
+ macOS-latest-make:
runs-on: macos-latest
steps:
run: |
make
- windows-latest:
+ macOS-latest-cmake:
+ runs-on: macOS-latest
+
+ steps:
+ - name: Clone
+ uses: actions/checkout@v1
+
+ - name: Dependencies
+ run: |
+ brew update
+
+ - name: Build
+ run: |
+ mkdir build
+ cd build
+ cmake ..
+ cmake --build . --config Release
+
+ windows-latest-cmake:
runs-on: windows-latest
steps:
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED true)
set(CMAKE_C_STANDARD 11)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)
if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
target_include_directories(ggml PUBLIC .)
target_link_libraries(quantize PRIVATE ggml)
target_link_libraries(llama PRIVATE ggml)
+target_link_libraries(ggml PRIVATE Threads::Threads)