Skip to content

Commit e008da3

Browse files
Combined R-CMD-check GitHub Actions into a single badge
1 parent 7cf3a31 commit e008da3

File tree

4 files changed

+35
-128
lines changed

4 files changed

+35
-128
lines changed

.github/workflows/R-CMD-check-macos.yaml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/R-CMD-check-ubuntu.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/R-CMD-check-windows.yaml renamed to .github/workflows/R-CMD-check.yaml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main, master]
66
pull_request:
77

8-
name: R-CMD-check-windows.yaml
8+
name: R-CMD-check.yaml
99

1010
permissions: read-all
1111

@@ -19,6 +19,10 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
config:
22+
- {os: macOS-latest, r: 'release'}
23+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24+
- {os: ubuntu-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'oldrel-1'}
2226
- {os: windows-latest, r: 'release'}
2327

2428
env:
@@ -27,6 +31,12 @@ jobs:
2731

2832
steps:
2933
- uses: actions/checkout@v4
34+
35+
- name: Install system dependencies (Ubuntu)
36+
if: runner.os == 'Ubuntu'
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y libgsl-dev
3040
3141
- uses: r-lib/actions/setup-pandoc@v2
3242

@@ -35,7 +45,13 @@ jobs:
3545
r-version: ${{ matrix.config.r }}
3646
http-user-agent: ${{ matrix.config.http-user-agent }}
3747
use-public-rspm: true
38-
48+
49+
- name: Install JAGS (macOS)
50+
if: runner.os == 'macOS'
51+
run: |
52+
brew install jags
53+
echo "JAGS_HOME=$(brew --prefix jags)" >> $GITHUB_ENV
54+
3955
- name: Install JAGS (Windows)
4056
if: runner.os == 'Windows'
4157
run: |
@@ -57,7 +73,22 @@ jobs:
5773
# Clean up the installer
5874
Remove-Item -Path $tempDir -Recurse -Force
5975
shell: pwsh
60-
76+
77+
- name: Set up JAGS environment (macOS)
78+
if: runner.os == 'macOS'
79+
run: |
80+
echo "JAGS_LIB=$JAGS_HOME/lib" >> $GITHUB_ENV
81+
echo "PKG_CONFIG_PATH=$JAGS_HOME/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
82+
echo "LDFLAGS=-L$JAGS_HOME/lib" >> $GITHUB_ENV
83+
echo "CPPFLAGS=-I$JAGS_HOME/include" >> $GITHUB_ENV
84+
echo "LD_LIBRARY_PATH=$JAGS_HOME/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
85+
echo "DYLD_LIBRARY_PATH=$JAGS_HOME/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
86+
# Create symbolic links for JAGS modules
87+
sudo mkdir -p /usr/local/lib/JAGS/modules-4
88+
for module in basemod bugs terminal; do
89+
sudo ln -sf "$JAGS_HOME/lib/JAGS/modules-4/${module}.so" "/usr/local/lib/JAGS/modules-4/${module}.so"
90+
done
91+
6192
- name: Set up JAGS environment (Windows)
6293
if: runner.os == 'Windows'
6394
run: |

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33

44
<!-- badges: start -->
5-
[![R-CMD-check-macos](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check-macos.yaml/badge.svg)](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check-macos.yaml)
6-
[![R-CMD-check-windows](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check-windows.yaml/badge.svg)](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check-windows.yaml)
7-
[![R-CMD-check-ubuntu](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check-ubuntu.yaml/badge.svg)](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check-ubuntu.yaml)
5+
[![R-CMD-check](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/CSAFE-ISU/handwriter/actions/workflows/R-CMD-check.yaml)
86
[![Codecov test coverage](https://codecov.io/gh/CSAFE-ISU/handwriter/graph/badge.svg)](https://app.codecov.io/gh/CSAFE-ISU/handwriter)
97
<!-- badges: end -->
108

0 commit comments

Comments
 (0)