Skip to content

Commit

Permalink
Merge pull request #81 from sqlp/rebuild-ci
Browse files Browse the repository at this point in the history
Revamp CI
  • Loading branch information
mcg1969 authored Apr 13, 2024
2 parents 4a91f13 + dd693ff commit daef0b7
Show file tree
Hide file tree
Showing 173 changed files with 362 additions and 201 deletions.
320 changes: 201 additions & 119 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,132 +1,214 @@
name: Basic SeDuMi tests

# Controls when the action will run.
name: CI
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
branches:
- master
tags:
- '*'
pull_request:
branches: [ master ]

workflow_dispatch:

branches:
- master
jobs:

matlab:
name: Matlab (latest) on Ubuntu (latest)
runs-on: ubuntu-latest

build-mex:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04,windows-2019,macos-12,macos-14]
steps:
- name: Retrieve the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.os == 'macos-14' && 'R2023b' || ( matrix.os == 'windows-2019' && 'R2021b' || 'R2021a' ) }}
- name: Build and test
uses: matlab-actions/run-command@v2
with:
command: "install_sedumi -rebuild; cd examples; test_sedumi(0, 1)"
- name: Upload MATLAB MEX files
uses: actions/upload-artifact@v4
with:
name: mex-${{ matrix.os }}
path: "*.mex*"
build-oct:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04,windows-2019,macos-12,macos-14]
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1

- name: Run basic SeDuMi tests
uses: matlab-actions/run-command@v1
with:
command: cd examples; test_sedumi(1, 1);


macos-octave:
name: Octave (latest) on macOS (latest)
runs-on: macos-latest

- name: Retrieve the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Octave
shell: bash
run: |
if [ "${{ matrix.os }}" = ubuntu-20.04 ]; then
sudo apt update
sudo snap install octave
sudo apt install --no-install-recommends libopenblas-dev
echo "OCTAVE=snap run octave" >>$GITHUB_ENV
elif [ "${{ matrix.os }}" = windows-2019 ]; then
choco install octave.portable
else
brew install octave
echo "OCTAVE=octave" >>$GITHUB_ENV
fi
- name: Build and test (Unix)
if: matrix.os != 'windows-2019'
run: $OCTAVE --eval "install_sedumi -rebuild; test_sedumi(0, 1)"
- name: Build and test (Windows)
if: matrix.os == 'windows-2019'
shell: cmd
run: |
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
octave-cli.exe --no-gui --eval "install_sedumi -rebuild; test_sedumi(0, 1)"
if %errorlevel% neq 0 exit /b %errorlevel%
- name: Upload Octave MEX files
uses: actions/upload-artifact@v4
with:
name: oct-${{ matrix.os }}
path: "*.mex"
package:
needs: [build-mex,build-oct]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Install Octave by homebrew
run: brew install octave

- name: Run basic SeDuMi tests
run: octave --eval "cd examples; test_sedumi(1, 1);"


windows-octave:
name: Octave (latest) on MS Windows (latest)
runs-on: windows-latest

- name: Retrieve the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Retrieve artifacts
uses: actions/download-artifact@v4
- name: Move artifacts into place
run: |
mkdir -p o_lin && mv oct-ubuntu-*/* o_lin/
mkdir -p o_win && mv oct-windows-*/* o_win/
mkdir -p o_maci && mv oct-macos-12/* o_maci/
mkdir -p o_maca && mv oct-macos-14/* o_maca/
mv mex-*/* .
rmdir mex-* oct-*
- name: Show files, build archives
run: |
cd ..
zip -r sedumi.zip sedumi -x 'sedumi/.git/*' -x 'sedumi/.github/*'
tar cfz sedumi.tgz --exclude "sedumi/.git" --exclude "sedumi/.github" sedumi
echo "--------"
tar tfz sedumi.tgz
echo "--------"
zipinfo sedumi.zip
echo "--------"
mv sedumi.tgz sedumi.zip sedumi
- name: Upload bundles
uses: actions/upload-artifact@v4
with:
name: bundles
path: |
sedumi.zip
sedumi.tgz
matlab-tests:
needs: package
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,macos-latest,windows-latest,macos-14]
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Install Octave by Chocolatey
run: choco install octave.portable

- name: Run basic SeDuMi tests
run: octave-cli.exe --eval "cd examples; test_sedumi(1, 1);"


ubuntu-20_04-octave:
name: Octave 5.2.0 on Ubuntu 20.04
runs-on: ubuntu-20.04

- name: Retrieve artifact
uses: actions/download-artifact@v4
with:
name: bundles
- name: Unpack artifact
run: tar xfz sedumi.tgz --strip-components=1
- name: Install latest MATLAB
uses: matlab-actions/setup-matlab@v2
- name: Run test
uses: matlab-actions/run-command@v2
with:
command: "install_sedumi; cd examples; test_sedumi(0, 1)"
octave-tests:
needs: package
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,windows-latest,macos-latest,macos-14]
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Install Octave
run: |
sudo apt-get -y update
sudo apt-get -y install octave liboctave-dev libopenblas-dev
- name: Run basic SeDuMi tests
run: octave --eval "cd examples; test_sedumi(1, 1);"


ubuntu-18_04-octave:
name: Octave 4.2.2 on Ubuntu 18.04
runs-on: ubuntu-18.04

- name: Retrieve artifact
uses: actions/download-artifact@v4
with:
name: bundles
- name: Unpack artifact
run: tar xfz sedumi.tgz --strip-components=1
- name: Install Octave, Snap, Flatpak
shell: bash
run: |
if [ "${{ matrix.os }}" = ubuntu-latest ]; then
sudo apt update
sudo apt install --no-install-recommends octave
elif [ "${{ matrix.os }}" = windows-latest ]; then
choco install octave.portable
else
brew install octave
fi
- name: Run test (Unix)
shell: bash
run: octave --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
- name: Run test (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: |
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
octave-cli.exe --no-gui --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
flatpak-test:
needs: package
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Install Octave
run: |
sudo apt-get -y update
sudo apt-get -y install octave liboctave-dev libopenblas-dev
- name: Run basic SeDuMi tests
run: octave --eval "cd examples; test_sedumi(1, 1);"


flatpak-octave:
name: Octave (latest) on Flatpak (latest)
- name: Retrieve artifact
uses: actions/download-artifact@v4
with:
name: bundles
- name: Unpack artifact
run: tar xfz sedumi.tgz --strip-components=1
- name: Install Flatpak octave
run: |
sudo apt update
sudo apt install flatpak
flatpak remote-add --user --if-not-exists \
flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.octave.Octave
- name: Run test
shell: bash
run: flatpak run org.octave.Octave --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
snap-test:
needs: package
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Install Octave
run: |
sudo apt-get -y update
sudo apt-get -y install flatpak
flatpak remote-add --user --if-not-exists \
flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.octave.Octave
- name: Run basic SeDuMi tests
run: |
flatpak run org.octave.Octave --eval "cd examples; test_sedumi(1, 1);"
snap-octave:
name: Octave (latest) on Snap (latest)
- name: Retrieve artifact
uses: actions/download-artifact@v4
with:
name: bundles
- name: Unpack artifact
run: tar xfz sedumi.tgz --strip-components=1
- name: Install Flatpak octave
run: |
sudo snap install octave
- name: Run test
shell: bash
run: snap run octave --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
publish:
needs: [matlab-tests,octave-tests,flatpak-test,snap-test]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Install Octave
run: |
sudo apt-get -y update
sudo apt-get -y install snapd
sudo snap install octave
- name: Run basic SeDuMi tests
run: snap run octave --eval "cd examples; test_sedumi(1, 1);"
- name: Retrieve artifacts
uses: actions/download-artifact@v4
with:
name: bundles
- uses: softprops/action-gh-release@v2
with:
files: |
sedumi.tgz
sedumi.zip
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SeDuMi: Optimization over symmetric cones

#### [Click here](https://github.com/sqlp/sedumi/releases/latest) to download the latest SeDuMi bundle. These bundles now include pre-compiled MATLAB and Octave MEX files files for Windows, Linux, and macOS (Intel and Apple Silicon).

**SeDuMi (Self-Dual-Minimization)** is a Matlab/GNU Octave package for solving
convex optimization problems involving linear equations and inequalities,
second-order cone constraints, and semidefinite constraints (linear matrix
Expand Down Expand Up @@ -89,3 +91,17 @@ You are welcome to submit bug reports or request for help on the
[GitHub issue page](https://github.com/sqlp/sedumi/issues).
We cannot guarantee that they will be addressed in a timely fashion,
we will do our best.

### Development notes

As of April 2024, this repository uses
[GitHub Actions](https://github.com/features/actions) to compile
MEX files for Linux, Windows, and macOS (both Intel and Apple
Silicon variants). Whenever a new Git tag is pushed to the
repository, these actions automatically create `.zip` and `.tgz`
bundles of that version of the code, including those compiled
MEX files, and publishes those bundles to the
[Releases](https://github.com/sqlp/sedumi/releases) page.

If you wish to contribute fixes or improvements to this repository, please feel free to submit a
[pull request](https://github.com/sqlp/sedumi/pulls).
Binary file removed adendotd.mexa64
Binary file not shown.
Binary file removed adendotd.mexglx
Binary file not shown.
Binary file removed adendotd.mexmaci64
Binary file not shown.
Binary file removed adendotd.mexw32
Binary file not shown.
Binary file removed adendotd.mexw64
Binary file not shown.
Binary file removed adenscale.mexa64
Binary file not shown.
Binary file removed adenscale.mexglx
Binary file not shown.
Binary file removed adenscale.mexmaci64
Binary file not shown.
Binary file removed adenscale.mexw32
Binary file not shown.
Binary file removed adenscale.mexw64
Binary file not shown.
Binary file removed blkchol.mexa64
Binary file not shown.
Binary file removed blkchol.mexglx
Binary file not shown.
Binary file removed blkchol.mexmaci64
Binary file not shown.
Binary file removed blkchol.mexw32
Binary file not shown.
Binary file removed blkchol.mexw64
Binary file not shown.
Binary file removed bwblkslv.mexa64
Binary file not shown.
Binary file removed bwblkslv.mexglx
Binary file not shown.
Binary file removed bwblkslv.mexmaci64
Binary file not shown.
Binary file removed bwblkslv.mexw32
Binary file not shown.
Binary file removed bwblkslv.mexw64
Binary file not shown.
Binary file removed bwdpr1.mexa64
Binary file not shown.
Binary file removed bwdpr1.mexglx
Binary file not shown.
Binary file removed bwdpr1.mexmaci64
Binary file not shown.
Binary file removed bwdpr1.mexw32
Binary file not shown.
Binary file removed bwdpr1.mexw64
Binary file not shown.
Binary file removed cholsplit.mexa64
Binary file not shown.
Binary file removed cholsplit.mexglx
Binary file not shown.
Binary file removed cholsplit.mexmaci64
Binary file not shown.
Binary file removed cholsplit.mexw32
Binary file not shown.
Binary file removed cholsplit.mexw64
Binary file not shown.
Binary file removed choltmpsiz.mexa64
Binary file not shown.
Binary file removed choltmpsiz.mexglx
Binary file not shown.
Binary file removed choltmpsiz.mexmaci64
Binary file not shown.
Binary file removed choltmpsiz.mexw32
Binary file not shown.
Binary file removed choltmpsiz.mexw64
Binary file not shown.
Binary file removed ddot.mexa64
Binary file not shown.
Binary file removed ddot.mexglx
Binary file not shown.
Binary file removed ddot.mexmaci64
Binary file not shown.
Binary file removed ddot.mexw32
Binary file not shown.
Binary file removed ddot.mexw64
Binary file not shown.
Binary file removed dpr1fact.mexa64
Binary file not shown.
Binary file removed dpr1fact.mexglx
Binary file not shown.
Binary file removed dpr1fact.mexmaci64
Binary file not shown.
Binary file removed dpr1fact.mexw32
Binary file not shown.
Binary file removed dpr1fact.mexw64
Binary file not shown.
Binary file removed extractA.mexa64
Binary file not shown.
Binary file removed extractA.mexglx
Binary file not shown.
Binary file removed extractA.mexmaci64
Binary file not shown.
Binary file removed extractA.mexw32
Binary file not shown.
Binary file removed extractA.mexw64
Binary file not shown.
Binary file removed findblks.mexa64
Binary file not shown.
Binary file removed findblks.mexglx
Binary file not shown.
Binary file removed findblks.mexmaci64
Binary file not shown.
Binary file removed findblks.mexw32
Binary file not shown.
Binary file removed findblks.mexw64
Binary file not shown.
Binary file removed finsymbden.mexa64
Binary file not shown.
Binary file removed finsymbden.mexglx
Binary file not shown.
Binary file removed finsymbden.mexmaci64
Binary file not shown.
Binary file removed finsymbden.mexw32
Binary file not shown.
Binary file removed finsymbden.mexw64
Binary file not shown.
Binary file removed fwblkslv.mexa64
Binary file not shown.
Binary file removed fwblkslv.mexglx
Binary file not shown.
Binary file removed fwblkslv.mexmaci64
Binary file not shown.
Binary file removed fwblkslv.mexw32
Binary file not shown.
Binary file removed fwblkslv.mexw64
Binary file not shown.
Binary file removed fwdpr1.mexa64
Binary file not shown.
Binary file removed fwdpr1.mexglx
Binary file not shown.
Binary file removed fwdpr1.mexmaci64
Binary file not shown.
Binary file removed fwdpr1.mexw32
Binary file not shown.
Binary file removed fwdpr1.mexw64
Binary file not shown.
Binary file removed getada1.mexa64
Binary file not shown.
Binary file removed getada1.mexglx
Binary file not shown.
Binary file removed getada1.mexmaci64
Binary file not shown.
Binary file removed getada1.mexw32
Binary file not shown.
Binary file removed getada1.mexw64
Binary file not shown.
Binary file removed getada2.mexa64
Binary file not shown.
Binary file removed getada2.mexglx
Binary file not shown.
Binary file removed getada2.mexmaci64
Binary file not shown.
Binary file removed getada2.mexw32
Binary file not shown.
Binary file removed getada2.mexw64
Binary file not shown.
Binary file removed getada3.mexa64
Binary file not shown.
Binary file removed getada3.mexglx
Binary file not shown.
Binary file removed getada3.mexmaci64
Binary file not shown.
Binary file removed getada3.mexw32
Binary file not shown.
Binary file removed getada3.mexw64
Binary file not shown.
Binary file removed givensrot.mexa64
Binary file not shown.
Binary file removed givensrot.mexglx
Binary file not shown.
Binary file removed givensrot.mexmaci64
Binary file not shown.
Binary file removed givensrot.mexw32
Binary file not shown.
Binary file removed givensrot.mexw64
Binary file not shown.
Binary file removed incorder.mexa64
Binary file not shown.
Binary file removed incorder.mexglx
Binary file not shown.
Binary file removed incorder.mexmaci64
Binary file not shown.
Binary file removed incorder.mexw32
Binary file not shown.
Binary file removed incorder.mexw64
Binary file not shown.
Loading

0 comments on commit daef0b7

Please sign in to comment.