-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
129 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# adapted from a similar check run by {arrow} | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
name: rchk | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['R'] | ||
types: | ||
- completed | ||
branches-ignore: [gh-pages] | ||
paths: | ||
- ".github/workflows/rchk.yml" | ||
- "r/**" | ||
- 'c/Make*' | ||
- 'c/*.mk' | ||
- 'c/**/*.[ch]p?p?' | ||
|
||
env: | ||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
_R_CHECK_FORCE_SUGGESTS_: false | ||
_R_CHECK_CRAN_INCOMING_REMOTE_: false | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
rchk: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
name: Run rchk | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: 'devel' | ||
|
||
- name: Install minimal dependencies | ||
run: | | ||
install.packages(c("Rdpack","matrixStats")) | ||
shell: Rscript {0} | ||
working-directory: r | ||
|
||
- name: Build | ||
run: | | ||
R CMD build --no-build-vignettes r | ||
mkdir packages | ||
mv moocore_*.tar.gz packages | ||
- name: Run rchk | ||
run: | | ||
docker run -v `pwd`/packages:/rchk/packages kalibera/rchk:latest /rchk/packages/moocore_*.tar.gz |& tee rchk.out | ||
- name: Confirm that rchk has no errors | ||
# Suspicious call, [UP], and [PB] are all of the error types currently at | ||
# https://github.com/kalibera/cran-checks/tree/HEAD/rchk/results | ||
# though this might not be exhaustive, there does not appear to be a way to have rchk return an error code | ||
# CRAN also will remove some of the outputs (especially those related to Rcpp and strptime, e.g. | ||
# ERROR: too many states (abstraction error?)) | ||
# https://github.com/kalibera/rchk | ||
run: | | ||
if [ $(grep -Fc "Suspicious call" rchk.out) -gt 0 ] || [ $(grep -F "[UP]" rchk.out | grep -Fvc "results will be incomplete") -gt 0 ] || [ $(grep -Fc "[PB]" rchk.out) -gt 0 ]; then | ||
echo "Found rchk errors" | ||
exit 1 | ||
fi | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
/* .Call calls */ | ||
DECLARE_CALL(SEXP, compute_eaf_C, SEXP DATA, SEXP CUMSIZES, SEXP PERCENTILE) | ||
DECLARE_CALL(SEXP, compute_eafdiff_C, SEXP DATA, SEXP CUMSIZES, SEXP INTERVALS) | ||
DECLARE_CALL(SEXP, compute_eafdiff_polygon_C, SEXP DATA, SEXP CUMSIZES, SEXP INTERVALS) | ||
DECLARE_CALL(SEXP, compute_eafdiff_rectangles_C, SEXP DATA, SEXP CUMSIZES, SEXP INTERVALS) | ||
DECLARE_CALL(SEXP, R_read_datasets, SEXP FILENAME) | ||
DECLARE_CALL(SEXP, hypervolume_C, SEXP DATA, SEXP REFERENCE) | ||
DECLARE_CALL(SEXP, hv_contributions_C, SEXP DATA, SEXP REFERENCE) | ||
DECLARE_CALL(void, normalise_C, SEXP DATA, SEXP RANGE, SEXP LBOUND, SEXP UBOUND, SEXP MAXIMISE) | ||
DECLARE_CALL(SEXP, is_nondominated_C, SEXP DATA, SEXP MAXIMISE, SEXP KEEP_WEAKLY) | ||
DECLARE_CALL(SEXP, pareto_ranking_C, SEXP DATA) | ||
DECLARE_CALL(SEXP, epsilon_mul_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(SEXP, epsilon_add_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(SEXP, igd_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(SEXP, igd_plus_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(SEXP, avg_hausdorff_dist_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE, SEXP P) | ||
DECLARE_CALL(SEXP, rect_weighted_hv2d_C, SEXP DATA, SEXP RECTANGLES) | ||
DECLARE_CALL(SEXP, whv_hype_C, SEXP DATA, SEXP IDEAL, SEXP REFERENCE, SEXP NSAMPLES, SEXP DIST, SEXP SEED, SEXP MU) | ||
DECLARE_CALL(SEXP, preprocess_rectangles_C, SEXP RECTANGLES, SEXP REFERENCE) | ||
DECLARE_CALL(compute_eaf_C, SEXP DATA, SEXP CUMSIZES, SEXP PERCENTILE) | ||
DECLARE_CALL(compute_eafdiff_C, SEXP DATA, SEXP CUMSIZES, SEXP INTERVALS) | ||
DECLARE_CALL(compute_eafdiff_polygon_C, SEXP DATA, SEXP CUMSIZES, SEXP INTERVALS) | ||
DECLARE_CALL(compute_eafdiff_rectangles_C, SEXP DATA, SEXP CUMSIZES, SEXP INTERVALS) | ||
DECLARE_CALL(R_read_datasets, SEXP FILENAME) | ||
DECLARE_CALL(hypervolume_C, SEXP DATA, SEXP REFERENCE) | ||
DECLARE_CALL(hv_contributions_C, SEXP DATA, SEXP REFERENCE) | ||
DECLARE_CALL(normalise_C, SEXP DATA, SEXP RANGE, SEXP LBOUND, SEXP UBOUND, SEXP MAXIMISE) | ||
DECLARE_CALL(is_nondominated_C, SEXP DATA, SEXP MAXIMISE, SEXP KEEP_WEAKLY) | ||
DECLARE_CALL(pareto_ranking_C, SEXP DATA) | ||
DECLARE_CALL(epsilon_mul_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(epsilon_add_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(igd_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(igd_plus_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE) | ||
DECLARE_CALL(avg_hausdorff_dist_C, SEXP DATA, SEXP REFERENCE, SEXP MAXIMISE, SEXP P) | ||
DECLARE_CALL(rect_weighted_hv2d_C, SEXP DATA, SEXP RECTANGLES) | ||
DECLARE_CALL(whv_hype_C, SEXP DATA, SEXP IDEAL, SEXP REFERENCE, SEXP NSAMPLES, SEXP DIST, SEXP SEED, SEXP MU) | ||
DECLARE_CALL(preprocess_rectangles_C, SEXP RECTANGLES, SEXP REFERENCE) |