From 577d67b707ec3a6cb267a9ccc780126c56e0235f Mon Sep 17 00:00:00 2001 From: Timothy Weigand <68024672+tmweigand@users.noreply.github.com> Date: Sat, 8 Mar 2025 22:02:48 -0500 Subject: [PATCH 1/2] test with windows --- .github/workflows/jekyll-gh-pages.yml | 51 -------------------------- .github/workflows/tests.yml | 52 +++++++++++++++++---------- 2 files changed, 33 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/jekyll-gh-pages.yml diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml deleted file mode 100644 index 559bddf5..00000000 --- a/.github/workflows/jekyll-gh-pages.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Sample workflow for building and deploying a Jekyll site to GitHub Pages -name: Deploy Jekyll with GitHub Pages dependencies preinstalled - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Pages - uses: actions/configure-pages@v3 - - name: Build with Jekyll - uses: actions/jekyll-build-pages@v1 - with: - source: ./ - destination: ./_site - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1bc97dba..21449e80 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,24 +9,38 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macOS-latest] - python-version: ['3.10', '3.11', '3.12'] + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - if [ "$RUNNER_OS" = "Linux" ]; then - sudo apt update - sudo apt install -y libmpich-dev - elif [ "$RUNNER_OS" = "macOS" ]; then - brew install mpich - fi - python -m pip install --upgrade pip - pip install tox tox-gh-actions - - name: Test with tox - run: tox \ No newline at end of file + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies (Linux/macOS) + if: runner.os != 'Windows' + run: | + if [ "$RUNNER_OS" = "Linux" ]; then + sudo apt update + sudo apt install -y libmpich-dev + elif [ "$RUNNER_OS" = "macOS" ]; then + brew install mpich + fi + python -m pip install --upgrade pip + pip install tox tox-gh-actions + + - name: Install dependencies (Windows) + if: runner.os == 'Windows' + run: | + choco install msmpi + python -m pip install --upgrade pip + pip install tox tox-gh-actions + shell: pwsh + + - name: Test with tox + run: tox -e py$(echo ${{ matrix.python-version }} | tr -d .) + shell: bash From bdb71998021395d129679f9fada78a68ac753394 Mon Sep 17 00:00:00 2001 From: Timothy Weigand <68024672+tmweigand@users.noreply.github.com> Date: Sat, 8 Mar 2025 22:12:53 -0500 Subject: [PATCH 2/2] switch o mpich --- .github/workflows/tests.yml | 3 ++- tox.ini | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 21449e80..bb4a91c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,8 @@ jobs: - name: Install dependencies (Windows) if: runner.os == 'Windows' run: | - choco install msmpi + choco install mpich # Install MPICH on Windows using Chocolatey + refreshenv # Refresh environment variables after installing MPI python -m pip install --upgrade pip pip install tox tox-gh-actions shell: pwsh diff --git a/tox.ini b/tox.ini index 23273733..dbdd4419 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,6 @@ allowlist_externals= mpirun commands = - mpirun --version pytest tests/ mpirun -n 1 python -m pytest tests/ --only-mpi mpirun -n 2 python -m pytest tests/ --only-mpi