Skip to content

Conan CI

Conan CI #3

Workflow file for this run

name: Conan CI
on:
schedule:
- cron: '15 21 * * *'
push:
branches:
# Match branches with version numbers like 1.2.8, 2.0.0, etc.
- '[0-9]+.[0-9]+.[0-9]+'
tags:
- 'v*' # Tag releases like v1.2.8
pull_request:
branches:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Cache Conan
uses: actions/cache@v4
with:
path: ~/.conan
key: ${{ runner.os }}-conan
- name: Install system packages
run: |
sudo apt update
sudo apt install -y ninja-build pkg-config python3-pip build-essential
- name: Install Meson and Conan
run: |
pip install --upgrade pip
pip install meson==1.8.0 conan==2.3.2
- name: Detect Conan profile
run: conan profile detect
- name: Install dependencies
run: conan install . --profile default --build=missing
- name: Build
run: |
meson setup -Dwith_test=enabled builddir
meson compile -C builddir -v
- name: Test
run: meson test -C builddir -v
- name: Package
run: |
PKG_NAME=$(echo "${{ github.event.repository.name }}" | tr '-' '_')
PKG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') # remove leading 'v'
conan create . --name=$PKG_NAME --version=$PKG_VERSION