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

Building ubuntu and debian inside docker #115

Merged
merged 26 commits into from
Aug 10, 2021

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Aug 9, 2021

Following on from the last DAGMC meeting here is a PR that attempts to build the plugin for debian 10.10

The approach taken is to use a docker container to build linux flavours (ubuntu 21.04, ubuntu 20.04, debian 10.10) and to use the base github actions (without a docker container) to build for mac os.

This appears to work given the constraints:

  • containerization of mac is not currently possible

This appears to help with #112 as the plugin can be build for a few more OS and OS versions.

@shimwell shimwell marked this pull request as draft August 9, 2021 13:59
@shimwell
Copy link
Member Author

shimwell commented Aug 9, 2021

Everything appears to be building 🎉 thanks @bam241 for getting this started

@shimwell shimwell marked this pull request as ready for review August 9, 2021 15:09
Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes to clean things up.

At some point we should review the overall design to increase reuse of things rather than maintaining different scripts.

.github/workflows/unix_linux.yml Outdated Show resolved Hide resolved
.github/workflows/unix_linux.yml Outdated Show resolved Hide resolved
.github/workflows/unix_linux.yml Show resolved Hide resolved
.github/workflows/unix_linux.yml Outdated Show resolved Hide resolved
@shimwell
Copy link
Member Author

shimwell commented Aug 9, 2021

I've addressed all the suggestions and done as recommended, thanks for the review. Let's see how it does with the CI building process.

@shimwell
Copy link
Member Author

shimwell commented Aug 9, 2021

A few changes to clean things up.

At some point we should review the overall design to increase reuse of things rather than maintaining different scripts.

Sounds like a good plan, I think once GH actions allows containers of Mac OS there is some recombination that can be done

@bam241
Copy link
Member

bam241 commented Aug 10, 2021

There some issues with the plug-in artifacts uploads: https://github.com/svalinn/Cubit-plugin/actions/runs/1114012215
And:

https://github.com/svalinn/Cubit-plugin/actions/runs/1114012218

One also can test those individually to ensure they are working as intended :)

@bam241
Copy link
Member

bam241 commented Aug 10, 2021

I meant test them locally

@bam241
Copy link
Member

bam241 commented Aug 10, 2021

A few changes to clean things up.

At some point we should review the overall design to increase reuse of things rather than maintaining different scripts.

Sounds like a good plan, I think once GH actions allows containers of Mac OS there is some recombination that can be done

This is very unlikely to happen as it will broken general usage conditions of MacOS: you can only use macOS on a Mac machine...
I.e. virtualization of macOS is only allowed on a Mac host.... allowing it on docker will imply requiring a lot of safeguards on the docker implementation side to make sure you cannot run a macOS is on a non-Mac host...
Multi-platform virtualizer apps tended to stay away from those complication in the past

shimwell and others added 2 commits August 10, 2021 10:23
Co-authored-by: Baptiste Mouginot <15145274+bam241@users.noreply.github.com>
Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change would be required for Mac as well :)

.github/workflows/unix_mac.yml Show resolved Hide resolved
Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something happened to SUDO

}

function linux_install_prerequisites() {
TZ=America/Chicago
$SUDO ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
$SUDO sh -c 'echo $TZ > /etc/timezone'
$SUDO apt-get update -y
$SUDO apt-get install -y g++ libeigen3-dev patchelf git cmake curl lsb-release python3 lsb-core
if [ "$OS" == "ubuntu" ]; then
$SUDO apt-get install -y g++ libeigen3-dev patchelf git cmake curl lsb-release python3 lsb-core
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that this script relies on SUDO but it never gets set. Current behavior is probably that this resolves to nothing and doesn't matter... but we should either remove the $SUDO here, or set the variable as appropriate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now set SUDO to an empty string in the mac and linux github actions scripts in commit 6dc6a66

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that setting of SUDO to an empty string appears to have not worked

@shimwell
Copy link
Member Author

shimwell commented Aug 10, 2021

Looks like Trelis 17.1.0 is failing on Ubuntu 21.04 due to not finding HDF5

Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "")

This was not actually build previously so I shall add it to the exclude list.

Perhaps it is fair to exclude combinations of old cubit with new os or vice versa

Ubuntu 20.04 with Cubit 17.0.1 was previously excluded, so I think it is reasonable to also exclude 21.04 with this version of Cubit

@shimwell
Copy link
Member Author

Builds are passing for all the combinations 🎉

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering about another Ubuntu version for building?

.github/workflows/unix_linux.yml Show resolved Hide resolved
@gonuke
Copy link
Member

gonuke commented Aug 10, 2021

Thanks @shimwell - this gives us a good starting point to refine and grow

@gonuke gonuke merged commit bc13faf into develop Aug 10, 2021
@shimwell shimwell deleted the building_ubuntu_and_debian_inside_docker branch December 16, 2021 20:37
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.

3 participants