Skip to content

Macos ci #1339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ jobs:
env:
GH_TOKEN: ${{github.token}}
if: steps.release.outputs.release_created

distcheck-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: env PYTESTFLAGS="--verbose -p no:cacheprovider --color=yes" test/macos-script.sh
26 changes: 26 additions & 0 deletions test/macos-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh -eux

# Note that this script is intended to be run only in throwaway environments;
# it may install undesirable things to system locations (if it succeeds in
# that).

brew install \
automake \
bash

oldpwd=$(pwd)

python3 -m venv venv
#shellcheck disable=SC1091
source venv/bin/activate
python3 -m pip install -r test/requirements.txt

export bashcomp_bash=bash
env

autoreconf -i
./configure
make -j

make distcheck \
PYTESTFLAGS="${PYTESTFLAGS---verbose -p no:cacheprovider --numprocesses=auto --dist=loadfile}"
4 changes: 3 additions & 1 deletion test/t/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,9 @@ def prepare_fixture_dir(
the tarball. This is to work better with case insensitive file systems.
"""
tempdir = Path(tempfile.mkdtemp(prefix="bash-completion-fixture-dir"))
request.addfinalizer(lambda: shutil.rmtree(str(tempdir)))
request.addfinalizer(
lambda: shutil.rmtree(str(tempdir), ignore_errors=True)
)

old_cwd = os.getcwd()
try:
Expand Down
Loading