-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Rdatatable:master' into Spanish-translations
- Loading branch information
Showing
17 changed files
with
228 additions
and
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,6 @@ | |
^lib$ | ||
^library$ | ||
^devwd$ | ||
|
||
# only the inst/po compressed files are needed, not raw .pot/.po | ||
^po$ |
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,13 @@ | ||
|
||
# Ensure no calls to omp_set_num_threads() [to avoid affecting other packages and base R] | ||
# Only comments referring to it should be in openmp-utils.c | ||
omp_set_num_threads_linter = function(c_file) { | ||
# strip comments, we only care if the function appears in actual code. | ||
processed_lines = system2("gcc", c("-fpreprocessed", "-E", c_file), stdout=TRUE, stderr=FALSE) | ||
idx = grep("omp_set_num_threads", processed_lines, fixed = TRUE) | ||
if (!length(idx)) return() | ||
stop(sprintf( | ||
"In %s, found omp_set_num_threads() usage, which could affect other packages and base R:\n%s", | ||
c_file, paste0(" ", format(idx), ":", processed_lines[idx], collapse = "\n") | ||
)) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# 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. | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
name: 'rchk' | ||
|
||
jobs: | ||
rchk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: 'devel' | ||
- name: Build | ||
run: | | ||
ls -l | cat | ||
R CMD build --no-build-vignettes . | ||
mkdir packages | ||
mv data.table_*.tar.gz packages | ||
- name: Run rchk | ||
run: | | ||
docker run -v `pwd`/packages:/rchk/packages kalibera/rchk:latest /rchk/packages/data.table_*.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: | | ||
cat rchk.out | ||
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() | ||
- name: Dump rchk output logs | ||
run: cat rchk.out | ||
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
Oops, something went wrong.