-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,21 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get pip flags based on version | ||
id: python-version | ||
shell: bash -el {0} | ||
run: | | ||
MODERN_PIP=$(python3 -c "import sys; t = sys.version_info >= (3, 11, 0); sys.stdout.write(str(t))") | ||
if [ ${MODERN_PIP} == "True" ]; then | ||
FLAGS="--break-system-packages --check-build-dependencies" | ||
else | ||
FLAGS="" | ||
python3 -m pip install --upgrade pip | ||
fi | ||
echo "PYTHON_FLAGS=${FLAGS}" >> "$GITHUB_OUTPUT" | ||
- name: Update pip | ||
run: python3 -m pip install --break-system-packages --upgrade pip setuptools | ||
run: python3 -m pip install ${{ steps.python-version.outputs.PYTHON_FLAGS}} --upgrade pip setuptools | ||
|
||
- name: Install DOLFINx | ||
uses: jorgensd/actions/[email protected] | ||
|
@@ -72,7 +85,7 @@ jobs: | |
path: ./legacy_checkpoint | ||
|
||
- name: Install package | ||
run: python3 -m pip install --break-system-packages .[test] | ||
run: python3 -m pip install ${{ steps.python-version.outputs.PYTHON_FLAGS}} .[test] | ||
|
||
- name: Run tests | ||
run: | | ||
|