Skip to content

Update Makevars

Update Makevars #11

Workflow file for this run

# Copyright (C) 2024 Roberto Rossini ([email protected])
# SPDX-License-Identifier: MIT
name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- ".github/workflows/ci.yml"
- "R/**"
- "src/**"
- "test/**"
- "conanfile.txt"
- "setup_conan.py"
- "DESCRIPTION"
- "NAMESPACE"
tags:
- 'v*.*.*'
pull_request:
paths:
- ".github/workflows/ci.yml"
- "R/**"
- "src/**"
- "test/**"
- "conanfile.txt"
- "setup_conan.py"
- "DESCRIPTION"
- "NAMESPACE"
env:
CONAN_HOME: "${{ github.workspace }}/conan/"
# https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
ci:
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
r-version: ["3.6.3", "4.3.2"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Generate requirements.txt
run: |
echo 'conan>=2' > requirements.txt
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip'
- name: Install Conan
run: pip install -r requirements.txt
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Add requirements
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- name: Generate cache key
id: cache-key
run: |
hash="${{ hashFiles('conanfile.txt', '.github/workflows/ci.yml') }}"
echo "conan-key=ci-$hash" >> $GITHUB_OUTPUT
- name: Restore Conan cache
id: cache-conan
uses: actions/cache/restore@v3
with:
key: conan-${{ steps.cache-key.outputs.conan-key }}
path: ${{ env.CONAN_HOME }}
- name: Build and test package
uses: r-lib/actions/check-r-package@v2
ci-status-check:
name: Status Check (CI)
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- ci
steps:
- name: Collect job results
if: needs.ci.result != 'success'
run: exit 1