From 82ef6b70a061089df201ff1de54bb923c3e73676 Mon Sep 17 00:00:00 2001 From: Konstantin Chernyshev Date: Tue, 14 May 2024 22:52:38 +0200 Subject: [PATCH] ci: add separate step for macos with venv --- .github/workflows/publish.yml | 6 ++---- .github/workflows/test.yml | 9 ++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 94a6a11..dc09fef 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -57,10 +57,8 @@ jobs: steps: - name: Build wheel run: | - python3 -m venv .venv - source .venv/bin/activate - python3 -m pip install --upgrade build wheel setuptools - python3 -m build --wheel --sdist --outdir ./dist --no-isolation + python3 -m pip install --upgrade build + python3 -m build --wheel --sdist --outdir ./dist - uses: pypa/gh-action-pypi-publish@release/v1 sync-to-hf-hub: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e73edf..422d5a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,12 +56,15 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Build wheel + - name: Make venv for macos to cover "error externally-managed-environment" + if: startsWith(matrix.os, 'macos') run: | python3 -m venv .venv source .venv/bin/activate - python3 -m pip install --upgrade build wheel setuptools - python3 -m build --wheel --sdist --outdir ./dist --no-isolation + - name: Build wheel + run: | + python3 -m pip install --upgrade build + python3 -m build --wheel --sdist --outdir ./dist - name: Show dist files run: ls -lah ./dist shell: bash