Skip to content

(fix) enable nearly all lint rules #103

(fix) enable nearly all lint rules

(fix) enable nearly all lint rules #103

Workflow file for this run

name: Build
on:
push:
branches:
- "**"
paths:
- "CMakeLists.txt"
- "pyproject.toml"
- "vcpkg.json"
- "README.md"
- "COPYING"
- "src"
- "tests"
- ".github/workflows/build.yml"
# only run on branch push
# ignore changes to docs
# ignore changes to CI files except for this one
jobs:
build_sdist:
if: ${{ github.event_name == 'push' }}
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Build SDist
run: pipx run build --sdist
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sdist
path: ./dist/*.tar.gz
build_wheels:
name: Build wheels
strategy:
matrix:
os: [windows-2022, macos-14, ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Get CMake
uses: lukka/[email protected]
- name: Setup build tools on macOS
run: brew install automake autoconf libtool
if: ${{ runner.os == 'macos' }}
- name: Set deployment target on macOS
run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d '.' -f 1-2)" >> "$GITHUB_ENV"
if: ${{ runner.os == 'macos' }}
- name: Get vcpkg commit ID from manifest
shell: bash
run: |
{
echo 'vcpkg_json<<EOF'
cat vcpkg.json
echo 'EOF'
} >> "$GITHUB_ENV"
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ fromJson(env.vcpkg_json).builtin-baseline }}
runVcpkgInstall: false
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: auto64
CIBW_SKIP: "pp* *-musllinux_*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT_PASS_LINUX: CI
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
# We need rustup to build phimaker from source if necessary
CIBW_BEFORE_ALL_LINUX: dnf install -y zip && curl -sSf https://sh.rustup.rs | sh -s -- -y
CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH"
CIBW_TEST_COMMAND: pytest {package}/tests
CIBW_TEST_REQUIRES: pytest~=8.2
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
merge_artifacts:
name: Merge wheel artifacts
needs: build_wheels
runs-on: ubuntu-latest
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: wheels
pattern: wheels-*
delete-merged: true