UPDATE #85
This file contains hidden or 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 Package CI for macOS | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| NOT_CRAN: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.4.1' | |
| use-public-rspm: true | |
| - name: Install system dependencies | |
| run: | | |
| brew install jags gcc | |
| which gfortran | |
| gfortran --version | |
| - name: Verify JAGS installation | |
| run: | | |
| which jags | |
| ls -la /usr/local/bin/jags* || ls -la /opt/homebrew/bin/jags* || echo "JAGS binary location check" | |
| echo "JAGS installed successfully" | |
| - name: Configure R for gfortran | |
| run: | | |
| mkdir -p ~/.R | |
| echo "FC = $(which gfortran)" >> ~/.R/Makevars | |
| echo "F77 = $(which gfortran)" >> ~/.R/Makevars | |
| GFORTRAN_LIB=$(dirname $(gfortran -print-file-name=libgfortran.dylib)) | |
| echo "FLIBS = -L${GFORTRAN_LIB} -lgfortran -lquadmath -lm" >> ~/.R/Makevars | |
| cat ~/.R/Makevars | |
| - name: Setup R dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: | | |
| any::rcmdcheck | |
| any::devtools | |
| any::remotes | |
| github::cran/basicspace | |
| needs: check | |
| - name: Verify rjags installation | |
| run: | | |
| Rscript -e "library(rjags); cat('rjags loaded successfully\n')" | |
| - name: Check package | |
| uses: r-lib/actions/check-r-package@v2 | |
| with: | |
| args: 'c("--no-manual", "--as-cran")' | |
| - name: Upload check results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-results | |
| path: check |