Skip to content

Update liste_donnees.json (#83) #159

Update liste_donnees.json (#83)

Update liste_donnees.json (#83) #159

name: build-artifacts
on: push
jobs:
build-artifacts:
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r-version: '3.6'}
- {os: windows-latest, r-version: '4.0'}
- {os: ubuntu-20.04, r-version: '4.0'}
runs-on: ${{ matrix.config.os }}
env:
INSEE_APP_KEY: ${{ secrets.INSEE_APP_KEY }}
INSEE_APP_SECRET: ${{ secrets.INSEE_APP_SECRET }}
CURLOPT_TIMEOUT: 0
steps:
- uses: actions/checkout@v2
- name: Set up R ${{ matrix.config.r-version }}
uses: r-lib/actions/setup-r@v1
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
if: runner.os == 'Linux'
run: |
Rscript -e 'devtools::install()'
PKGVERSION=$(Rscript -e 'as.character(packageVersion("doremifasol"))')
regex='\"(.*)\"'
[[ $PKGVERSION =~ $regex ]]
export PKGVERSION=${BASH_REMATCH[1]}
- name: Upload artifacts - Binaire Windows
if: runner.os == 'Windows'
uses: actions/upload-artifact@v2
with:
name: doremifasol_${PKGVERSION}_r${{ matrix.config.r-version }}.zip
path: dist/
- name: Upload artifacts - source
if: runner.os == 'Linux'
uses: actions/upload-artifact@v2
with:
name: doremifasol_${PKGVERSION}_r${{ matrix.config.r-version }}.tar.gz
path: dist/