Merge pull request #17 from usgs-coupled/master

Sync develop with master
This commit is contained in:
Charlton, Scott R 2023-01-29 19:19:57 -07:00 committed by GitHub
commit b67b914220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 11 deletions

View File

@ -5,6 +5,9 @@ on:
pull_request: pull_request:
branches: [ master ] branches: [ master ]
schedule:
- cron: '15 14 4,11,18,25 * *'
env: env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release BUILD_TYPE: Release
@ -56,7 +59,7 @@ jobs:
arch: x64 arch: x64
- name: CTest - 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 - name: Upload results
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@ -75,9 +78,18 @@ jobs:
repository: usgs-coupled-subtrees/phreeqc3-HTMLversion repository: usgs-coupled-subtrees/phreeqc3-HTMLversion
ref: master 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 - name: install htmlhelp
if: steps.cache-htmlhelp.outputs.cache-hit != 'true'
timeout-minutes: 5
run: | 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 cmd /c start /wait .\htmlhelp.exe /q /c /t:$(Get-Location)\tmp
$file = "$(Get-Location)\tmp\htmlhelp.inf" $file = "$(Get-Location)\tmp\htmlhelp.inf"
(Get-Content $file) | Foreach-Object { $_ ` (Get-Content $file) | Foreach-Object { $_ `
@ -158,6 +170,11 @@ jobs:
needs: roxygen2, pkgbuild, check needs: roxygen2, pkgbuild, check
working-directory: R/phreeqc working-directory: R/phreeqc
- name: Display sessionInfo()
run: sessionInfo()
working-directory: R/phreeqc
shell: Rscript {0}
- name: roxygen2::roxygenise() - name: roxygen2::roxygenise()
run: roxygen2::roxygenise() run: roxygen2::roxygenise()
working-directory: R/phreeqc working-directory: R/phreeqc
@ -181,6 +198,7 @@ jobs:
name: cran name: cran
path: ${{ github.workspace }}/R/phreeqc/check/phreeqc_*.tar.gz path: ${{ github.workspace }}/R/phreeqc/check/phreeqc_*.tar.gz
# r-build: # r-build:
# needs: [init] # needs: [init]
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
@ -214,6 +232,7 @@ jobs:
# name: cran # name: cran
# path: ${{github.workspace}}/R/phreeqc_*.tar.gz # path: ${{github.workspace}}/R/phreeqc_*.tar.gz
# r-valgrind: # r-valgrind:
# needs: [r-build] # needs: [r-build]
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
@ -259,6 +278,7 @@ jobs:
# name: valgrind # name: valgrind
# path: ${{github.workspace}}/R/valgrind.full.out # path: ${{github.workspace}}/R/valgrind.full.out
distcheck: distcheck:
needs: [init, chm] needs: [init, chm]
runs-on: ubuntu-latest runs-on: ubuntu-latest

3
.gitignore vendored
View File

@ -211,4 +211,5 @@ doc/RELEASE
/unit/x64 /unit/x64
# builds (folders beginning with _ (underscore) # builds (folders beginning with _ (underscore)
/_* **/_*/**
**/.vshistory/**

View File

@ -275,12 +275,18 @@ add_test(NAME examples.ex22
COMMAND $<TARGET_FILE:phreeqc> ${PROJECT_SOURCE_DIR}/examples/ex22 ex22.out ${PROJECT_SOURCE_DIR}/database/phreeqc.dat ex22.log COMMAND $<TARGET_FILE:phreeqc> ${PROJECT_SOURCE_DIR}/examples/ex22 ex22.out ${PROJECT_SOURCE_DIR}/database/phreeqc.dat ex22.log
) )
# these take more than 600 seconds # Note when setting labels we can't use the following:
set(SKIP # 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 examples.ex21
) )
# disable tests that take too long # label tests that take too long
foreach(test ${SKIP}) foreach(test ${LONG_DEBUG})
set_tests_properties(${test} PROPERTIES DISABLED TRUE) set_property(TEST ${test} APPEND PROPERTY LABELS "long_debug")
set_property(TEST ${test} APPEND PROPERTY LABELS "long_memcheck")
endforeach() endforeach()

View File

@ -3610,7 +3610,7 @@ factor(struct LOC_exec * LINK)
std::string std_num; std::string std_num;
{ {
snprintf(token, sizeof(token), "%*.*e", length, width, nmbr); snprintf(token, max_length, "%*.*e", length, width, nmbr);
std_num = token; std_num = token;
} }
@ -3653,7 +3653,7 @@ factor(struct LOC_exec * LINK)
std::string std_num; std::string std_num;
{ {
snprintf(token, sizeof(token), "%*.*f", length, width, nmbr); snprintf(token, max_length, "%*.*f", length, width, nmbr);
std_num = token; std_num = token;
} }

View File

@ -2097,7 +2097,6 @@ match_elts_in_species(const char *name, const char *mytemplate)
* write out string * write out string
*/ */
token[0] = '\0'; token[0] = '\0';
assert(MAX_LENGTH == sizeof(token1));
for (i = 0; i < count_match_tokens; i++) for (i = 0; i < count_match_tokens; i++)
{ {
strcat(token, match_vector[i].first.c_str()); strcat(token, match_vector[i].first.c_str());