forked from mpusz/mp-units
ci: ci-conan no longer uses conan-package-tools
This commit is contained in:
72
.github/workflows/ci-conan.yml
vendored
72
.github/workflows/ci-conan.yml
vendored
@@ -41,14 +41,12 @@ jobs:
|
|||||||
- {
|
- {
|
||||||
name: "Windows MSVC 14.2",
|
name: "Windows MSVC 14.2",
|
||||||
os: windows-2019,
|
os: windows-2019,
|
||||||
compiler:
|
compiler: { type: VISUAL, version: 16, cc: "", cxx: "", std: 20 },
|
||||||
{ type: VISUAL, version: 16, std: 20, cc: "cl", cxx: "cl" },
|
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Windows MSVC 14.3",
|
name: "Windows MSVC 14.3",
|
||||||
os: windows-2022,
|
os: windows-2022,
|
||||||
compiler:
|
compiler: { type: MSVC, version: 193, cc: "", cxx: "", std: 23 },
|
||||||
{ type: MSVC, version: 193, std: 23, cc: "cl", cxx: "cl" },
|
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Ubuntu GCC-10",
|
name: "Ubuntu GCC-10",
|
||||||
@@ -140,17 +138,26 @@ jobs:
|
|||||||
std: 20,
|
std: 20,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
# In case a Conan docker image will be needed to provide a specific configuration we can use a Docker image as follows
|
|
||||||
# - {
|
|
||||||
# name: "Ubuntu GCC 10.2.0",
|
|
||||||
# os: ubuntu-20.04,
|
|
||||||
# compiler: { type: GCC, version: 10, cc: "gcc-10", cxx: "g++-10" },
|
|
||||||
# docker_image: conanio/gcc10
|
|
||||||
# }
|
|
||||||
build_type: ["Release", "Debug"]
|
build_type: ["Release", "Debug"]
|
||||||
downcast_mode: ["on", "auto"]
|
downcast_mode: ["on", "auto"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CC: ${{ matrix.config.compiler.cc }}
|
||||||
|
CXX: ${{ matrix.config.compiler.cxx }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Cache Conan data
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-conan-data
|
||||||
|
with:
|
||||||
|
path: ~/.conan/data
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/metadata.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
- uses: hendrikmuhs/ccache-action@v1
|
- uses: hendrikmuhs/ccache-action@v1
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
with:
|
with:
|
||||||
@@ -199,20 +206,21 @@ jobs:
|
|||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.8"
|
python-version: "3.8"
|
||||||
- name: Install Conan Package Tools
|
- name: Install Conan
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pip install -U conan_package_tools
|
pip install -U conan
|
||||||
- name: Configure Conan
|
- name: Configure Conan
|
||||||
# TODO Find a proper syntax to make the below work
|
|
||||||
# if: !matrix.config.docker_image
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
conan config init
|
conan config init
|
||||||
|
conan remote add upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss
|
||||||
if [[ "${{ matrix.config.compiler.type }}" == "GCC" || "${{ matrix.config.compiler.type }}" == "CLANG" ]]; then
|
if [[ "${{ matrix.config.compiler.type }}" == "GCC" || "${{ matrix.config.compiler.type }}" == "CLANG" ]]; then
|
||||||
conan profile update settings.compiler.libcxx=${{ matrix.config.lib }} default
|
conan profile update settings.compiler.libcxx=${{ matrix.config.lib }} default
|
||||||
fi
|
fi
|
||||||
conan profile update settings.compiler.cppstd=${{ matrix.config.compiler.std }} default
|
conan profile update settings.compiler.cppstd=${{ matrix.config.compiler.std }} default
|
||||||
conan profile update conf.tools.cmake.cmaketoolchain:generator=Ninja default
|
conan profile update settings.build_type=${{ matrix.build_type }} default
|
||||||
|
conan profile update conf.tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" default
|
||||||
conan profile show default
|
conan profile show default
|
||||||
# - name: Add support for clang-13 to Conan's settings.yml
|
# - name: Add support for clang-13 to Conan's settings.yml
|
||||||
# # TODO Remove when Conan will support clang-13
|
# # TODO Remove when Conan will support clang-13
|
||||||
@@ -220,21 +228,21 @@ jobs:
|
|||||||
# shell: bash
|
# shell: bash
|
||||||
# run: |
|
# run: |
|
||||||
# sed -i -e 's/"8", "9", "10", "11", "12"]/"8", "9", "10", "11", "12", "13"]/' ~/.conan/settings.yml
|
# sed -i -e 's/"8", "9", "10", "11", "12"]/"8", "9", "10", "11", "12", "13"]/' ~/.conan/settings.yml
|
||||||
- name: Run Conan Package Tools
|
- name: Set channel
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
CONAN_USERNAME: mpusz
|
|
||||||
CONAN_OPTIONS: mp-units:build_docs=False,mp-units:downcast_mode=${{ matrix.downcast_mode }}
|
|
||||||
CONAN_UPLOAD: https://mpusz.jfrog.io/artifactory/api/conan/conan-oss
|
|
||||||
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
|
|
||||||
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
|
|
||||||
CONAN_CMAKE_GENERATOR: Ninja
|
|
||||||
CONAN_BUILD_TYPES: ${{ matrix.build_type }}
|
|
||||||
CC: ${{ matrix.config.compiler.cc }}
|
|
||||||
CXX: ${{ matrix.config.compiler.cxx }}
|
|
||||||
CONAN_${{ matrix.config.compiler.type }}_VERSIONS: ${{ matrix.config.compiler.version }}
|
|
||||||
run: |
|
run: |
|
||||||
if [ ! -z "${{ matrix.config.docker_image }}" ]; then
|
[[ `git tag --contains ${{ github.sha }}` =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && CHANNEL=stable || CHANNEL=testing
|
||||||
export CONAN_DOCKER_IMAGE=${{ matrix.config.docker_image }}
|
echo "CHANNEL=${CHANNEL}" >> ${GITHUB_ENV}
|
||||||
fi
|
- name: Create Conan package
|
||||||
python build.py
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan create . mpusz/testing -e mp-units:CONAN_RUN_TESTS=True -o mp-units:build_docs=False -o mp-units:downcast_mode=${{ matrix.downcast_mode }} -b mp-units outdated -u
|
||||||
|
- name: Upload mp-units Conan package
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan user ${{ secrets.CONAN_LOGIN_USERNAME }} -r https://mpusz.jfrog.io/artifactory/api/conan/conan-oss -p ${{ secrets.CONAN_PASSWORD }}
|
||||||
|
conan upload "mp-units*" --all -r https://mpusz.jfrog.io/artifactory/api/conan/conan-oss --confirm
|
||||||
|
- name: Remove mp-units package from Conan local cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan remove mp-units -f
|
||||||
|
Reference in New Issue
Block a user