From 4e3def769f988d26ebeecefba95c4f7685d16492 Mon Sep 17 00:00:00 2001 From: vfisikop Date: Thu, 10 Oct 2024 15:55:35 +0300 Subject: [PATCH] Fix macos github actions --- .github/workflows/R-CMD-check-macOS.yml | 30 +++++++++++++ .github/workflows/R-CMD-check-ubuntu.yml | 55 ----------------------- .github/workflows/R-CMD-check-windows.yml | 52 --------------------- 3 files changed, 30 insertions(+), 107 deletions(-) delete mode 100644 .github/workflows/R-CMD-check-ubuntu.yml delete mode 100644 .github/workflows/R-CMD-check-windows.yml diff --git a/.github/workflows/R-CMD-check-macOS.yml b/.github/workflows/R-CMD-check-macOS.yml index 3607e53..651bdc9 100644 --- a/.github/workflows/R-CMD-check-macOS.yml +++ b/.github/workflows/R-CMD-check-macOS.yml @@ -22,6 +22,10 @@ jobs: config: - {os: macOS-latest, r: '4.1.2'} - {os: macOS-latest, r: 'release'} + - {os: macOS-13, r: '4.1.2'} + - {os: macOS-13, r: 'release'} + - {os: macOS-12, r: '4.1.2'} + - {os: macOS-12, r: 'release'} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true @@ -37,6 +41,32 @@ jobs: - uses: r-lib/actions/setup-pandoc@v2 + - name: Check runner.os + run: echo "Operating System ${{ runner.os }}" + + - name: Check matrix.os + run: echo "Operating System ${{ matrix.config.os }}" + + - name: Symlink gfortran (macOS 12 or 13) + if: ${{ matrix.config.os }} == 'macOS-12' || ${{ matrix.config.os }} == 'macOS-13' + run: | + # make sure gfortran is available + gfortran --version + sudo ln -s /usr/local/bin/gfortran-12 /usr/local/bin/gfortran + sudo mkdir -p /usr/local/gfortran + sudo ln -s /usr/local/Cellar/gcc@12/*/lib/gcc/12 /usr/local/gfortran/lib + gfortran --version + + - name: Symlink gfortran (macOS 14) + if: ${{ matrix.config.os }} == 'macOS-14' + run: | + gfortran --version + # make sure gfortran is available + sudo ln -s /usr/local/bin/gfortran-13 /usr/local/bin/gfortran + sudo mkdir -p /usr/local/gfortran + sudo ln -s /usr/local/Cellar/gcc@13/*/lib/gcc/13 /usr/local/gfortran/lib + gfortran --version + - name: Install dependencies run: Rscript -e "install.packages(c('devtools', dependencies=TRUE))" -e "install.packages(c('rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'testthat', 'downloader', 'xfun'))"; diff --git a/.github/workflows/R-CMD-check-ubuntu.yml b/.github/workflows/R-CMD-check-ubuntu.yml deleted file mode 100644 index 1308c9d..0000000 --- a/.github/workflows/R-CMD-check-ubuntu.yml +++ /dev/null @@ -1,55 +0,0 @@ -############################################################################## -# GitHub Actions Workflow to test the R interface of volesti -# -# Copyright (c) 2020 Vissarion Fisikopoulos -# -# Licensed under GNU LGPL.3, see LICENCE file -############################################################################## - -on: [push, pull_request] - -name: R-CMD-check-ubuntu - -jobs: - R-CMD-check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: ubuntu-latest, r: 'devel'} - - {os: ubuntu-latest, r: 'release'} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v3 - - run: sudo apt-get update || true; - sudo apt install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev libgit2-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev; - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - - - uses: r-lib/actions/setup-pandoc@v2 - - - name: Install dependencies - run: Rscript -e "install.packages(c('testthat', 'pkgload', 'rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'downloader', 'xfun', dependencies=TRUE))"; - - - name: Check - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: Rscript -e "library(rcmdcheck)" -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'warning', check_dir = 'check')" - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check diff --git a/.github/workflows/R-CMD-check-windows.yml b/.github/workflows/R-CMD-check-windows.yml deleted file mode 100644 index c40657f..0000000 --- a/.github/workflows/R-CMD-check-windows.yml +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################## -# GitHub Actions Workflow to test the R interface of volesti -# -# Copyright (c) 2020 Vissarion Fisikopoulos -# -# Licensed under GNU LGPL.3, see LICENCE file -############################################################################## - -on: [push, pull_request] - -name: R-CMD-check-windows - -jobs: - R-CMD-check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: windows-latest, r: 'release'} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v3 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - - - uses: r-lib/actions/setup-pandoc@v2 - - - name: Install dependencies - run: Rscript -e "install.packages(c('devtools', dependencies=TRUE))" -e "install.packages(c('rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'testthat', 'downloader', 'xfun'))" - - - name: Check - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: Rscript -e "library(rcmdcheck)" -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'warning', check_dir = 'check')" - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check