Skip to content

debian-12 to ubuntu #185

debian-12 to ubuntu

debian-12 to ubuntu #185

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.4', 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 }}
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: |
echo "PACKAGE_VERSION=$(Rscript -e 'cat(as.character(desc::desc_get_version()))')" >> $GITHUB_ENV
shell: Rscript {0}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r-version }}-artifacts
path: dist