From dd44ac91b844c47f2b97a20a3e7f7a7a5273748a Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Sat, 10 Sep 2022 10:51:15 +0800 Subject: [PATCH] [CI] Use binary R dependencies on Windows. (#8241) --- .github/workflows/r_tests.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/r_tests.yml b/.github/workflows/r_tests.yml index ebc220564..d49d5b936 100644 --- a/.github/workflows/r_tests.yml +++ b/.github/workflows/r_tests.yml @@ -31,8 +31,8 @@ jobs: uses: actions/cache@v2 with: path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-4-${{ hashFiles('R-package/DESCRIPTION') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-4-${{ hashFiles('R-package/DESCRIPTION') }} + key: ${{ runner.os }}-r-${{ matrix.config.r }}-5-${{ hashFiles('R-package/DESCRIPTION') }} + restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-5-${{ hashFiles('R-package/DESCRIPTION') }} - name: Install dependencies shell: Rscript {0} @@ -80,20 +80,25 @@ jobs: uses: actions/cache@v2 with: path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-4-${{ hashFiles('R-package/DESCRIPTION') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-4-${{ hashFiles('R-package/DESCRIPTION') }} + key: ${{ runner.os }}-r-${{ matrix.config.r }}-5-${{ hashFiles('R-package/DESCRIPTION') }} + restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-5-${{ hashFiles('R-package/DESCRIPTION') }} - name: Install dependencies shell: Rscript {0} + if: matrix.config.os != 'windows-latest' run: | install.packages(${{ env.R_PACKAGES }}, repos = 'http://cloud.r-project.org', dependencies = c('Depends', 'Imports', 'LinkingTo')) - - name: Install igraph on Windows + + - name: Install binary dependencies shell: Rscript {0} if: matrix.config.os == 'windows-latest' run: | - install.packages('igraph', type='binary', dependencies = c('Depends', 'Imports', 'LinkingTo')) + install.packages(${{ env.R_PACKAGES }}, + type = 'binary', + repos = 'http://cloud.r-project.org', + dependencies = c('Depends', 'Imports', 'LinkingTo')) - uses: actions/setup-python@v2 with: @@ -132,8 +137,8 @@ jobs: uses: actions/cache@v2 with: path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-4-${{ hashFiles('R-package/DESCRIPTION') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-4-${{ hashFiles('R-package/DESCRIPTION') }} + key: ${{ runner.os }}-r-${{ matrix.config.r }}-5-${{ hashFiles('R-package/DESCRIPTION') }} + restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-5-${{ hashFiles('R-package/DESCRIPTION') }} - name: Install dependencies shell: Rscript {0}