Skip to content
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

CI testing on OS X #3294

Closed
wants to merge 8 commits into from
Closed
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
72 changes: 72 additions & 0 deletions .github/workflows/osx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Parsl

on:
pull_request:
types:
- opened
- synchronize

jobs:
main-test-suite:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
timeout-minutes: 60

steps:
- uses: actions/checkout@master

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Collect Job Information
id: job-info
run: |
echo "Python Version: ${{ matrix.python-version }}" >> ci_job_info.txt
echo "CI Triggering Event: ${{ github.event_name }}" >> ci_job_info.txt
echo "Triggering Git Ref: ${{ github.ref }}" >> ci_job_info.txt
echo "Triggering Git SHA: ${{ github.sha }}" >> ci_job_info.txt
echo "Workflow Run: ${{ github.run_number }}" >> ci_job_info.txt
echo "Workflow Attempt: ${{ github.run_attempt }}" >> ci_job_info.txt
as_ascii="$(echo "${{ github.ref_name }}" | perl -pe "s/[^A-z0-9-]+/-/g; s/^-+|-+\$//g; s/--+/-/g;")"
echo "as-ascii=$as_ascii" >> $GITHUB_OUTPUT

- name: Non-requirements based install
run: |
brew install mpich

- name: setup virtual env
run: |
python -m venv .venv
source .venv/bin/activate

- name: Install Parsl and dependencies
run: |
source .venv/bin/activate
pip install -r requirements.txt
pip install -r test-requirements.txt

- name: make test
run: |
source .venv/bin/activate
export PARSL_TEST_PRESERVE_NUM_RUNS=7
make test

- name: Documentation checks
run: |
source .venv/bin/activate
pip install .[docs]
brew install pandoc
cd docs
test ! -e stubs
PYTHONPATH=/tmp/cctools/lib/python3.8/site-packages make SPHINXOPTS=-W html
cd ..
! grep ERROR .pytest/parsltest-current/runinfo*/*/database_manager.log
! grep ERROR .pytest/parsltest-current/runinfo*/*/monitoring_router.log
rm -f .pytest/parsltest-current test_runinfo

7 changes: 4 additions & 3 deletions parsl/executors/high_throughput/process_worker_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,10 @@ def worker(
# If desired, set process affinity
if cpu_affinity != "none":
# Count the number of cores per worker
avail_cores = sorted(os.sched_getaffinity(0)) # Get the available threads
cores_per_worker = len(avail_cores) // pool_size
assert cores_per_worker > 0, "Affinity does not work if there are more workers than cores"
if platform.system() == "Linux":
avail_cores = sorted(os.sched_getaffinity(0)) # Get the available threads
cores_per_worker = len(avail_cores) // pool_size
assert cores_per_worker > 0, "Affinity does not work if there are more workers than cores"

# Determine this worker's cores
if cpu_affinity == "block":
Expand Down
Loading