Skip to content

Commit daef0b7

Browse files
authored
Merge pull request #81 from sqlp/rebuild-ci
Revamp CI
2 parents 4a91f13 + dd693ff commit daef0b7

File tree

173 files changed

+362
-201
lines changed

Some content is hidden

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

173 files changed

+362
-201
lines changed

.github/workflows/ci.yml

+201-119
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,214 @@
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-
12+
build-mex:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-20.04,windows-2019,macos-12,macos-14]
17+
steps:
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(0, 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+
fail-fast: false
39+
matrix:
40+
os: [ubuntu-20.04,windows-2019,macos-12,macos-14]
1941
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-
42+
- name: Retrieve the source code
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 0
46+
- name: Install Octave
47+
shell: bash
48+
run: |
49+
if [ "${{ matrix.os }}" = ubuntu-20.04 ]; then
50+
sudo apt update
51+
sudo snap install octave
52+
sudo apt install --no-install-recommends libopenblas-dev
53+
echo "OCTAVE=snap run octave" >>$GITHUB_ENV
54+
elif [ "${{ matrix.os }}" = windows-2019 ]; then
55+
choco install octave.portable
56+
else
57+
brew install octave
58+
echo "OCTAVE=octave" >>$GITHUB_ENV
59+
fi
60+
- name: Build and test (Unix)
61+
if: matrix.os != 'windows-2019'
62+
run: $OCTAVE --eval "install_sedumi -rebuild; test_sedumi(0, 1)"
63+
- name: Build and test (Windows)
64+
if: matrix.os == 'windows-2019'
65+
shell: cmd
66+
run: |
67+
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
68+
octave-cli.exe --no-gui --eval "install_sedumi -rebuild; test_sedumi(0, 1)"
69+
if %errorlevel% neq 0 exit /b %errorlevel%
70+
- name: Upload Octave MEX files
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: oct-${{ matrix.os }}
74+
path: "*.mex"
75+
package:
76+
needs: [build-mex,build-oct]
77+
runs-on: ubuntu-latest
3678
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-
79+
- name: Retrieve the source code
80+
uses: actions/checkout@v4
81+
with:
82+
fetch-depth: 0
83+
- name: Retrieve artifacts
84+
uses: actions/download-artifact@v4
85+
- name: Move artifacts into place
86+
run: |
87+
mkdir -p o_lin && mv oct-ubuntu-*/* o_lin/
88+
mkdir -p o_win && mv oct-windows-*/* o_win/
89+
mkdir -p o_maci && mv oct-macos-12/* o_maci/
90+
mkdir -p o_maca && mv oct-macos-14/* o_maca/
91+
mv mex-*/* .
92+
rmdir mex-* oct-*
93+
- name: Show files, build archives
94+
run: |
95+
cd ..
96+
zip -r sedumi.zip sedumi -x 'sedumi/.git/*' -x 'sedumi/.github/*'
97+
tar cfz sedumi.tgz --exclude "sedumi/.git" --exclude "sedumi/.github" sedumi
98+
echo "--------"
99+
tar tfz sedumi.tgz
100+
echo "--------"
101+
zipinfo sedumi.zip
102+
echo "--------"
103+
mv sedumi.tgz sedumi.zip sedumi
104+
- name: Upload bundles
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: bundles
108+
path: |
109+
sedumi.zip
110+
sedumi.tgz
111+
matlab-tests:
112+
needs: package
113+
runs-on: ${{ matrix.os }}
114+
strategy:
115+
fail-fast: false
116+
matrix:
117+
os: [ubuntu-latest,macos-latest,windows-latest,macos-14]
51118
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-
119+
- name: Retrieve artifact
120+
uses: actions/download-artifact@v4
121+
with:
122+
name: bundles
123+
- name: Unpack artifact
124+
run: tar xfz sedumi.tgz --strip-components=1
125+
- name: Install latest MATLAB
126+
uses: matlab-actions/setup-matlab@v2
127+
- name: Run test
128+
uses: matlab-actions/run-command@v2
129+
with:
130+
command: "install_sedumi; cd examples; test_sedumi(0, 1)"
131+
octave-tests:
132+
needs: package
133+
runs-on: ${{ matrix.os }}
134+
strategy:
135+
fail-fast: false
136+
matrix:
137+
os: [ubuntu-latest,windows-latest,macos-latest,macos-14]
66138
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-
139+
- name: Retrieve artifact
140+
uses: actions/download-artifact@v4
141+
with:
142+
name: bundles
143+
- name: Unpack artifact
144+
run: tar xfz sedumi.tgz --strip-components=1
145+
- name: Install Octave, Snap, Flatpak
146+
shell: bash
147+
run: |
148+
if [ "${{ matrix.os }}" = ubuntu-latest ]; then
149+
sudo apt update
150+
sudo apt install --no-install-recommends octave
151+
elif [ "${{ matrix.os }}" = windows-latest ]; then
152+
choco install octave.portable
153+
else
154+
brew install octave
155+
fi
156+
- name: Run test (Unix)
157+
shell: bash
158+
run: octave --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
159+
- name: Run test (Windows)
160+
if: matrix.os == 'windows-latest'
161+
shell: cmd
162+
run: |
163+
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
164+
octave-cli.exe --no-gui --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
165+
flatpak-test:
166+
needs: package
167+
runs-on: ubuntu-latest
83168
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)
169+
- name: Retrieve artifact
170+
uses: actions/download-artifact@v4
171+
with:
172+
name: bundles
173+
- name: Unpack artifact
174+
run: tar xfz sedumi.tgz --strip-components=1
175+
- name: Install Flatpak octave
176+
run: |
177+
sudo apt update
178+
sudo apt install flatpak
179+
flatpak remote-add --user --if-not-exists \
180+
flathub https://flathub.org/repo/flathub.flatpakrepo
181+
flatpak install --user -y flathub org.octave.Octave
182+
- name: Run test
183+
shell: bash
184+
run: flatpak run org.octave.Octave --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
185+
snap-test:
186+
needs: package
98187
runs-on: ubuntu-latest
99-
100188
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)
189+
- name: Retrieve artifact
190+
uses: actions/download-artifact@v4
191+
with:
192+
name: bundles
193+
- name: Unpack artifact
194+
run: tar xfz sedumi.tgz --strip-components=1
195+
- name: Install Flatpak octave
196+
run: |
197+
sudo snap install octave
198+
- name: Run test
199+
shell: bash
200+
run: snap run octave --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
201+
publish:
202+
needs: [matlab-tests,octave-tests,flatpak-test,snap-test]
203+
if: startsWith(github.ref, 'refs/tags/')
119204
runs-on: ubuntu-latest
120-
121205
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);"
206+
- name: Retrieve artifacts
207+
uses: actions/download-artifact@v4
208+
with:
209+
name: bundles
210+
- uses: softprops/action-gh-release@v2
211+
with:
212+
files: |
213+
sedumi.tgz
214+
sedumi.zip

README.md

+16

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)