Skip to content

create callable workflow #78

create callable workflow

create callable workflow #78

# build-and-test.yml
#
# Dispatch workflow for build-and-test-callable.yml
name: B+T dispatcher
on:
workflow_dispatch:
inputs:
test_all:
description: 'Test all options. If set to false, will only trigger the CI for the default options.'
default: false
type: boolean
pull_request:
jobs:
# -------------------------------------------------------------------------------------------------
# Build and test matrix
# -------------------------------------------------------------------------------------------------
test-matrix:
if: ${{ github.event_name == 'pull_request' || inputs.test_all == true }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] # 3.12 is not supported by scipy
# NOTE: If setup.py could accept a commit hash as an argument, that could give us more flexibility here
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
parallel: [false, true]
# CUDA does not support MacOS - this is a safeguard and shouldn't be needed for most matrix configs
exclude:
- os: macos-latest
cuda: true

Check failure on line 34 in .github/workflows/build-and-test.yml

View workflow run for this annotation

GitHub Actions / B+T dispatcher

Invalid workflow file

The workflow is not valid. .github/workflows/build-and-test.yml (Line: 34, Col: 13): Matrix exclude key 'cuda' does not match any key within the matrix
uses: ./.github/workflows/build-and-test-callable.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
mfem-branch: ${{ matrix.mfem-branch }}
parallel: ${{ matrix.parallel }}
name: ""
# -------------------------------------------------------------------------------------------------
# Build and test misc (we want these to use defaults, and not expand the dimensions of the matrix)
# -------------------------------------------------------------------------------------------------
test-macos:
if: ${{ github.event_name == 'pull_request' || inputs.test_all == true }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
os: macos-latest
name: ""
test-cuda:
if: ${{ github.event_name == 'pull_request' || inputs.test_all == true }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
cuda: true
name: ""
test-libceed:
if: ${{ github.event_name == 'pull_request' || inputs.test_all == true }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
libceed: true
name: ""
test-gslib:
if: ${{ github.event_name == 'pull_request' || inputs.test_all == true }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
gslib: true
name: ""
# -------------------------------------------------------------------------------------------------
# Build and test defaults
# -------------------------------------------------------------------------------------------------
test-defaults:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.test_all == false }}
uses: ./.github/workflows/build-and-test-callable.yml