Skip to content

Parallel test, MATLAB, macOS ARM64 #154

Parallel test, MATLAB, macOS ARM64

Parallel test, MATLAB, macOS ARM64 #154

name: Parallel test, MATLAB, macOS ARM64
on:
# Trigger the workflow on push or pull request
#push:
#pull_request: # DANGEROUS! MUST be disabled for self-hosted runners!
# Trigger the workflow by cron. The default time zone of GitHub Actions is UTC.
schedule:
- cron: '0 16 2-31/3 * *'
# Trigger the workflow manually
workflow_dispatch:
inputs:
git-ref:
description: Git Ref (Optional)
required: false
random-seed:
description: Random Seed (Optional)
required: false
dimension:
description: Dimension (Optional)
required: false
np:
description: Number of Parallel Calls (Optional)
required: false
# Show the git ref in the workflow name if it is invoked manually.
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Manual run {0} , seed {1}, dimension {2}, {3} parallel calls', inputs.git-ref, inputs.random-seed, inputs.dimension, inputs.np) || '' }}
env:
MATLAB: /Applications/MATLAB_R2023b.app/bin/matlab
jobs:
test:
name: Parallel test of PRIMA
runs-on: [self-hosted, macOS, ARM64]
strategy:
fail-fast: false
matrix:
solver: [uobyqa, newuoa, bobyqa, lincoa, cobyla]
steps:
- name: Clone Repository (Latest)
uses: actions/checkout@v6.0.2
if: github.event.inputs.git-ref == ''
with:
# ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS
# As of 231227, checkout with ssh fails frequently on Windows runners.
submodules: recursive
- name: Clone Repository (Custom Ref)
uses: actions/checkout@v6.0.2
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
# ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS
# As of 231227, checkout with ssh fails frequently on Windows runners.
submodules: recursive
- name: Conduct the test # We do not use matlab-actions/run-command, which is not supported on macOS ARM64 as of 20240119
run: ${{ env.MATLAB }} -nojvm -batch "ver; root_dir = pwd(); cd(fullfile(root_dir, 'matlab/tests')); parallel('${{ matrix.solver }}'); copy_crash_dump_files(root_dir, true);"
- name: Store artifacts
uses: actions/upload-artifact@v7
if: always() # Always run even if the workflow is canceled manually or due to overtime.
with:
name: ${{ matrix.solver }}
path: |
matlab_crash_dump*