diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61070e0..2c1910e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'macos-latest'] # TODO: Add windows here + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] steps: - uses: actions/checkout@v4 @@ -85,20 +85,23 @@ jobs: with: r-version: 'release' use-public-rspm: true + - uses: actions-rs/toolchain@v1 with: toolchain: 'stable' + - name: Install dependencies run: | install.packages(c("R6", "testthat", "rcmdcheck"), repos="http://cran.us.r-project.org") shell: Rscript {0} - - name: Run R CMD check + + - name: Run R CMD check (non-windows) + if: matrix.os != 'windows-latest' run: | - R CMD check --as-cran --no-vignettes --no-manual ./changeforest-r - env: - _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_CRAN_INCOMING_=false R CMD check --as-cran --no-vignettes --no-manual ./changeforest-r + + - name: Check log files for warnings (non-windows) if: matrix.os != 'windows-latest' - - name: Check for warnings run: | CHECK_LOG_FILE=changeforest-r.Rcheck/00check.log CHECK_INSTALL_FILE=changeforest-r.Rcheck/00install.out @@ -121,8 +124,18 @@ jobs: # u: unset variables are errors # l: as login script shell: bash -lxu {0} - if: matrix.os != 'windows-latest' + - name: Run R CMD check (windows) + if: matrix.os == 'windows-latest' + run: | + rustup target add i686-pc-windows-gnu + R.exe CMD check --as-cran --no-vignettes --no-manual ./changeforest-r + + - name: Check log files for warnings (windows) + if: matrix.os == 'windows-latest' && failure() + run: | + type changeforest-r.Rcheck/00install.out + type changeforest-r.Rcheck/00check.log python-tests: name: Python tests (${{ matrix.os }})