This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: R-CMD-INSTALL-build | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 2 * * SAT' | |
jobs: | |
release: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest ] | |
R: [ 'release', 'next' ] | |
cc: [ 'default', 'gcc-15' ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: install gcc-15 | |
if: contains(matrix.os, 'ubuntu') && ${{matrix.cc}} == 'gcc-15' | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test & sudo apt update | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 12 --slave /usr/bin/g++ g++ /usr/bin/g++-15 | |
sudo update-alternatives --set gcc /usr/bin/gcc-15 | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.R }} | |
rtools-version: '' | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v1.13 | |
with: | |
cmake-version: '3.24.x' | |
- run: | | |
cd ..; R CMD INSTALL --build rlibkriging | |
mkdir rlibkriging/R-${{ matrix.R }} | |
mv rlibkriging_*.* rlibkriging/R-${{ matrix.R }}/. | |
shell: bash | |
name: R CMD INSTALL | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./R-* | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./R-*/*.tar.gz | |
./R-*/*.tgz | |
./R-*/*.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |