Skip to content

Commit

Permalink
240421.100025.HKT revise complile_mex.yml to disable macos-arm64 for …
Browse files Browse the repository at this point in the history
…the moment
  • Loading branch information
zaikunzhang committed Apr 21, 2024
1 parent f81371d commit 565e911
Showing 1 changed file with 63 additions and 60 deletions.
123 changes: 63 additions & 60 deletions .github/workflows/compile_mex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Compile MEX
on:
# Trigger the workflow on push or pull request
#push:
pull_request: # DANGEROUS! MUST be disabled for self-hosted runners!
#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 0 * * *'
Expand Down Expand Up @@ -73,8 +73,6 @@ jobs:
with:
ref: ${{ github.event.inputs.git-ref }}
submodules: recursive
# 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.

- name: Miscellaneous setup
run: bash .github/scripts/misc_setup
Expand Down Expand Up @@ -105,21 +103,22 @@ jobs:
with:
release: ${{ matrix.matlab }}
cache: true
products: Parallel_Computing_Toolbox

- name: Compile the MEX functions
uses: matlab-actions/run-command@v2.1.1
with:
startup-options: -nojvm -noopengl -logfile matlab/interfaces/private/build.log
command: |
ver;
options.half = false;
options.single = strcmp('${{ matrix.os }}', 'macos-11') && verLessThan('matlab', '9.11'); % On macos-11 with MATLAB R2021b, MEX is slow
options.quadruple = options.single;
options.debug = true;
options.single = true;
options.quadruple = true;
options.classical = false;
options.verbose = true;
options
setup(options);
testprima;
cd matlab/examples;
rosenbrock_example;
- name: Store artifacts
uses: actions/upload-artifact@v4.3.1
Expand All @@ -134,55 +133,59 @@ jobs:
!./*.json
mex_mac_silicon:
name: Compile MEX, macOS ARM64
runs-on: [self-hosted, macOS, ARM64]
strategy:
fail-fast: false

steps:
- name: Clone Repository (Latest)
uses: actions/checkout@v4
if: github.event.inputs.git-ref == ''
with:
submodules: recursive
- name: Clone Repository (Custom Ref)
uses: actions/checkout@v4
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
submodules: recursive

- name: Miscellaneous setup
run: |
bash .github/scripts/misc_setup
echo "PATH=$PATH:/Applications/MATLAB_R2023b.app/bin/" >> $GITHUB_ENV
- name: Conduct the test
uses: matlab-actions/run-command@v2.1.1
with:
startup-options: -nojvm -noopengl -logfile output.log
command: |
fprintf('\nhello!\n');
# options.debug = true;
# options.half = true;
# options.single = true;
# options.quadruple = true;
# options.classical = false;
# options.verbose = true;
# setup(options);
# testprima;
# cd matlab/examples
# rosenbrock_example

- name: Store artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: prima-macos-arm64-${{ env.MATLAB_VERSION }}
path: |
./*
!./benchmark
!./.*
!./*.log
!./*.dot
!./*.json
# mex_mac_silicon:
# name: Compile MEX, macOS ARM64
# runs-on: [self-hosted, macOS, ARM64]
# strategy:
# fail-fast: false

# steps:
# - name: Clone Repository (Latest)
# uses: actions/checkout@v4
# if: github.event.inputs.git-ref == ''
# with:
# submodules: recursive
# - name: Clone Repository (Custom Ref)
# uses: actions/checkout@v4
# if: github.event.inputs.git-ref != ''
# with:
# ref: ${{ github.event.inputs.git-ref }}
# submodules: recursive

# - name: Miscellaneous setup
# run: |
# bash .github/scripts/misc_setup
# echo "PATH=$PATH:$(dirname ${{ env.MATLAB }})" >> $GITHUB_ENV

# - name: Check whether matlab is on the path
# run: |
# echo "$PATH"
# which matlab

# - name: Conduct the test
# uses: matlab-actions/run-command@v2.1.1
# with:
# startup-options: -nojvm -noopengl -logfile matlab/interfaces/private/build.log
# command: |
# ver;
# options.half = true;
# options.single = true;
# options.quadruple = true;
# options.debug = true;
# options.classical = false;
# options.verbose = true;
# options
# setup(options);
# testprima;

# - name: Store artifacts
# uses: actions/upload-artifact@v4.3.1
# with:
# name: prima-macos-arm64-${{ env.MATLAB_VERSION }}
# path: |
# ./*
# !./benchmark
# !./.*
# !./*.log
# !./*.dot
# !./*.json

0 comments on commit 565e911

Please sign in to comment.