Skip to content

build zerr-core static library #55

build zerr-core static library

build zerr-core static library #55

name: build zerr-core static library
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "core/**"
jobs:
macOS:
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Conan
run: |
pip install conan
conan profile detect
- name: Install Dependencies
working-directory: core
run: |
conan install . --output-folder=build --build=missing
- name: Build Static Library
working-directory: core
run: |
cd build/
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
make install
- name: Upload zerr-core library
uses: actions/upload-artifact@v4
with:
name: zerr-core-macos
path: core/lib
retention-days: 1
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Conan
run: |
pip install conan
conan profile detect
- name: Install Dependencies
working-directory: core
run: |
conan install . --output-folder=build --build=missing
- name: Build Static Library
working-directory: core
run: |
export CXXFLAGS="-fPIC"
cd build/
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
make install
- name: Upload zerr-core library
uses: actions/upload-artifact@v4
with:
name: zerr-core-linux
path: core/lib
retention-days: 1
windows:
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up MinGW
uses: egor-tensin/setup-mingw@v3
with:
arch: x64
- name: Set up Conan
run: |
pip install conan
conan profile detect --force
- name: Install Dependencies
working-directory: core
run: |
mkdir build
conan install . --output-folder=build --build=missing `
-s compiler=gcc `
-s compiler.version=13 `
-s compiler.libcxx=libstdc++11 `
-s build_type=Release
- name: Build Static Library
working-directory: core
run: |
cmake -S . -B build `
-G "MinGW Makefiles" `
-DCMAKE_TOOLCHAIN_FILE="build/conan_toolchain.cmake" `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_CXX_STANDARD=17
cmake --build build --config Release
cmake --install build
- name: Upload zerr-core library
uses: actions/upload-artifact@v4
with:
name: zerr-core-windows
path: core/lib
retention-days: 1