Skip to content

Fix #11256 - Mac packaging: sign scipy/numpy dylibs + replace mactex with basictex#11265

Merged
mitchute merged 14 commits intoNatLabRockies:developfrom
jmarrec:11256_Mac_packaging
Oct 9, 2025
Merged

Fix #11256 - Mac packaging: sign scipy/numpy dylibs + replace mactex with basictex#11265
mitchute merged 14 commits intoNatLabRockies:developfrom
jmarrec:11256_Mac_packaging

Conversation

@jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Oct 9, 2025

Pull request overview

Description of the purpose of this PR

  • Sign the numpy/scipy dylibs (ghedesigner was added and it pulls these)
  • Mactex was used for building latex via brew install mactex-nogui. This can take up to 45 minutes, because that is a 4.0 GB package, and the CTAN mirrors are pretty crap sometimes.
    • Having a full distro is nice because you definitely aren't missing a single package...
    • But similar to Windows, we can figure out ahead of time what we need, and just install the missing ones
    • Having done that legwork, the install time takes 2min now!

Here is a workflow where it took 45 minutes:

https://github.com/jmarrec/EnergyPlus/actions/runs/18312690117/job/52144877361#step:7:136

image
Tue, 07 Oct 2025 12:32:27 GMT ==> Downloading from https://mirror.clarkson.edu/ctan/systems/mac/mactex/mactex-20250308.pkg
Tue, 07 Oct 2025 13:13:25 GMT ==> Installing dependencies: jbig2dec, openjpeg, webp, leptonica, libb2, libarchive, libidn, fribidi, pango, tesseract, ghostscript

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@jmarrec jmarrec self-assigned this Oct 9, 2025
@jmarrec jmarrec added Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) labels Oct 9, 2025
Comment on lines +26 to +28
# - os: macos-15
# generator: "Unix Makefiles"
# pretty: 'Mac arm64'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested with this workflow with macos-15 and macos-15-intel and ended up commenting them out for now. THe full run takes about 6min on macos-15 (arm64) and 8min30 on macos-15-intel.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just confirming - you'll turn this back on in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't part of the build matrix, so I didn't turn it on in the end.

I added it so I could test doc builds in a speedier fashion that launching a release, then commented it out.

Comment on lines +121 to +125
# sudo tlmgr list --only-installed --data name > ori_installed.lst
# sudo tlmgr install texliveonfly
# sudo texliveonfly --compiler=xelatex dependencies.tex
# sudo tlmgr list --only-installed --data name > new_installed.lst
# python -c "from pathlib import Path; ori_lines = set(Path('./ori_installed.lst').read_text().splitlines()); new_lines = set(Path('./new_installed.lst').read_text().splitlines()); new_pkgs = new_lines - ori_lines; print([x for x in new_pkgs if not x.startswith('texliveonfly')])"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially I just did tlmgr update --self and these commands to find out what I needed exactly.

I then replaced with sudo tlmgr install enumitem framed multirow siunitx as it's faster than using texliveonfly

Comment on lines +206 to +208
if: always()
with:
name: "AllDocumentation-${{ github.event.pull_request.head.sha }}"
name: "AllDocumentation-${{ matrix.os }}-${{ github.event.pull_request.head.sha }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm uploading the entire pdf folder for all runners, so we can spot check them

include:
- macos_dev_target: 12.1
os: macos-13
os: macos-15-intel
Copy link
Contributor Author

Choose a reason for hiding this comment

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

macos-13 is going to be removed in December, replae with macos-15-intel (EOL August 2027)

https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/

aria2c https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer
security import AppleWWDRCAG2.cer -k $KEYCHAIN_PATH
security import DeveloperIDG2CA.cer -k $KEYCHAIN_PATH
security import DeveloperIDG2CA.cer -k $KEYCHAIN_PATH || true # macos-15-intel seems to already have it
Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's weird but it's what it is...

Comment on lines +138 to +139
echo "Using brew to install basictex and adding it to PATH"
brew install --cask basictex
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Release mac: use basictex now

Comment on lines +153 to +159
- name: Install required LaTeX packages by building the Test document
shell: bash
working-directory: ./doc/test
run: |
sudo tlmgr update --self
sudo tlmgr install enumitem framed multirow siunitx
xelatex dependencies.tex
Copy link
Contributor Author

Choose a reason for hiding this comment

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

install what's needed, and build the test document. If it works, then it's not missing a package

Comment on lines +125 to +130
file(GLOB _PYTHON_SOS
"${CMAKE_INSTALL_PREFIX}/python_lib/lib-dynload/*.so"
"${CMAKE_INSTALL_PREFIX}/python_lib/lib-dynload/*.dylib"
"${CMAKE_INSTALL_PREFIX}/python_lib/scipy/.dylibs/*.dylib"
"${CMAKE_INSTALL_PREFIX}/python_lib/numpy/.dylibs/*.dylib"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign the numpy/scipy dylibs

@jmarrec
Copy link
Contributor Author

jmarrec commented Oct 9, 2025

I'm launching a final test release on my fork with all these changes at https://github.com/jmarrec/EnergyPlus/releases/tag/v25.2.0-pre-IOFreeze-6

image

@jmarrec jmarrec requested a review from mitchute October 9, 2025 13:14
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
@mitchute
Copy link
Collaborator

mitchute commented Oct 9, 2025

This is ready. You can turn Mac doc builds back on in a separate PR. Merging.

@mitchute mitchute merged commit 196dd91 into NatLabRockies:develop Oct 9, 2025
11 checks passed
@jmarrec jmarrec deleted the 11256_Mac_packaging branch October 10, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) NotIDDChange Code does not impact IDD (can be merged after IO freeze)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mac packaging is broken on last test release

4 participants