Skip to content

Commit c642ba9

Browse files
committed
remove mex files, add buliding to CI
1 parent 4a91f13 commit c642ba9

File tree

172 files changed

+221
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+221
-132
lines changed

.github/workflows/ci.yml

+177-121
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,188 @@
1-
name: Basic SeDuMi tests
2-
3-
# Controls when the action will run.
1+
name: CI
42
on:
5-
# Triggers the workflow on push or pull request events but only for the main branch
63
push:
7-
branches: [ master ]
4+
branches:
5+
- master
6+
tags:
7+
- '*'
88
pull_request:
9-
branches: [ master ]
10-
11-
workflow_dispatch:
12-
9+
branches:
10+
- master
1311
jobs:
14-
15-
matlab:
16-
name: Matlab (latest) on Ubuntu (latest)
17-
runs-on: ubuntu-latest
18-
19-
steps:
20-
- name: Check out repository
21-
uses: actions/checkout@v3
22-
23-
- name: Install MATLAB
24-
uses: matlab-actions/setup-matlab@v1
25-
26-
- name: Run basic SeDuMi tests
27-
uses: matlab-actions/run-command@v1
28-
with:
29-
command: cd examples; test_sedumi(1, 1);
30-
31-
32-
macos-octave:
33-
name: Octave (latest) on macOS (latest)
34-
runs-on: macos-latest
35-
12+
build-mex:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-20.04,windows-2019,macos-12,macos-14]
3617
steps:
37-
- name: Check out repository
38-
uses: actions/checkout@v3
39-
40-
- name: Install Octave by homebrew
41-
run: brew install octave
42-
43-
- name: Run basic SeDuMi tests
44-
run: octave --eval "cd examples; test_sedumi(1, 1);"
45-
46-
47-
windows-octave:
48-
name: Octave (latest) on MS Windows (latest)
49-
runs-on: windows-latest
50-
18+
- name: Retrieve the source code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Install MATLAB
23+
uses: matlab-actions/setup-matlab@v2
24+
with:
25+
release: ${{ matrix.os == 'macos-14' && 'R2023b' || ( matrix.os == 'windows-2019' && 'R2021b' || 'R2021a' ) }}
26+
- name: Build and test
27+
uses: matlab-actions/run-command@v2
28+
with:
29+
command: "install_sedumi -rebuild; cd examples; test_sedumi(1, 1)"
30+
- name: Upload MATLAB MEX files
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: mex-${{ matrix.os }}
34+
path: "*.mex*"
35+
build-oct:
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
matrix:
39+
os: [ubuntu-20.04,windows-2019,macos-12,macos-14]
5140
steps:
52-
- name: Check out repository
53-
uses: actions/checkout@v3
54-
55-
- name: Install Octave by Chocolatey
56-
run: choco install octave.portable
57-
58-
- name: Run basic SeDuMi tests
59-
run: octave-cli.exe --eval "cd examples; test_sedumi(1, 1);"
60-
61-
62-
ubuntu-20_04-octave:
63-
name: Octave 5.2.0 on Ubuntu 20.04
64-
runs-on: ubuntu-20.04
65-
41+
- name: Retrieve the source code
42+
uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
45+
- name: Install Octave
46+
shell: bash
47+
run: |
48+
if [ "${{ matrix.os }}" = ubuntu-20.04 ]; then
49+
sudo apt update
50+
sudo apt install --no-install-recommends octave liboctave-dev libopenblas-dev
51+
elif [ "${{ matrix.os }}" = windows-2019 ]; then
52+
choco install octave.portable
53+
else
54+
brew install octave
55+
fi
56+
- name: Build and test (Unix)
57+
if: matrix.os != 'windows-2019'
58+
run: octave --eval "install_sedumi -rebuild; test_sedumi(1, 1)"
59+
- name: Build and test (Windows)
60+
if: matrix.os == 'windows-2019'
61+
shell: cmd
62+
run: |
63+
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
64+
octave-cli.exe --no-gui --eval "install_sedumi -rebuild; test_sedumi(1, 1)"
65+
if %errorlevel% neq 0 exit /b %errorlevel%
66+
- name: Upload Octave MEX files
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: oct-${{ matrix.os }}
70+
path: "*.mex"
71+
package:
72+
needs: [build-mex,build-oct]
73+
runs-on: ubuntu-latest
6674
steps:
67-
- name: Check out repository
68-
uses: actions/checkout@v3
69-
70-
- name: Install Octave
71-
run: |
72-
sudo apt-get -y update
73-
sudo apt-get -y install octave liboctave-dev libopenblas-dev
74-
75-
- name: Run basic SeDuMi tests
76-
run: octave --eval "cd examples; test_sedumi(1, 1);"
77-
78-
79-
ubuntu-18_04-octave:
80-
name: Octave 4.2.2 on Ubuntu 18.04
81-
runs-on: ubuntu-18.04
82-
75+
- name: Retrieve the source code
76+
uses: actions/checkout@v4
77+
with:
78+
fetch-depth: 0
79+
- name: Retrieve artifacts
80+
uses: actions/download-artifact@v4
81+
- name: Move artifacts into place
82+
run: |
83+
mkdir -p o_lin && mv oct-ubuntu-*/* o_lin/
84+
mkdir -p o_win && mv oct-windows-*/* o_win/
85+
mkdir -p o_maci && mv oct-macos-12/* o_maci/
86+
mkdir -p o_maca && mv oct-macos-14/* o_maca/
87+
mv mex-*/* .
88+
rmdir mex-* oct-*
89+
- name: Show files, build archives
90+
run: |
91+
cd ..
92+
zip -r sedumi.zip sedumi -x 'sedumi/.git/*' -x 'sedumi/.github/*'
93+
tar cfz sedumi.tgz --exclude "sedumi/.git" --exclude "sedumi/.github" sedumi
94+
echo "--------"
95+
tar tfz sedumi.tgz
96+
echo "--------"
97+
zipinfo sedumi.zip
98+
echo "--------"
99+
mv sedumi.tgz sedumi.zip sedumi
100+
- name: Upload bundles
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: bundles
104+
path: |
105+
sedumi.zip
106+
sedumi.tgz
107+
matlab-tests:
108+
needs: package
109+
runs-on: ${{ matrix.os }}
110+
strategy:
111+
fail-fast: false
112+
matrix:
113+
os: [ubuntu-latest,macos-latest,windows-latest,macos-14]
83114
steps:
84-
- name: Check out repository
85-
uses: actions/checkout@v3
86-
87-
- name: Install Octave
88-
run: |
89-
sudo apt-get -y update
90-
sudo apt-get -y install octave liboctave-dev libopenblas-dev
91-
92-
- name: Run basic SeDuMi tests
93-
run: octave --eval "cd examples; test_sedumi(1, 1);"
94-
95-
96-
flatpak-octave:
97-
name: Octave (latest) on Flatpak (latest)
98-
runs-on: ubuntu-latest
99-
115+
- name: Retrieve artifact
116+
uses: actions/download-artifact@v4
117+
with:
118+
name: bundles
119+
- name: Unpack artifact
120+
run: tar xfz sdpt3.tgz --strip-components=1
121+
- name: Install latest MATLAB
122+
uses: matlab-actions/setup-matlab@v2
123+
- name: Run test
124+
uses: matlab-actions/run-command@v2
125+
with:
126+
command: "install_sedumi; cd examples; test_sedumi(1, 1)"
127+
octave-tests:
128+
needs: package
129+
runs-on: ${{ matrix.os }}
130+
strategy:
131+
fail-fast: false
132+
matrix:
133+
os: [ubuntu-latest,windows-latest,macos-latest,macos-14]
100134
steps:
101-
- name: Check out repository
102-
uses: actions/checkout@v3
103-
104-
- name: Install Octave
105-
run: |
106-
sudo apt-get -y update
107-
sudo apt-get -y install flatpak
108-
flatpak remote-add --user --if-not-exists \
109-
flathub https://flathub.org/repo/flathub.flatpakrepo
110-
flatpak install --user -y flathub org.octave.Octave
111-
112-
- name: Run basic SeDuMi tests
113-
run: |
114-
flatpak run org.octave.Octave --eval "cd examples; test_sedumi(1, 1);"
115-
116-
117-
snap-octave:
118-
name: Octave (latest) on Snap (latest)
135+
- name: Retrieve artifact
136+
uses: actions/download-artifact@v4
137+
with:
138+
name: bundles
139+
- name: Unpack artifact
140+
run: tar xfz sedumi.tgz --strip-components=1
141+
- name: Install Octave, Snap, Flatpak
142+
shell: bash
143+
run: |
144+
if [ "${{ matrix.os }}" = ubuntu-latest ]; then
145+
sudo apt update
146+
sudo apt install --no-install-recommends octave snapd flatpak
147+
elif [ "${{ matrix.os }}" = windows-latest ]; then
148+
choco install octave.portable
149+
else
150+
brew install octave
151+
fi
152+
- name: Run test
153+
if: matrix.os != 'windows-latest'
154+
run: octave --eval "install_sedumi; cd examples; test_sedumi(1, 1)"
155+
- name: Run test
156+
if: matrix.os == 'windows-latest'
157+
shell: cmd
158+
run: |
159+
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
160+
octave-cli.exe --no-gui --eval "install_sedumi; cd examples; test_sedumi(1, 1)"
161+
- name: Flatpak
162+
if: matrix.os == 'ubuntu-latest'
163+
run: |
164+
flatpak remote-add --user --if-not-exists \
165+
flathub https://flathub.org/repo/flathub.flatpakrepo
166+
flatpak install --user -y flathub org.octave.Octave
167+
flatpak run org.octave.Octave --eval "install_sedumi; cd examples; test_sedumi(1, 1)"
168+
flatpak uninstall --user -y org.octave.Octave
169+
- name: Snapd
170+
if: matrix.os == 'ubuntu-latest'
171+
run: |
172+
sudo snap install octave
173+
snap run octave --eval "install_sedumi; cd examples; test_sedumi(1, 1)"
174+
sudo snap remove octave
175+
publish:
176+
needs: [matlab-tests,octave-tests]
177+
if: startsWith(github.ref, 'refs/tags/')
119178
runs-on: ubuntu-latest
120-
121179
steps:
122-
- name: Check out repository
123-
uses: actions/checkout@v3
124-
125-
- name: Install Octave
126-
run: |
127-
sudo apt-get -y update
128-
sudo apt-get -y install snapd
129-
sudo snap install octave
130-
131-
- name: Run basic SeDuMi tests
132-
run: snap run octave --eval "cd examples; test_sedumi(1, 1);"
180+
- name: Retrieve artifacts
181+
uses: actions/download-artifact@v4
182+
with:
183+
name: bundles
184+
- uses: softprops/action-gh-release@v2
185+
with:
186+
files: |
187+
sedumi.tgz
188+
sedumi.zip

