Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp CI #81

Merged
merged 4 commits into from
Apr 13, 2024
Merged

Revamp CI #81

merged 4 commits into from
Apr 13, 2024

Conversation

mcg1969
Copy link
Contributor

@mcg1969 mcg1969 commented Apr 10, 2024

Now that we can reliably install Matlab and Octave on all four key platforms, we can build the MEX files using CI.

This reworked CI process works as follows:

  1. First, it builds MEX files for each of four platforms (linux, macos intel, macos arm, windows) for MATLAB and Octave. It uses an older OS version, and the oldest MATLAB version possible, to maximize the chance of forward compatibility. It's not obvious how to select an older version of Octave, unfortunately.

  2. Second, it builds ZIP and TGZ bundles containing the source code plus all of the compiled MEX files.

  3. It then runs a functional test of those bundles on the latest versions of each OS, and MATLAB. This helps ensure that forward compatibility has been preserved, and that the bundle is complete.

@siko1056 I have implemented an equivalent CI strategy for SDPT3. Obviously, it's generally not good practice to have binaries in a source repo. But until now, we didn't really have an alternative, because we could not reliably build the MEX files in CI. This new approach allows us to do that.

Note that we lose 32-bin Linux and Windows with this, but at this point, that seems reasonable. But what we could do is restore just those platforms to the repo and indicate they are use at your own risk. I have no idea if anyone would even be trying to use them now!

@mcg1969 mcg1969 force-pushed the rebuild-ci branch 4 times, most recently from af32e78 to 77197be Compare April 10, 2024 18:28
@mcg1969 mcg1969 closed this Apr 10, 2024
@mcg1969 mcg1969 reopened this Apr 10, 2024
@mcg1969 mcg1969 requested a review from siko1056 April 10, 2024 18:47
@mcg1969 mcg1969 marked this pull request as draft April 10, 2024 18:50
@mcg1969 mcg1969 force-pushed the rebuild-ci branch 7 times, most recently from bc05efd to c642ba9 Compare April 10, 2024 21:23
@mcg1969 mcg1969 marked this pull request as ready for review April 10, 2024 21:41
@mcg1969
Copy link
Contributor Author

mcg1969 commented Apr 10, 2024

@siko1056 for Linux, I tried using the ubuntu-20.04 image to build the MEX files to get an older octave to compile against. The result is that it building against apt-installed Octave 5.2

The tests use ubuntu-22.04, as follow:

  • apt-installed Octave 6.4
  • flatpak Octave 9.1
  • snapd Octave 7.1

For some reason, the snapd test is failing when I do that. So I think I'm going to switch to ubuntu-22.04 for building to see if that resolves it.

@mcg1969
Copy link
Contributor Author

mcg1969 commented Apr 10, 2024

Nope, building with ubuntu-22.04 did not help. Given your existing tests, it would seem to be necessary to rebuild the mex files altogether for snapd Octave.

@mcg1969
Copy link
Contributor Author

mcg1969 commented Apr 13, 2024

I've been doing some digging and found that this is the error that prevents the precompiled mex files to work on snap:

/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/ubuntu/sedumi/partitA.mex)

If I recompile the mex files using snap octave, however, they work fine... and they work fine on apt octave as well. This is likely due to forward compatibility issues.

@mcg1969 mcg1969 force-pushed the rebuild-ci branch 5 times, most recently from 54531ea to 9fe52a9 Compare April 13, 2024 00:52
@mcg1969
Copy link
Contributor Author

mcg1969 commented Apr 13, 2024

OK, we're looking good. Building with snap provides enough forward compatibility for apt and flatpak.

@mcg1969 mcg1969 merged commit daef0b7 into master Apr 13, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant