diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index df191d65..58cb4eaa 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -5,6 +5,9 @@ on: pull_request: branches: [ master ] + schedule: + - cron: '15 14 4,11,18,25 * *' + env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release @@ -56,7 +59,7 @@ jobs: arch: x64 - name: CTest - run: ctest -S ctest.cmake -V --output-on-failure + run: ctest -S ctest.cmake -V --output-on-failure --timeout 900 - name: Upload results uses: actions/upload-artifact@v3 @@ -75,9 +78,18 @@ jobs: repository: usgs-coupled-subtrees/phreeqc3-HTMLversion ref: master + - name: cache htmlhelp + id: cache-htmlhelp + uses: actions/cache@v3 + with: + path: "C:/Program Files (x86)/HTML Help Workshop" + key: ${{ runner.os }}-htmlhelp + - name: install htmlhelp + if: steps.cache-htmlhelp.outputs.cache-hit != 'true' + timeout-minutes: 5 run: | - curl -L -O http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe + curl -L -O --max-time 120 http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe cmd /c start /wait .\htmlhelp.exe /q /c /t:$(Get-Location)\tmp $file = "$(Get-Location)\tmp\htmlhelp.inf" (Get-Content $file) | Foreach-Object { $_ ` @@ -158,6 +170,11 @@ jobs: needs: roxygen2, pkgbuild, check working-directory: R/phreeqc + - name: Display sessionInfo() + run: sessionInfo() + working-directory: R/phreeqc + shell: Rscript {0} + - name: roxygen2::roxygenise() run: roxygen2::roxygenise() working-directory: R/phreeqc @@ -181,6 +198,7 @@ jobs: name: cran path: ${{ github.workspace }}/R/phreeqc/check/phreeqc_*.tar.gz + # r-build: # needs: [init] # runs-on: ubuntu-latest @@ -214,6 +232,7 @@ jobs: # name: cran # path: ${{github.workspace}}/R/phreeqc_*.tar.gz + # r-valgrind: # needs: [r-build] # runs-on: ubuntu-latest @@ -259,6 +278,7 @@ jobs: # name: valgrind # path: ${{github.workspace}}/R/valgrind.full.out + distcheck: needs: [init, chm] runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 01e36937..c57ae923 100644 --- a/.gitignore +++ b/.gitignore @@ -211,4 +211,5 @@ doc/RELEASE /unit/x64 # builds (folders beginning with _ (underscore) -/_* \ No newline at end of file +**/_*/** +**/.vshistory/** diff --git a/phreeqc3-examples/CMakeLists.txt b/phreeqc3-examples/CMakeLists.txt index 46fcfe2e..ef1dc5bb 100644 --- a/phreeqc3-examples/CMakeLists.txt +++ b/phreeqc3-examples/CMakeLists.txt @@ -275,12 +275,18 @@ add_test(NAME examples.ex22 COMMAND $ ${PROJECT_SOURCE_DIR}/examples/ex22 ex22.out ${PROJECT_SOURCE_DIR}/database/phreeqc.dat ex22.log ) -# these take more than 600 seconds -set(SKIP +# Note when setting labels we can't use the following: +# set_tests_properties(${test} PROPERTIES LABELS "pitzer") +# since it will overwrite any existing labels already set + +# long_debug +# > 600 seconds Debug +set(LONG_DEBUG examples.ex21 ) -# disable tests that take too long -foreach(test ${SKIP}) - set_tests_properties(${test} PROPERTIES DISABLED TRUE) +# label tests that take too long +foreach(test ${LONG_DEBUG}) + set_property(TEST ${test} APPEND PROPERTY LABELS "long_debug") + set_property(TEST ${test} APPEND PROPERTY LABELS "long_memcheck") endforeach() diff --git a/src/phreeqcpp/PBasic.cpp b/src/phreeqcpp/PBasic.cpp index 7233f91c..99b4661d 100644 --- a/src/phreeqcpp/PBasic.cpp +++ b/src/phreeqcpp/PBasic.cpp @@ -3610,7 +3610,7 @@ factor(struct LOC_exec * LINK) std::string std_num; { - snprintf(token, sizeof(token), "%*.*e", length, width, nmbr); + snprintf(token, max_length, "%*.*e", length, width, nmbr); std_num = token; } @@ -3653,7 +3653,7 @@ factor(struct LOC_exec * LINK) std::string std_num; { - snprintf(token, sizeof(token), "%*.*f", length, width, nmbr); + snprintf(token, max_length, "%*.*f", length, width, nmbr); std_num = token; } diff --git a/src/phreeqcpp/basicsubs.cpp b/src/phreeqcpp/basicsubs.cpp index 3e93470b..69eed0ed 100644 --- a/src/phreeqcpp/basicsubs.cpp +++ b/src/phreeqcpp/basicsubs.cpp @@ -2097,7 +2097,6 @@ match_elts_in_species(const char *name, const char *mytemplate) * write out string */ token[0] = '\0'; - assert(MAX_LENGTH == sizeof(token1)); for (i = 0; i < count_match_tokens; i++) { strcat(token, match_vector[i].first.c_str());