adendotd.mexa64

-11.1 KB
Binary file not shown.

adendotd.mexglx

-8.74 KB
Binary file not shown.

adendotd.mexmaci64

-12.6 KB
Binary file not shown.

adendotd.mexw32

-15 KB
Binary file not shown.

adendotd.mexw64

-42.5 KB
Binary file not shown.

adenscale.mexa64

-7.77 KB
Binary file not shown.

adenscale.mexglx

-6.09 KB
Binary file not shown.

adenscale.mexmaci64

-8.48 KB
Binary file not shown.

adenscale.mexw32

-11 KB
Binary file not shown.

adenscale.mexw64

-38 KB
Binary file not shown.

blkchol.mexa64

-16 KB
Binary file not shown.

blkchol.mexglx

-13.8 KB
Binary file not shown.

blkchol.mexmaci64

-17.4 KB
Binary file not shown.

blkchol.mexw32

-19 KB
Binary file not shown.

blkchol.mexw64

-47 KB
Binary file not shown.

bwblkslv.mexa64

-10.4 KB
Binary file not shown.

bwblkslv.mexglx

-8.47 KB
Binary file not shown.

bwblkslv.mexmaci64

-12.8 KB
Binary file not shown.

bwblkslv.mexw32

-13 KB
Binary file not shown.

bwblkslv.mexw64

-41 KB
Binary file not shown.

bwdpr1.mexa64

-11.3 KB
Binary file not shown.

bwdpr1.mexglx

-9.16 KB
Binary file not shown.

bwdpr1.mexmaci64

-12.8 KB
Binary file not shown.

bwdpr1.mexw32

-15 KB
Binary file not shown.

bwdpr1.mexw64

-43 KB
Binary file not shown.

cholsplit.mexa64

-7.98 KB
Binary file not shown.

cholsplit.mexglx

-6.28 KB
Binary file not shown.

cholsplit.mexmaci64

-8.61 KB
Binary file not shown.

cholsplit.mexw32

-11 KB
Binary file not shown.

cholsplit.mexw64

-39 KB
Binary file not shown.

choltmpsiz.mexa64

-7.73 KB
Binary file not shown.

choltmpsiz.mexglx

-6.07 KB
Binary file not shown.

choltmpsiz.mexmaci64

-8.53 KB
Binary file not shown.

choltmpsiz.mexw32

-11 KB
Binary file not shown.

choltmpsiz.mexw64

-38 KB
Binary file not shown.

ddot.mexa64

-13.9 KB
Binary file not shown.

ddot.mexglx

-10.5 KB
Binary file not shown.

ddot.mexmaci64

