Skip to content

corrige build-artifact #191

corrige build-artifact

corrige build-artifact #191

name: build-artifacts
on: push
jobs:
build-artifacts:
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r-version: '4.3', rspm: "https://cran.rstudio.com"}
- {os: windows-latest, r-version: '4.4', rspm: "https://cran.rstudio.com"}
- {os: ubuntu-24.04, r-version: '4.4', rspm: "https://packagemanager.posit.co/cran/__linux__/noble/latest"}
- {os: ubuntu-24.04, r-version: '4.3', rspm: 'https://packagemanager.posit.co/cran/__linux__/noble/latest'}
runs-on: ${{ matrix.config.os }}
env:
INSEE_APP_KEY: ${{ secrets.INSEE_APP_KEY }}
INSEE_APP_SECRET: ${{ secrets.INSEE_APP_SECRET }}
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.PAT_TOKEN }}
CURLOPT_TIMEOUT: 0
steps:
- uses: actions/checkout@v2
- name: Set up R ${{ matrix.config.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r-version }}
- name: Query dependencies
run: |
install.packages('remotes')
shell: Rscript {0}
- name: Install system dependencies - Linux
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- name: Install system dependencies - Windows
if: runner.os == 'Windows'
run: |
choco install pandoc
- name: Install R dependencies
run: |
install.packages(c("rcmdcheck", "httpuv", "devtools"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Build source (Linux)
if: runner.os == 'Linux'
run: devtools::build(binary = FALSE, path = "dist")
shell: Rscript {0}
- name: Build windows binaries
if: runner.os == 'Windows'
run: devtools::build(binary = TRUE, path = "dist")
shell: Rscript {0}
- name: Get package version
run: |
PACKAGE_VERSION=$(Rscript -e 'cat(as.character(desc::desc_get_version()))')
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: doremifasol${PACKAGE_VERSION}_${{ runner.os }}-r${{ matrix.config.r-version }}
path: dist