Skip to content

[feature] Add Conan profile automatic detection option #46

[feature] Add Conan profile automatic detection option

[feature] Add Conan profile automatic detection option #46

Workflow file for this run

name: Validate Conan Action
permissions:
contents: read
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
testing-action:
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Execute checkout
uses: actions/checkout@v4
- name: Consume Conan Action
uses: ./
with:
version: '2.15.1'
config_urls: |
https://github.com/conan-io/conan-extensions.git
https://github.com/conan-io/conan-extensions.git
https://github.com/conan-io/conan-extensions.git
# This should always be set using a GitHub secret, never as a raw string in the action.
# This is only for testing purposes.
audit_token: 'fake_token'
home: ${{ github.workspace }}/conan_home
cache_packages: 'true'
python_version: '3.10'
- name: Verify action results
shell: bash
run: |
conan --version | grep -q '2.15.1'
conan profile show -pr:a default | grep -q 'settings'
grep -q token "$(conan config home)/audit_providers.json"
conan config home | grep -q "conan_home"
- name: Validate caching Conan packages
shell: bash
run: |
conan install -r conancenter --requires=asio/1.32.0 --build=missing
docker-test:
runs-on: ubuntu-latest
container:
image: python:3.12-slim
steps:
- uses: actions/checkout@v4
- name: Consume Conan Action
uses: ./
with:
version: "2.15.1"
use_venv: true
cache_packages: 'false'
- name: test conan is available
run: |
conan --version
command -v conan | grep conan-venv
profile-detect-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Consume Conan Action without profile detection
uses: ./
with:
version: "2.15.1"
profile_detect: 'false'
- name: Run Conan version
shell: bash
run: conan --version
- name: Show Conan home location
shell: bash
run: conan config home
- name: Show installed profiles - Expecting to be empty
shell: bash
run: conan profile list | grep -v '^default$'