Revert, give up on runner.os conditional in .github/workflows/python-… #13
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: Python Wheels (vcpkg build) | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
build_wheels: | ||
name: ${{ github.workflow }} Python build wheel on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Free disk space | ||
shell: bash | ||
run: | | ||
if [ "${RUNNER_OS}" == "Linux" ]; then | ||
df -h | ||
echo "Cleaning..." | ||
[ -e "/usr/share/dotnet" ] && sudo rm -rf "/usr/share/dotnet" | ||
[ -e "/opt/ghc" ] && sudo rm -rf "/opt/ghc" | ||
[ -e "/usr/local/share/boost" ] && sudo rm -rf "/usr/local/share/boost" | ||
[ -e "${AGENT_TOOLSDIRECTORY}" ] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}" | ||
echo "Cleaning...done." | ||
df -h | ||
fi | ||
- name: Install OS tools | ||
shell: bash | ||
run: | | ||
if [ "$RUNNER_OS" == "macOS" ]; then | ||
brew install autoconf automake libtool | ||
fi | ||
- name: Install cmake and ninja (via get-cmake) | ||
uses: lukka/get-cmake@latest | ||
shell: bash | ||
Check failure on line 46 in .github/workflows/python-wheel-vcpkg.yml GitHub Actions / Python Wheels (vcpkg build)Invalid workflow file
|
||
- name: Restore artifacts, or setup vcpkg for building artifacts | ||
shell: bash | ||
uses: lukka/run-vcpkg@v11 | ||
with: | ||
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch. | ||
vcpkgDirectory: '${{ runner.workspace }}/vcpkg' | ||
# The Git commit id of vcpkg to be checked out. This is only needed because we are not using a submodule. | ||
vcpkgGitCommitId: "c8696863d371ab7f46e213d8f5ca923c4aef2a00" | ||
# The vcpkg.json file, which will be part of cache key computation. | ||
vcpkgJsonGlob: '**/vcpkg.json' | ||
id: runvcpkg | ||
- name: Prints output of run-vcpkg's action. | ||
shell: bash | ||
run: | | ||
echo "VCPKG_ROOT=${VCPKG_ROOT}" | ||
echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' " | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install cibuildwheel | ||
shell: bash | ||
run: | | ||
python -m pip install cibuildwheel==2.16.2 | ||
if [ "${RUNNER_OS}" == "Linux" ]; then | ||
df -h | ||
fi | ||
- name: Build wheels | ||
shell: bash | ||
run: | | ||
echo "VCPKG_ROOT=${VCPKG_ROOT}" | ||
python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_ENVIRONMENT_LINUX: "CMAKE_FETCH_VCPKG=ON" | ||
# vcpkg does not support i686 nor aarch64 | ||
CIBW_ARCHS: "auto64" | ||
# Skip musllinux builds | ||
CIBW_SKIP: "*-musllinux_*" | ||
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*" | ||
# Don't repair macOS wheels | ||
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" | ||
CIBW_BEFORE_BUILD_WINDOWS: "python -m pip install cmake" | ||
CIBW_BEFORE_BUILD_LINUX: "df -h" | ||
CIBW_BEFORE_ALL_LINUX: "/usr/bin/yum install --assumeyes --verbose zip unzip tar cmake" | ||
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28" | ||
# Run the package tests using `pytest` | ||
CIBW_TEST_COMMAND: "python -m pyemblite.test -fv" | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
# name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
name: cibw-wheels-${{ matrix.os }} | ||
path: ./wheelhouse/*.whl | ||
retention-days: 10 | ||
build_sdist: | ||
name: Build python sdist | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: lukka/get-cmake@latest | ||
name: Install cmake and ninja (via get-cmake) | ||
- name: Restore artifacts, or setup vcpkg for building artifacts | ||
uses: lukka/run-vcpkg@v11 | ||
with: | ||
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch. | ||
vcpkgDirectory: '${{ runner.workspace }}/vcpkg' | ||
# The Git commit id of vcpkg to be checked out. This is only needed because we are not using a submodule. | ||
vcpkgGitCommitId: "c8696863d371ab7f46e213d8f5ca923c4aef2a00" | ||
# The vcpkg.json file, which will be part of cache key computation. | ||
vcpkgJsonGlob: '**/vcpkg.json' | ||
id: runvcpkg | ||
- name: Prints output of run-vcpkg's action. | ||
run: | | ||
echo "VCPKG_ROOT=${VCPKG_ROOT}" | ||
echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' " | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install sdist build dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install "Cython" "numpy" "wheel" "setuptools>=42" "versioneer[toml]" "scikit-build" "cmake" "ninja" | ||
- name: Create python sdist | ||
run: python setup.py sdist --formats=gztar,zip | ||
- name: Upload python sdist | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: ./dist/* | ||
release: | ||
name: Make a Release | ||
needs: [build_sdist, build_wheels] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download python sdist and wheels | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: ./release_artifacts/ | ||
merge-multiple: true | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ./release_artifacts/* |