diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3dd712..34210f4 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,6 @@ on: env: CONAN_HOME: "${{ github.workspace }}/conan/" - MACOS_MIN_VERSION: 10.15 # https://stackoverflow.com/a/72408109 concurrency: @@ -48,8 +47,8 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, macos-latest, ubuntu-latest] - r-version: ["3.6.3", "4.0.5", "4.1.3", "4.2.3", "4.3.2"] + os: [macos-latest] + r-version: ["4.0.5"] runs-on: ${{ matrix.os }} @@ -83,20 +82,6 @@ jobs: extra-packages: any::rcmdcheck needs: check - - name: Generate cache key - id: cache-key - run: | - hash="${{ hashFiles('conanfile.txt', '.github/workflows/ci.yml') }}" - - echo "conan-key=ci-$hash" >> $GITHUB_OUTPUT - - - name: Restore Conan cache - id: cache-conan - uses: actions/cache/restore@v3 - with: - key: conan-${{ steps.cache-key.outputs.conan-key }} - path: ${{ env.CONAN_HOME }} - - name: Build and test package uses: r-lib/actions/check-r-package@v2 diff --git a/src/Makevars b/src/Makevars index d749409..fb6d0c5 100644 --- a/src/Makevars +++ b/src/Makevars @@ -3,7 +3,6 @@ export CONAN_HOME := $(PWD)/conan-staging/.conan2 export CC = "$(shell "$(R_HOME)/bin/Rscript" -e 'Sys.which("gcc")')" export CXX = "$(shell "$(R_HOME)/bin/Rscript" -e 'Sys.which("g++")')" - CONANDEPS_MK := $(shell ../run_conan.py) include $(CONANDEPS_MK) @@ -17,3 +16,10 @@ PKG_CPPFLAGS := $(PKG_CPPFLAGS) $(shell "$(R_HOME)/bin/Rscript" -e 'Rcpp:::CxxFl PKG_LIBS := $(addprefix -L ,$(CONAN_LIB_DIRS)) PKG_LIBS := $(PKG_LIBS) $(addprefix -l,$(CONAN_LIBS)) PKG_LIBS := $(PKG_LIBS) $(addprefix -l,$(CONAN_SYSTEM_LIBS)) + +OS := $(shell uname 2>/dev/null || echo Unknown) + +ifeq ($(OS),Darwin) + export MACOSX_DEPLOYMENT_TARGET = 10.15 + CXXFLAGS += -mmacosx-version-min=10.15 +endif