mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 15:01:16 -03:00
Install Sphinx in macOS CI/CD
Looks like macOS packages didn't have docs?? I noticed via our Cargo warning about sphinx-build. macOS has a variety of pythons installed: bash-3.2$ type -a python python3 python is /Library/Frameworks/Python.framework/Versions/Current/bin/python python3 is /opt/homebrew/bin/python3 python3 is /usr/local/bin/python3 python3 is /Library/Frameworks/Python.framework/Versions/Current/bin/python3 python3 is /usr/bin/python3 by default, "uv --no-managed-python" uses python3 (homebrew), but "python" (and "pip") use the other one. Make uv use the same as our scripts. Not all uv commands support "--python" today, so set UV_PYTHON.
This commit is contained in:
8
.github/actions/install-sphinx/action.yml
vendored
8
.github/actions/install-sphinx/action.yml
vendored
@@ -9,12 +9,14 @@ runs:
|
||||
- shell: bash
|
||||
run: |
|
||||
set -x
|
||||
sudo pip install uv --break-system-packages
|
||||
pip=$(command -v pip pip3 | head -1)
|
||||
sudo "$pip" install uv --break-system-packages
|
||||
# Check that pyproject.toml and the lock file are in sync.
|
||||
# TODO Use "uv" to install Python as well.
|
||||
: 'Note that --no-managed-python below would be implied but be explicit'
|
||||
uv --no-managed-python lock --check
|
||||
uv='env UV_PYTHON=python uv --no-managed-python'
|
||||
$uv lock --check
|
||||
# Install globally.
|
||||
sudo uv --no-managed-python pip install --group=dev --system --break-system-packages
|
||||
sudo $uv pip install --group=dev --system --break-system-packages
|
||||
# Smoke test.
|
||||
python -c 'import sphinx; import sphinx_markdown_builder'
|
||||
|
||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -152,6 +152,7 @@ jobs:
|
||||
targets: aarch64-apple-darwin,x86_64-apple-darwin
|
||||
- name: Install dependencies
|
||||
run: brew install gettext
|
||||
- uses: ./.github/actions/install-sphinx
|
||||
- name: Build and codesign
|
||||
run: |
|
||||
die() { echo >&2 "$*"; exit 1; }
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -136,6 +136,7 @@ jobs:
|
||||
# this is CI so we don't actually care.
|
||||
sudo pip3 install --break-system-packages pexpect
|
||||
brew install gettext tmux
|
||||
- uses: ./.github/actions/install-sphinx
|
||||
- name: cmake
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
@@ -147,6 +148,9 @@ jobs:
|
||||
- name: make fish_run_tests
|
||||
run: |
|
||||
make -C build VERBOSE=1 fish_run_tests
|
||||
- name: Setup tmate session
|
||||
if: ${{ failure() }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
Reference in New Issue
Block a user