From 6e67ba6e9408578aae147b44cdc30906da21a008 Mon Sep 17 00:00:00 2001 From: ssolson Date: Sat, 4 May 2024 10:29:01 -0600 Subject: [PATCH 1/6] use same logic in hindcast conda as conda build --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fdd4a1651..710c5fb19 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -315,15 +315,16 @@ jobs: with: miniconda-version: 'latest' auto-update-conda: true + environment-file: environment.yml activate-environment: TEST python-version: ${{ matrix.python-version }} - use-only-tar-bz2: true + use-only-tar-bz2: false - name: Setup Conda environment shell: bash -l {0} run: | - conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4 coverage --strict-channel-priority - pip install -e . --no-deps --force-reinstall + conda install -c conda-forge pytest coverage=7.5.0 coveralls --strict-channel-priority + pip install -e . --force-reinstall - name: Download Wave Hindcast data from artifact uses: actions/download-artifact@v4 @@ -347,8 +348,6 @@ jobs: - name: Install MHKiT and run pytest shell: bash -l {0} run: | - python -m pip install --upgrade pip wheel - pip install coveralls . coverage run --rcfile=.github/workflows/.coveragehindcastrc -m pytest -c .github/workflows/pytest-hindcast.ini coverage lcov From 28a19b8483740ebdd89a7d3f2883cd5b8a5d9520 Mon Sep 17 00:00:00 2001 From: ssolson Date: Sat, 4 May 2024 10:56:16 -0600 Subject: [PATCH 2/6] temp always run hindcast --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 710c5fb19..c26e82dbf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -297,7 +297,7 @@ jobs: prepare-wind-hindcast-cache, set-os, ] - if: (needs.check-changes.outputs.should-run-hindcast == 'true') + # if: (needs.check-changes.outputs.should-run-hindcast == 'true') runs-on: ${{ matrix.os }} strategy: From e035dcea8aba03f7a836eb2ccc89f8c37035914a Mon Sep 17 00:00:00 2001 From: ssolson Date: Sat, 4 May 2024 10:57:50 -0600 Subject: [PATCH 3/6] temp run all os --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c26e82dbf..d8eeedc93 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - id: set-matrix run: | if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "develop" ]]; then - echo "matrix_os=[\"ubuntu-latest\"]" >> $GITHUB_OUTPUT + echo "matrix_os=[\"windows-latest\", \"ubuntu-latest\", \"macos-latest\"]" >> $GITHUB_OUTPUT else echo "matrix_os=[\"windows-latest\", \"ubuntu-latest\", \"macos-latest\"]" >> $GITHUB_OUTPUT fi @@ -96,7 +96,7 @@ jobs: runs-on: ubuntu-latest env: PYTHON_VER: 3.9 - if: (needs.check-changes.outputs.should-run-hindcast == 'true') + # if: (needs.check-changes.outputs.should-run-hindcast == 'true') steps: - name: Checkout code uses: actions/checkout@v4 @@ -138,7 +138,7 @@ jobs: runs-on: ubuntu-latest env: PYTHON_VER: 3.9 - if: (needs.check-changes.outputs.should-run-hindcast == 'true') + # if: (needs.check-changes.outputs.should-run-hindcast == 'true') steps: - name: Checkout code uses: actions/checkout@v4 From 02481bc863ea7ed9b1caccbc6fe605fb887a10da Mon Sep 17 00:00:00 2001 From: ssolson Date: Sat, 4 May 2024 20:54:22 -0600 Subject: [PATCH 4/6] hindcast wave waits on wind --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d8eeedc93..044b7941a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -134,7 +134,7 @@ jobs: path: ~/.cache/mhkit prepare-wind-hindcast-cache: - needs: [check-changes] + needs: [check-changes, prepare-wave-hindcast-cache] runs-on: ubuntu-latest env: PYTHON_VER: 3.9 From 58aec5bc0679e7baf6ee196d4834cd3bf3e8bf9a Mon Sep 17 00:00:00 2001 From: ssolson Date: Sun, 5 May 2024 10:25:45 -0600 Subject: [PATCH 5/6] only ubuntu --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 044b7941a..c53a62adc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - id: set-matrix run: | if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "develop" ]]; then - echo "matrix_os=[\"windows-latest\", \"ubuntu-latest\", \"macos-latest\"]" >> $GITHUB_OUTPUT + echo "matrix_os=[ \"ubuntu-latest\"]" >> $GITHUB_OUTPUT else echo "matrix_os=[\"windows-latest\", \"ubuntu-latest\", \"macos-latest\"]" >> $GITHUB_OUTPUT fi From a7bd4a7023408df2a8bfb71a8c092fdf9d81a04b Mon Sep 17 00:00:00 2001 From: ssolson Date: Sun, 5 May 2024 10:26:30 -0600 Subject: [PATCH 6/6] hindcast only on changes to hindcast --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c53a62adc..c02c060dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -96,7 +96,7 @@ jobs: runs-on: ubuntu-latest env: PYTHON_VER: 3.9 - # if: (needs.check-changes.outputs.should-run-hindcast == 'true') + if: (needs.check-changes.outputs.should-run-hindcast == 'true') steps: - name: Checkout code uses: actions/checkout@v4 @@ -138,7 +138,7 @@ jobs: runs-on: ubuntu-latest env: PYTHON_VER: 3.9 - # if: (needs.check-changes.outputs.should-run-hindcast == 'true') + if: (needs.check-changes.outputs.should-run-hindcast == 'true') steps: - name: Checkout code uses: actions/checkout@v4 @@ -297,7 +297,7 @@ jobs: prepare-wind-hindcast-cache, set-os, ] - # if: (needs.check-changes.outputs.should-run-hindcast == 'true') + if: (needs.check-changes.outputs.should-run-hindcast == 'true') runs-on: ${{ matrix.os }} strategy: