Skip to content

Commit

Permalink
Merge pull request #17 from sqlp/github-action
Browse files Browse the repository at this point in the history
experiment with github actions
  • Loading branch information
mcg1969 authored Apr 9, 2024
2 parents cdb0316 + 051478a commit 5782480
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,windows-latest,macos-latest,macos-14]
steps:
- name: Retrieve the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Remove old MEX files
shell: bash
run: rm Solver/Mexfun/*.mex*
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.os == 'macos-14' && 'R2023b' || ( matrix.os == 'windows-latest' && 'R2021b' || 'R2021a' ) }}
- name: Build MEX files
uses: matlab-actions/run-command@v2
with:
command: install_sdpt3 -rebuild
- uses: actions/upload-artifact@v4
with:
name: mexfiles-${{ matrix.os }}
path: |
Solver/Mexfun/*.mex*
package:
needs: build
runs-on: ubuntu-latest
steps:
- name: Retrieve the source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: mexfiles-ubuntu-latest
- uses: actions/download-artifact@v4
with:
name: mexfiles-windows-latest
- uses: actions/download-artifact@v4
with:
name: mexfiles-macos-latest
- uses: actions/download-artifact@v4
with:
name: mexfiles-macos-14
- name: Show files, build archives
run: |
mv *.mex* Solver/Mexfun/
mkdir ../archives
zip -r ../archives/sdpt3.zip . -x '.git/*' -x '.github/*'
tar cfz ../archives/sdpt3.tgz --exclude "./.git" --exclude "./.github" .
echo "--------"
tar tfz ../archives/sdpt3.tgz
echo "--------"
zipinfo ../archives/sdpt3.zip
echo "--------"
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
../archives/sdpt3.tgz
../archives/sdpt3.zip
1 change: 1 addition & 0 deletions install_sdpt3.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function install_sdpt3( varargin )
VERSION = [1,0.01]*sscanf(version,'%d.%d');
if ISOCTAVE, prog = 'Octave'; else prog = 'Matlab'; end
COMPUTER = computer;
IS64BIT = strcmp(COMPUTER(end-1:end), '64');
mext = mexext;

%
Expand Down

0 comments on commit 5782480

Please sign in to comment.