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

Updated pip-install to upload macOS artifacts to PyPi. #313

Merged
merged 1 commit into from
Sep 6, 2024
Merged
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
30 changes: 21 additions & 9 deletions .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, macos-14]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
exclude:
- os: ubuntu-22.04
python-version: '3.6'
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, macos-14]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
exclude:
- os: ubuntu-22.04
python-version: '3.6'
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, macos-14]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
exclude:
- os: ubuntu-22.04
python-version: '3.6'
Expand All @@ -105,7 +105,7 @@ jobs:
- os: macos-14
python-version: '3.7'
fail-fast: false

steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -117,9 +117,21 @@ jobs:
name: sdist-${{ matrix.os }}-${{ matrix.python-version }}
path: dist

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install twine

- name: Upload to PyPI
if: github.repository == 'VirtualPlanetaryLaboratory/vplanet'
run: python -m twine upload dist/* wheelhouse/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}

# Only push to PyPI if we're on the public repo!
- uses: pypa/gh-action-pypi-publish@release/v1
if: (!github.event.release.prerelease) && github.event_name == 'release' && github.event.action == 'published' && github.repository == 'VirtualPlanetaryLaboratory/vplanet'
with:
user: __token__
password: ${{ secrets.pypi_password }}
# - uses: pypa/gh-action-pypi-publish@release/v1
# if: (!github.event.release.prerelease) && github.event_name == 'release' && github.event.action == 'published' && github.repository == 'VirtualPlanetaryLaboratory/vplanet'
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}
1 change: 0 additions & 1 deletion .github/workflows/tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:

- name: Check test output created
id: check_test_file
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' }}
uses: andstor/file-existence-action@v3
with:
files: "${{ github.workspace }}/junit/test-results.xml"
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ legacy:
@echo "=========================================================================================================="

debug:
-gcc -g -D DEBUG -o bin/vplanet src/*.c -lm -DGITVERSION=\"$(GITVERSION)\"
-gcc -g -D DEBUG -Wunused-but-set-variable -Wunused-variable -Wfloat-equal -o bin/vplanet src/*.c -lm -DGITVERSION=\"$(GITVERSION)\"

debug_no_AE:
-gcc -g -o bin/vplanet src/*.c -lm -DGITVERSION=\"$(GITVERSION)\"
Expand All @@ -51,6 +51,9 @@ opt:
cpp:
g++ -o bin/vplanet src/*.c -lm -O3 -fopenmp -fpermissive -w -DGITVERSION=\"$(GITVERSION)\"

warnings:
clang -Weverything src/*.c -lm -O3 -DGITVERSION=\"$(GITVERSION)\"

parallel:
gcc -o bin/vplanet src/*.c -lm -O3 -fopenmp -DGITVERSION=\"$(GITVERSION)\"

Expand Down
4 changes: 2 additions & 2 deletions src/evolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ double fdGetTimeStep(BODY *body, CONTROL *control, SYSTEM *system,
update[iBody].daDerivProc[iVar][iEqn] =
fnUpdate[iBody][iVar][iEqn](
body, system, update[iBody].iaBody[iVar][iEqn]);
if (!bFloatComparison(update[iBody].daDerivProc[iVar][iEqn],
if (!fbFloatComparison(update[iBody].daDerivProc[iVar][iEqn],
0.0) &&
!bFloatComparison(*(update[iBody].pdVar[iVar]), 0.0)) {
!fbFloatComparison(*(update[iBody].pdVar[iVar]), 0.0)) {
dMinNow = fabs((*(update[iBody].pdVar[iVar])) /
update[iBody].daDerivProc[iVar][iEqn]);
if (dMinNow < dMin) {
Expand Down
2 changes: 1 addition & 1 deletion src/verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

/*! Check to see if two decimals numbers are equal (1) or not (0) */
int bFloatComparison(double x, double y) {
int fbFloatComparison(double x, double y) {
double dBigger;
double dRel_Tol;
if (fabs(x) > fabs(y)) {
Expand Down
2 changes: 1 addition & 1 deletion src/verify.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void VerifyTripleExit(char[], char[], char[], int, int, int, char[], int);
void VerifyOptions(BODY *, CONTROL *, FILES *, MODULE *, OPTIONS *, OUTPUT *,
SYSTEM *, UPDATE *, fnIntegrate *, fnUpdateVariable ****);
void VerifyDynEllip(BODY *, CONTROL *, OPTIONS *, char[], int, int);
int bFloatComparison(double, double);
int fbFloatComparison(double, double);
void fnNullDerivatives(BODY *, EVOLVE *, MODULE *, UPDATE *,
fnUpdateVariable ***);

Expand Down
Loading