Skip to content

build.yaml

build.yaml #170

Workflow file for this run

name: build.yaml
on:
workflow_dispatch:
inputs:
rversion:
description: 'R version'
required: true
type: string
build:
description: 'Build and run tests (x86_64)'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
deploy:
description: 'Deploy packages after testing (x86_64)'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'no'
buildarm:
description: 'Build and run tests (aarch64)'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
deployarm:
description: 'Deploy packages after testing (aarch64)'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'no'
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
rversions: ${{ steps.setup-matrix.outputs.rversions }}
steps:
- name: Set up builds
id: setup-matrix
run: |
rversions=$(echo '"${{ inputs.rversion }}"' | jq -c 'split(",")')
echo "rversions=$rversions" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
debug:
needs: setup-matrix
runs-on: ubuntu-latest
steps:
- run: |
echo "${{ needs.setup-matrix.outputs.rversions }}"
build:
needs: setup-matrix
strategy:
fail-fast: false
matrix:
rversion: ${{ fromJson(needs.setup-matrix.outputs.rversions) }}
uses: ./.github/workflows/build-template.yaml
with:
rversion: ${{ matrix.rversion }}
build: ${{ inputs.build }}
deploy: ${{ inputs.deploy }}
buildarm: ${{ inputs.buildarm }}
deployarm: ${{ inputs.deployarm }}
secrets: inherit