Release 2024.5.0 #552
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master, main ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
build-manylinux: | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
container: ghcr.io/klebert-engineering/manylinux-cpp17-py${{ matrix.python-version }}-x86_64:2024.2 | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
SCCACHE_GHA_ENABLED: "true" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install Conan | |
run: | | |
pip install conan | |
conan profile detect | |
conan remote update --url https://center2.conan.io conancenter | |
- name: Configure | |
run: | | |
python3 -m venv venv && . ./venv/bin/activate | |
pip install -U setuptools wheel pip | |
conan install . -s compiler.cppstd=20 -b missing -b editable \ | |
-o with_wheel=True -o with_service=True -o with_httplib=True | |
cmake --preset conan-release \ | |
-DCMAKE_C_COMPILER_LAUNCHER=sccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ | |
-DMAPGET_ENABLE_TESTING=True \ | |
-DMAPGET_BUILD_EXAMPLES=True \ | |
-GNinja | |
- name: Build | |
run: | | |
. ./venv/bin/activate | |
cmake --build --preset conan-release | |
cd build/Release | |
mv bin/wheel bin/wheel-auditme | |
auditwheel repair bin/wheel-auditme/mapget*.whl -w bin/wheel | |
- name: Test | |
timeout-minutes: 30 | |
run: | | |
. ./venv/bin/activate | |
ctest --preset conan-release -C Release --verbose --no-tests=error | |
- name: Deploy | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mapget-py${{ matrix.python-version }}-ubuntu-latest | |
path: build/Release/bin/wheel/*.whl | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-13, windows-2019] # Currently, macos-latest is macos 12 | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install Conan | |
run: | | |
pip install conan | |
conan profile detect | |
conan remote update --url https://center2.conan.io conancenter | |
- run: python -m pip install setuptools wheel ninja | |
- name: Build (macOS) | |
if: matrix.os == 'macos-13' | |
run: | | |
python -m pip install delocate | |
export MACOSX_DEPLOYMENT_TARGET=10.15 | |
conan install . -s compiler.cppstd=20 -b missing -b editable \ | |
-o with_wheel=True -o with_service=True -o with_httplib=True | |
cmake --preset conan-release \ | |
-DPython3_ROOT_DIR="$pythonLocation" \ | |
-DPython3_FIND_FRAMEWORK=LAST \ | |
-DCMAKE_C_COMPILER_LAUNCHER=sccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ | |
-DMAPGET_ENABLE_TESTING=ON \ | |
-GNinja | |
cmake --build --preset conan-release | |
cd build/Release | |
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: Enable Developer Command Prompt (Windows) | |
uses: ilammy/[email protected] | |
if: matrix.os == 'windows-latest' || matrix.os == 'windows-2019' | |
- name: Build (Windows) | |
if: matrix.os == 'windows-latest' || matrix.os == 'windows-2019' | |
run: | | |
echo "cmake -DPython3_ROOT_DIR=$env:pythonLocation" | |
conan install . -s compiler.cppstd=20 -b missing -b editable ` | |
-o with_wheel=True -o with_service=True -o with_httplib=True | |
cmake --preset conan-default ` | |
"-DPython3_ROOT_DIR=$env:pythonLocation" ` | |
-DPython3_FIND_REGISTRY=LAST ` | |
-DCMAKE_C_COMPILER_LAUNCHER=sccache ` | |
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` | |
-DMAPGET_ENABLE_TESTING=YES ` | |
-DMAPGET_BUILD_EXAMPLES=YES | |
cmake --build --preset conan-release | |
- name: Deploy | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mapget-py${{ matrix.python-version }}-${{ matrix.os }} | |
path: build/**/bin/wheel/*.whl | |
- name: Test | |
timeout-minutes: 30 | |
run: | | |
ctest --preset conan-release -C Release --verbose --no-tests=error |