Upgrade CodeQL actiovs to v2 #151
This file contains 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
# | |
# Copyright © 2020 Banca D'Italia | |
# | |
# Licensed under the EUPL, Version 1.2 (the "License"); | |
# You may not use this work except in compliance with the | |
# License. | |
# You may obtain a copy of the License at: | |
# | |
# https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt | |
# | |
# Unless required by applicable law or agreed to in | |
# writing, software distributed under the License is | |
# distributed on an "AS IS" basis, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | |
# express or implied. | |
# | |
# See the License for the specific language governing | |
# permissions and limitations under the License. | |
# | |
name: VTL Engine builds | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.config.os }} | |
name: R ${{ matrix.r }} on ${{ matrix.config.os }} with Java ${{ matrix.java }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: windows-latest, DFILE: "-Dfile=%R_LIBS_USER%/rJava/jri/JRI.jar" } | |
- { os: ubuntu-22.04, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest", DFILE: "-Dfile=$R_LIBS_USER/rJava/jri/JRI.jar" } | |
r: [ 4.3.2 ] | |
java: [ 11, 17 ] | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
RSPM: ${{ matrix.config.rspm }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Java ${{ matrix.java }} | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: "temurin" | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.r }} | |
- name: Cache build artifacts | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Generate RVTL DESCRIPTION file | |
run: mvn -pl ".,:RVTL" -P with-r clean "build-helper:regex-properties@gen-version" "resources:resources" | |
- name: Install RVTL R dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: roxygen2 | |
working-directory: './vtl-bundles/vtl-r/RVTL/target/classes/R' | |
- name: Maven install file | |
run: 'mvn "install:install-file" "-DgroupId=org.rosuda.JRI" "-DartifactId=Rengine" "-Dversion=${{ matrix.r }}" "-Dpackaging=jar" "${{ matrix.config.DFILE }}"' | |
- name: Build with Maven | |
run: 'mvn "-Dr.runtime.version=${{ matrix.r }}" -P with-r --file pom.xml "-Dgpg.skip=true" verify' | |
- name: Run codacy-coverage-reporter | |
uses: codacy/codacy-coverage-reporter-action@master | |
with: | |
project-token: f795441a8a9a4071ae00ab0485c413f0 |