Skip to content

Commit

Permalink
merge commit dev->master
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Blätte authored and Andreas Blätte committed Sep 1, 2022
2 parents b10b242 + 856a5dc commit a5e5f72
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 43 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
# - {os: windows-2022, r: 'devel'}
- {os: windows-latest, r: 'release', rtools: '42', windows-path-include-mingw: 'false'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
Expand All @@ -40,25 +39,12 @@ jobs:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
if: matrix.config.os != 'windows-2022'
with:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Setup R (Windows UCRT)
if: matrix.config.os == 'windows-latest'
uses: kalibera/ucrt3/actions/r-install@main

- name: Install UCRT toolchain
if: matrix.config.os == 'windows-latest'
uses: kalibera/ucrt3/actions/toolchain-install@main
with:
# base ... toolchain has the compilers and libraries to build R and recommended packages
# full ... additional libraries to build CRAN packages
# none ... no toolchain is needed (no native code)
toolchain-type: full

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r-dependencies@v2
Expand Down Expand Up @@ -99,28 +85,13 @@ jobs:
shell: Rscript {0}

- name: Check
if: matrix.config.os != 'windows-2022'
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

# - name: Whereabouts of gcc and g++
# if: matrix.config.os == 'windows-latest'
# run: |
# echo %PATH%
# where gcc
# where g++

- name: Check package (UCRT)
if: matrix.config.os == 'windows-latest'
env:
_R_INSTALL_TIME_PATCHES_: no
TZ: UTC
uses: kalibera/R-actions/pkg-check@master

- name: Build Windows binary package
if: matrix.os == 'windows-latest'
run: pkgbuild::build(binary = TRUE, dest_path = Sys.getenv("GITHUB_WORKSPACE"))
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: RcppCWB
Type: Package
Title: 'Rcpp' Bindings for the 'Corpus Workbench' ('CWB')
Version: 0.5.3
Date: 2022-05-17
Version: 0.5.4
Date: 2022-08-30
Author: Andreas Blaette [aut, cre],
Bernard Desgraupes [aut],
Sylvain Loiseau [aut],
Expand Down
10 changes: 9 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# RcppCWB 0.5.2.9001ff
# RcppCWB 0.5.4

* Fixed package configuration that prevented that compiler is used for compiling
CWB C scripts as intended #66.
* Adding '-luuid' to PKG_FLAGS in Makevars solves linker issue FOLDERID_ #67.
* GitHub Actions now working for Windows #47.


# RcppCWB 0.5.3

* Fixed a bug in the `region_matrix_corpus()` C++ code that would not show any
context at all if s_attribute expansion transgressed start or end of corpus.
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ mv ./src/cwb/config.mk.mod ./src/cwb/config.mk
# Adapt CWB configuration file that defines compiler to use compiler chosen
# by user (Makeconf, Makevars file)
echo "* adapt CWB configuration file to use compiler: $CC_R"
sed -e "s#CC\s*=\s*gcc#CC=$CC_R#" ./src/cwb/config/platform/${CWB_PLATFORM_CONFIG_FILE_CC} > ./tmpfile
sed -e "s/#[[:space:]]*CC[[:space:]]*=[[:space:]]*gcc/CC = $CC_R/" ./src/cwb/config/platform/${CWB_PLATFORM_CONFIG_FILE_CC} > ./tmpfile
rm ./src/cwb/config/platform/${CWB_PLATFORM_CONFIG_FILE_CC}
mv ./tmpfile ./src/cwb/config/platform/${CWB_PLATFORM_CONFIG_FILE_CC}

Expand Down
9 changes: 7 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
## General remarks

This is a maintenance release with bug fixes. No changes to the
setup of the package.
I realized ERRORS on the macOS and Windows build machines: Fixed as follows:

- For Windows, I add '-luuid' to PKG_FLAGS (necessary to meet new dependency of
glib2).
- For macOS, the CC defined in Makeconf was not passed to the compilation of
the CWB source files. Changed the configure scripts accordingly.


Previous aspects I repeat:

Expand Down
2 changes: 1 addition & 1 deletion src/Makevars.ucrt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GLIB_DEFINES=-I"$(R_TOOLS_SOFT)/include/glib-2.0" \

PKG_CPPFLAGS=-I$(R_PACKAGE_SOURCE)/cqp -I$(R_PACKAGE_SOURCE)/cl -I$(R_PACKAGE_SOURCE)/CQi $(GLIB_DEFINES) -DPCRE_STATIC

PKG_LIBS=-L$(R_PACKAGE_SOURCE)/cl -L$(R_PACKAGE_SOURCE)/cqp -L$(R_PACKAGE_SOURCE)/utils -lcwb -lcqp -lcl -lglib-2.0 -lintl -liconv -lws2_32 -lpcre -lole32
PKG_LIBS=-L$(R_PACKAGE_SOURCE)/cl -L$(R_PACKAGE_SOURCE)/cqp -L$(R_PACKAGE_SOURCE)/utils -lcwb -lcqp -lcl -lglib-2.0 -lintl -liconv -lws2_32 -lpcre -luuid -lole32

${SHLIB}: libcl.a libcqp.a libcwb.a

Expand Down
2 changes: 1 addition & 1 deletion src/cqp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,4 @@ SEXP region_matrix_to_subcorpus(Rcpp::IntegerMatrix region_matrix, SEXP corpus,

sc = R_MakeExternalPtr(cl, R_NilValue, R_NilValue);
return(sc);
}
}
2 changes: 1 addition & 1 deletion src/cwb/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ FULL_MESSAGES = 1
# RELEASE_OS = ??? # e.g. linux-2.6 or osx-10.4

## C compiler to use (GCC is highly recommended, others may not work)
CC = gcc
# CC = gcc

## Override options for C compiler and linker (complete override)
# CFLAGS = -O2 -Wall
Expand Down
4 changes: 1 addition & 3 deletions src/cwb/config/platform/darwin-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
include $(TOP)/config/platform/darwin

## Explicitly use Clang compiler (Apple's gcc is now just a symlink to Clang)
CC = /usr/bin/clang
# CC = /usr/bin/clang

## Only build default 64-bit architecture, optimised for this system
CFLAGS = -Wall -O3 -arch arm64 -mtune=native
Expand All @@ -36,5 +36,3 @@ DEPEND_CFLAGS = -Wall -O3
RELEASE_ARCH = x86_64
RELEASE_OS = osx-10.7


LDFLAGS = -foo

0 comments on commit a5e5f72

Please sign in to comment.