Skip to content
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
97 changes: 10 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ on:
paths-ignore:
- 'README.md'
- 'docs/*.md'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -106,100 +108,22 @@ jobs:
run: |
pixi run autotest-base

- name: Upload failed test output
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}
path: ./autotest/.failed

- name: Print coverage report before upload
- name: Run scheduled tests on MacOS and Linux with all compilers but intel-classic
if: ${{ github.event_name == 'schedule' && (runner.os != 'Windows' || matrix.compiler != 'intel-classic') }}
run: |
pixi run coverage-report

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./autotest/coverage.xml

pymake-schedule:
name: pymake scheduled
if: github.event_name == 'schedule'
runs-on: matrix.os
strategy:
fail-fast: false
matrix:
include:
# test latest gcc and python
- {os: ubuntu-latest, compiler: gcc, version: 13, shell: bash}
- {os: macos-latest, compiler: gcc, version: 13, shell: bash}
- {os: windows-latest, compiler: gcc, version: 13, shell: pwsh}
# test latest python and intel
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.7, shell: bash}
- {os: macos-13, compiler: intel-classic, version: 2021.7, shell: bash}
- {os: windows-2022, compiler: intel-classic, version: 2021.7, shell: pwsh}
defaults:
run:
shell: matrix.shell
pixi run autotest-schedule

steps:
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- name: Checkout repo
uses: actions/checkout@v5

- uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS' && matrix.compiler == 'intel-classic'
with:
xcode-version: "14.3.1"

- name: Setup Graphviz on Linux
if: runner.os == 'Linux'
uses: ts-graphviz/setup-graphviz@v2

- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: v0.42.1
manifest-path: "pixi.toml"

- name: pixi post-install
working-directory: pymake
- name: Run scheduled tests on Windows with intel-classic compiler
if: ${{ github.event_name == 'schedule' && runner.os == 'Windows' && matrix.compiler == 'intel-classic' }}
run: |
pixi run postinstall

- name: Setup ${{ matrix.compiler }} ${{ matrix.version }} on ${{ matrix.os }}
uses: fortran-lang/setup-fortran@v1
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}

- name: Run scheduled tests on ${{ matrix.os }} with ${{ matrix.compiler }}
if: runner.os != 'Windows' || matrix.compiler != 'intel-classic'
run: pixi run autotest-schedule
pixi run autotest-schedule --exclude gridgen

- name: Run scheduled tests on ${{ matrix.os }} with ${{ matrix.compiler }}
if: runner.os == 'Windows' && matrix.compiler == 'intel-classic'
run: pixi run autotest-schedule --exclude gridgen

- name: Upload failed test output
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-schedule-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}
path: autotest/.failed
name: failed-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}
path: ./autotest/.failed

- name: Print coverage report before upload
run: |
Expand All @@ -212,4 +136,3 @@ jobs:
with:
file: ./autotest/coverage.xml


2 changes: 1 addition & 1 deletion pymake/utils/_compiler_switches.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ def _set_cflags(target, cc="gcc", argv=True, osname=None, verbose=False):
if cc.startswith("g"):
cflags += ["-lm"]
else:
cflags += ["-DNO_TIMER"]
cflags += ["-DNO_TIMER", "-DCPU86", "-DWINDOWS"]
elif target == "gridgen":
if osname in ("linux", "darwin"):
if cc.startswith("i"):
Expand Down
15 changes: 11 additions & 4 deletions pymake/utils/_usgs_src_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,20 @@ def _update_triangle_files(srcdir, fc, cc, arch, double):
# modify long to long long on windows
if "win32" in sys.platform.lower() and cc in ("icl", "cl"):
src = os.path.join(srcdir, "triangle.c")
updateSource = True
with open(src, "r") as f:
lines = f.readlines()
for idx, line in enumerate(lines):
lines[idx] = line.replace("unsigned long", "unsigned long long")
with open(src, "w") as f:
for line in lines:
f.write(line)
if "unsigned_long" in line:
updateSource = False
break
if updateSource:
for idx, line in enumerate(lines):
lines[idx] = line.replace("unsigned long", "unsigned long long")
if updateSource:
with open(src, "w") as f:
for line in lines:
f.write(line)
return


Expand Down
2 changes: 1 addition & 1 deletion pymake/utils/usgsprograms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mp7 , 7.2.001 , True , https://water.usgs.gov/water-resources/soft
mt3dms , 5.3.0 , True , https://github.com/MODFLOW-ORG/mt3dms/releases/download/2.0/mt3dms-2.0.zip , mt3dms-2.0 , true-binary , True , False , False
mt3dusgs , 1.1.0 , True , https://github.com/MODFLOW-ORG/mt3d-usgs/releases/download/1.1.0/mt3dusgs1.1.0.zip , mt3dusgs1.1.0 , src , True , False , False
vs2dt , 3.3 , True , https://water.usgs.gov/water-resources/software/VS2DI/vs2dt3_3.zip , vs2dt3_3 , include , True , False , False
triangle , 1.6 , True , https://github.com/MODFLOW-ORG/triangle/releases/download/1.0/triangle-1.0.zip , triangle-1.0 , src , True , False , False
triangle , 1.6 , True , https://github.com/MODFLOW-ORG/triangle/releases/download/latest_build/triangle_source.zip , . , src , True , False , False
gridgen , 1.0.02 , True , https://github.com/MODFLOW-ORG/gridgen/releases/download/1.0.02/gridgen-1.0.02.zip , gridgen-1.0.02 , src , True , False , False
crt , 1.3.1 , True , https://water.usgs.gov/ogw/CRT/CRT_1.3.1.zip , CRT_1.3.1 , SOURCE , True , False , False
sutra , 4.0 , True , https://water.usgs.gov/water-resources/software/sutra/4.0/SUTRA_4_0_0.zip , SutraSuite , SUTRA_4_0/source , True , False , False
Expand Down
Loading