Skip to content

Feature/add conan

Feature/add conan #76

Workflow file for this run

name: "CMake build"
on:
push:
branches: [master]
paths:
- "src/**.c"
- "inc/**.h"
- "CMakeLists.txt"
- ".github/workflows/cmake-build.yml"
pull_request:
branches: [master]
paths:
- "src/**.c"
- "inc/**.h"
- "CMakeLists.txt"
- ".github/workflows/cmake-build.yml"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
jobs:
cmake-build-linux:
runs-on: ubuntu-latest
name: cmake build on ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: cmake
run: |
mkdir build
cd build
cmake .. -DMTFMT_RT_USE_MALLOC=ON -DMTFMT_RT_USE_DIV=ON -DMTFMT_RT_USE_STDOUT=ON -DMTFMT_BUILD_SHARED=ON
cmake --build .
# 打包动态库
- name: Upload artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v3
with:
name: cmake-linux-artifact
path: |
./build/*.so
cmake-build-windows:
runs-on: windows-latest
name: cmake build on windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: cmake
run: |
mkdir build
cd build
cmake .. -DMTFMT_RT_USE_MALLOC=ON -DMTFMT_RT_USE_DIV=ON -DMTFMT_RT_USE_STDOUT=ON -DMTFMT_BUILD_SHARED=ON
cmake --build . --config=Release
shell: pwsh
# 打包动态库
- name: Upload artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v3
with:
name: cmake-windows-artifact
path: |
./build/target/*