Skip to content

Use Conan for External Dependencies #199

Use Conan for External Dependencies

Use Conan for External Dependencies #199

Workflow file for this run

name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ '**' ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.os }}
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Conan
run: |
pip install conan
conan profile detect
- run: python -m pip install setuptools wheel
- run: mkdir build
- name: Build (macOS)
if: matrix.os == 'macos-latest' || matrix.os == 'macos-10.15'
working-directory: build
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
python -m pip install delocate
brew install ninja
export MACOSX_DEPLOYMENT_TARGET=10.15
cmake -DPython3_ROOT_DIR=$pythonLocation \
-DPython3_FIND_FRAMEWORK=LAST \
-DCMAKE_BUILD_TYPE=Release \
-DHTTPLIB_USE_BROTLI_IF_AVAILABLE=OFF \
-GNinja ..
cmake --build .
mv bin/wheel bin/wheel-auditme # Same as on Linux
./_deps/python-cmake-wheel-src/repair-wheel-macos.bash \
"$(pwd)"/bin/wheel-auditme/mapget*.whl \
"$(pwd)"/bin/wheel mapget
- name: Build (Windows)
if: matrix.os == 'windows-latest' || matrix.os == 'windows-2019'
working-directory: build
env:
CMAKE_GENERATOR: "Visual Studio 16 2019"
run: |
echo "cmake -DPython3_ROOT_DIR=$env:pythonLocation"
cmake "-DPython3_ROOT_DIR=$env:pythonLocation" -DPython3_FIND_REGISTRY=LAST -DHTTPLIB_USE_ZLIB_IF_AVAILABLE=OFF -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
- name: Deploy
uses: actions/upload-artifact@v2
with:
name: mapget-py${{ matrix.python-version }}-${{ matrix.os }}
path: build/bin/wheel/*.whl
- name: Test
working-directory: build
run: |
ctest -C Release --verbose --no-test=fail