giovannibussi / macports-ci Goto Github PK
View Code? Open in Web Editor NEWSimplify MacPorts setup on Travis-CI
License: MIT License
Simplify MacPorts setup on Travis-CI
License: MIT License
I had a good experience zipping and restoring my entire MacPorts prefix into a /tmp subdirectory when working on a shared macOS computer. (I had a tight quota for my home dir, that is the reason for zipping. The computer's /tmp would be wiped every night.)
I believe that it should be possible to use Travis CI cache feature for the entire /opt/local subtreee and save time on repeatedly installing MacPorts, and the installing the same ports over and over again.
It would require logic to skip MacPorts install in case it is already present, and logic to uninstall unused old versions of ports, so they don't accumulate in the cache. The sudo port uninstall inactive
might be a start.
Anybody experimented with Travis cache before? I tried the following, but it did not have any effect (binary packages were fetched over the network again, not reused from /opt/local/var/macports/software
). Also, I'd like to cache the unpacked packages. Unpacking the entire cache at once should be faster than unpacking ports one by one.
before_script:
# configure local archive site
- |
sudo dd of=/opt/local/etc/macports/archive_sites.conf <<EOF
name local
urls file:///opt/local/var/macports/software
EOF
# install ports
cache:
directories:
- /opt/local/var/macports/software
before_cache:
- sudo port uninstall inactive
edit: I took inspiration from https://trac.macports.org/wiki/howto/ShareArchives
It does not disturb the installation but it looks not functional. To be checked
In the case of OS version 10.xx.x, it works fine. It returns 10.xx.
But in the case of OS version 10.xx, it returns 10.
I faced this issue in macOS Catalina until I updated it to 10.15.1.
Thanks a lot for making this installation script!
However, when I'm trying this out on GitHub Action's new macos-14
M1 runner, I'm having the following error:
macports-ci: install
macports-ci: keeping HomeBrew
macports-ci: prefix=/opt/local
macports-ci: Installing from binary
macports-ci: Sync mode=tarball
/var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/tmp.XSpFoyLs3U ~/work/pacaptr/pacaptr
macports-ci: Unknown OSX version 14.2
As per https://www.macports.org/install.php Sonoma seems to be officially supported by now.
Thanks again in advance!
Any change of supporting this. My Travis build is using macOS 11.2.
probably no big deal at this point
set-env
and add-path
are deprecated in Github Actions. I think your script still uses them because I can see a bunch of warnings in the last Actions run in this repository - https://github.com/GiovanniBussi/macports-ci/actions/runs/299832976 and I also get a bunch of warnings downstream in my repository - https://github.com/reikdas/cling/actions/runs/309226905. Could these please be fixed? Thanks!
If it is required to use MacPorts, maybe it should be done automatically in the script?
Hi, could you declare a license for this, something like MIT or Apache 2?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.