-13.3 KB
Binary file not shown.

ddot.mexw32

-14.5 KB
Binary file not shown.

ddot.mexw64

-43 KB
Binary file not shown.

dpr1fact.mexa64

-20.5 KB
Binary file not shown.

dpr1fact.mexglx

-17.6 KB
Binary file not shown.

dpr1fact.mexmaci64

-21.9 KB
Binary file not shown.

dpr1fact.mexw32

-22.5 KB
Binary file not shown.

dpr1fact.mexw64

-54 KB
Binary file not shown.

extractA.mexa64

-8.91 KB
Binary file not shown.

extractA.mexglx

-6.49 KB
Binary file not shown.

extractA.mexmaci64

-8.56 KB
Binary file not shown.

extractA.mexw32

-11.5 KB
Binary file not shown.

extractA.mexw64

-39 KB
Binary file not shown.

findblks.mexa64

-13.7 KB
Binary file not shown.

findblks.mexglx

-10.4 KB
Binary file not shown.

findblks.mexmaci64

-13.1 KB
Binary file not shown.

findblks.mexw32

-15.5 KB
Binary file not shown.

findblks.mexw64

-44.5 KB
Binary file not shown.

finsymbden.mexa64

-10.5 KB
Binary file not shown.

finsymbden.mexglx

-8.44 KB
Binary file not shown.

finsymbden.mexmaci64

-13 KB
Binary file not shown.

finsymbden.mexw32

-13 KB
Binary file not shown.

finsymbden.mexw64

-42 KB
Binary file not shown.

fwblkslv.mexa64

-11.3 KB
Binary file not shown.

fwblkslv.mexglx

-9.22 KB
Binary file not shown.

fwblkslv.mexmaci64

-12.9 KB
Binary file not shown.

fwblkslv.mexw32

-12.5 KB
Binary file not shown.

fwblkslv.mexw64

-40.5 KB
Binary file not shown.

fwdpr1.mexa64

-11.8 KB
Binary file not shown.

fwdpr1.mexglx

-9.62 KB
Binary file not shown.

fwdpr1.mexmaci64

-12.9 KB
Binary file not shown.

fwdpr1.mexw32

-15 KB
Binary file not shown.

fwdpr1.mexw64

-43 KB
Binary file not shown.

getada1.mexa64

-9.18 KB
Binary file not shown.

getada1.mexglx

-7.27 KB
Binary file not shown.

getada1.mexmaci64

-8.62 KB
Binary file not shown.

getada1.mexw32

-12.5 KB
Binary file not shown.

getada1.mexw64

-40.5 KB
Binary file not shown.

getada2.mexa64

-11.1 KB
Binary file not shown.

getada2.mexglx

-8.86 KB
Binary file not shown.

getada2.mexmaci64

-12.8 KB
Binary file not shown.

getada2.mexw32

-14 KB
Binary file not shown.

getada2.mexw64

-42 KB
Binary file not shown.

getada3.mexa64

-21.5 KB
Binary file not shown.

getada3.mexglx

-18.2 KB
Binary file not shown.

getada3.mexmaci64

-21.7 KB
Binary file not shown.

getada3.mexw32

-24.5 KB
Binary file not shown.

getada3.mexw64

-55 KB
Binary file not shown.

givensrot.mexa64

-11.4 KB
Binary file not shown.

givensrot.mexglx

-9.07 KB
Binary file not shown.

givensrot.mexmaci64

-12.7 KB
Binary file not shown.

givensrot.mexw32

-13.5 KB
Binary file not shown.

givensrot.mexw64

-41.5 KB
Binary file not shown.

incorder.mexa64

-10.1 KB
Binary file not shown.

incorder.mexglx

-8.08 KB
Binary file not shown.

incorder.mexmaci64

-13 KB
Binary file not shown.

incorder.mexw32

-12.5 KB
Binary file not shown.

incorder.mexw64

-40.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)