Successful fixes of the crash (all should be successes) #32
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
name: Successful fixes of the crash (all should be successes) | |
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 18 1 * *' | |
# Trigger the workflow when it is manually triggered | |
workflow_dispatch: | |
env: | |
MATLAB_RELEASE: latest | |
GFORTRAN_VERSION: 10 | |
jobs: | |
test: | |
name: Fix the crash of MATLAB during MEX setup or mexification (successful) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] # MEX does not work on windows-latest yet | |
crash_type: [default, setup, mex] | |
crash_indicator : [true, false] | |
fix: [yes_clean_build_dir_before_copy.m, yes_clean_src_dir_before_copy.m, yes_clear_mex_before_copy.m] | |
exclude: | |
- crash_type: default | |
crash_indicator: false | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Link gfortran for MATLAB on Linux | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo bash .github/scripts/link_gfortran_for_matlab ${{ env.GFORTRAN_VERSION }} | |
realpath "$(command -v gfortran)" | |
- name: Set up MATLAB | |
uses: matlab-actions/[email protected] | |
with: | |
release: ${{ env.MATLAB_RELEASE }} | |
- name: Run script | |
uses: matlab-actions/[email protected] | |
with: | |
command: | | |
cd('crash'); | |
copyfile(fullfile(pwd(), 'fix', '${{ matrix.fix }}'), fullfile(pwd(), 'crash.m')); | |
if strcmpi('${{ matrix.crash_type }}', 'default') | |
if ${{ matrix.crash_indicator }} | |
crash; | |
end | |
else | |
if ${{ matrix.crash_indicator }} | |
crash('${{ matrix.crash_type }}') | |
else | |
crash('${{ matrix.crash_type }}', false) | |
end | |
end |