Skip to content

Support for Conan v2 #374

Support for Conan v2

Support for Conan v2 #374

Workflow file for this run

name: ci
on:
push:
branches: [main]
tags:
- "v*"
pull_request:
branches: [main]
jobs:
cpplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build cpplint image
run: pip install "cpplint<2"
- name: Check code in /src
run: find src/ -name "*.cc" -o -name "*.h" | xargs cpplint
- name: Check code in /tests
run: find tests/ -name "*.cc" -o -name "*.h" | xargs cpplint
- name: Check code in /examples
run: find examples/ -name "*.cc" -o -name "*.h" | xargs cpplint
test-pkg:
runs-on: ${{ matrix.os }}
needs: cpplint
strategy:
matrix:
os: [ubuntu-22.04, windows-2019]
include:
- os: ubuntu-22.04
install: "true"
- os: windows-2019
install: "false"
steps:
- uses: actions/checkout@v4
- name: Install conan
run: pip3 install conan==2.11.0
- name: Run conan install
shell: bash
run: conan install .
- name: Create profile
shell: bash
run: conan profile detect
- name: Build package
shell: bash
run: cmake --preset conan-release
# - uses: actions/checkout@v4
# - name: Build package
# shell: bash
# run: cmake --preset conan-release
# - name: Install package
# if: ${{inputs.install == 'true' }}
# shell: bash
# run: sudo cmake --build build --target install
# - name: Build example
# if: ${{inputs.install == 'true' }}
# shell: bash
# run: |
# mkdir examples/build
# cd examples/build
# cmake ..
# cmake --build .
unit-tests:
strategy:
matrix:
token: ["", "TOKEN"]
reductstore_version: ["main", "latest"]
license_file: ["", "lic.key"]
include:
- token: ""
exclude_token_api_tag: "~[token_api]"
- token: "TOKEN"
exclude_token_api_tag: ""
- reductstore_version: "main"
exclude_api_version_tag: ""
- reductstore_version: "latest"
exclude_api_version_tag: "~[1_14]"
- license_file: ""
exclude_license_tag: "~[license]"
needs:
- cpplint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-package
- name: Generate license
run: echo '${{secrets.LICENSE_KEY}}' > lic.key
- uses: ./.github/actions/run-tests
with:
api-token: ${{matrix.token}}
tags: "${{matrix.exclude_token_api_tag}} ${{matrix.exclude_api_version_tag}} ${{matrix.exclude_license_tag}}"
reductstore-version: ${{matrix.reductstore_version}}
lic_file: ${{matrix.license_file}}