Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on windows #61

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
27 changes: 20 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,31 @@ 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
- uses: r-lib/actions/setup-r@v2
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
Expand All @@ -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 }})
Expand Down
Loading