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",
|
||||
os: windows-2019,
|
||||
compiler:
|
||||
{ type: VISUAL, version: 16, std: 20, cc: "cl", cxx: "cl" },
|
||||
compiler: { type: VISUAL, version: 16, cc: "", cxx: "", std: 20 },
|
||||
}
|
||||
- {
|
||||
name: "Windows MSVC 14.3",
|
||||
os: windows-2022,
|
||||
compiler:
|
||||
{ type: MSVC, version: 193, std: 23, cc: "cl", cxx: "cl" },
|
||||
compiler: { type: MSVC, version: 193, cc: "", cxx: "", std: 23 },
|
||||
}
|
||||
- {
|
||||
name: "Ubuntu GCC-10",
|
||||
@@ -140,17 +138,26 @@ jobs:
|
||||
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"]
|
||||
downcast_mode: ["on", "auto"]
|
||||
|
||||
env:
|
||||
CC: ${{ matrix.config.compiler.cc }}
|
||||
CXX: ${{ matrix.config.compiler.cxx }}
|
||||
|
||||
steps:
|
||||
- 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
|
||||
if: runner.os == 'Linux'
|
||||
with:
|
||||
@@ -199,20 +206,21 @@ jobs:
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install Conan Package Tools
|
||||
- name: Install Conan
|
||||
shell: bash
|
||||
run: |
|
||||
pip install -U conan_package_tools
|
||||
pip install -U conan
|
||||
- name: Configure Conan
|
||||
# TODO Find a proper syntax to make the below work
|
||||
# if: !matrix.config.docker_image
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
conan profile update settings.compiler.libcxx=${{ matrix.config.lib }} default
|
||||
fi
|
||||
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
|
||||
# - name: Add support for clang-13 to Conan's settings.yml
|
||||
# # TODO Remove when Conan will support clang-13
|
||||
@@ -220,21 +228,21 @@ jobs:
|
||||
# shell: bash
|
||||
# run: |
|
||||
# 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
|
||||
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: |
|
||||
if [ ! -z "${{ matrix.config.docker_image }}" ]; then
|
||||
export CONAN_DOCKER_IMAGE=${{ matrix.config.docker_image }}
|
||||
fi
|
||||
python build.py
|
||||
[[ `git tag --contains ${{ github.sha }}` =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && CHANNEL=stable || CHANNEL=testing
|
||||
echo "CHANNEL=${CHANNEL}" >> ${GITHUB_ENV}
|
||||
- name: Create Conan package
|
||||
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