Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: macOS
on:
push:
pull_request:
schedule:
- cron: '33 3 * * *'
jobs:
macOS-minimal:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, macos-11]
steps:
- uses: actions/checkout@v2
- uses: Homebrew/actions/setup-homebrew@master
- uses: ./
with:
cvmfs_repositories: 'sft.cern.ch'
- name: Test CernVM-FS
run: |
echo "### Dump default.local ###"
cat /etc/cvmfs/default.local
echo "### Try to ls on /Users/Shared/cvmfs/sft.cern.ch/ ###"
ls /Users/Shared/cvmfs/sft.cern.ch/
echo "### Try to ls on /cvmfs/sft.cern.ch/ ###"
ls /cvmfs/sft.cern.ch/
19 changes: 12 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,10 @@ inputs:
cvmfs_macos_pkg_location:
description: 'Location from where to download the masOS pkg package of CernVM-FS'
required: false
default: 'http://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-latest.pkg'
#default: 'http://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-latest.pkg'
# this nightly build is based on the cvmfs mac-fuse-t branch
# TODO: change back to latest once it is released
default: 'http://ecsft.cern.ch/dist/cvmfs/nightlies/cvmfs-git-1234/cvmfs-2.12.0-0.1234-git-958741c6df468802.pkg'
cvmfs_config_package:
description: 'URL to the cvmfs config package to install'
required: false
Expand All @@ -337,12 +340,14 @@ runs:
steps:
- id: lsb-release
run: |
source /etc/lsb-release
echo "id=${DISTRIB_ID}" >> $GITHUB_OUTPUT
echo "release=${DISTRIB_RELEASE}" >> $GITHUB_OUTPUT
echo "codename=${DISTRIB_CODENAME}" >> $GITHUB_OUTPUT
echo "description=${DISTRIB_DESCRIPTION}" >> $GITHUB_OUTPUT
echo "id-release=${DISTRIB_ID}-${DISTRIB_DESCRIPTION}" >> $GITHUB_OUTPUT
if [ "$RUNNER_OS" == "Linux" ]; then
source /etc/lsb-release
echo "id=${DISTRIB_ID}" >> $GITHUB_OUTPUT
echo "release=${DISTRIB_RELEASE}" >> $GITHUB_OUTPUT
echo "codename=${DISTRIB_CODENAME}" >> $GITHUB_OUTPUT
echo "description=${DISTRIB_DESCRIPTION}" >> $GITHUB_OUTPUT
echo "id-release=${DISTRIB_ID}-${DISTRIB_DESCRIPTION}" >> $GITHUB_OUTPUT
fi
shell: bash
- uses: actions/cache@v4
with:
Expand Down
13 changes: 10 additions & 3 deletions setup-cvmfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,22 @@ if [ "$(uname)" == "Linux" ]; then
fi
elif [ "$(uname)" == "Darwin" ]; then
# Warn about the phasing out of MacOS support for this action
echo "::error::The CernVM-FS GitHub Action's support for MacOS has been \
phased out with macos-10.15."
echo "warning The CernVM-FS GitHub Action's support for MacOS \
is still experimental."
# Temporary fix for macOS until cvmfs 2.8 is released
if [ -z "${CVMFS_HTTP_PROXY}" ]; then
export CVMFS_HTTP_PROXY='DIRECT'
fi
brew install --cask macfuse
brew tap macos-fuse-t/homebrew-cask
brew install fuse-t
Copy link
Collaborator

Choose a reason for hiding this comment

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

How long do these steps take, and can they be cached like we do with apt archives above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's 20 seconds for setup-homebrew and 20 seconds for these steps to install fuse-t. Seems like homebrew is not as easy to cache, at least I didn't find a simple recipe. So not sure if possible.

Copy link

Choose a reason for hiding this comment

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

homebrew has this: https://docs.brew.sh/Tips-N'-Tricks
and specifically "Pre-download a file for a formula" section might be interesting for us as it mentions caching, but I need to investigate a little bit

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Alternatively, it may also be faster to just directly install the .pkg for fuse-t : https://github.com/macos-fuse-t/fuse-t/?tab=readme-ov-file#other-details

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is indeed faster (10s). I updated the setup accordingly.

Copy link

@YBelikov YBelikov Apr 4, 2024

Choose a reason for hiding this comment

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

Also this might be interesting in the future: https://github.com/macos-fuse-t/fuse-t/wiki#experimental-fuse-t-framework
Maybe it could be possible to get rid of downloading and installing the separate package at some point

curl -L -o cvmfs-latest.pkg ${CVMFS_MACOS_PKG_LOCATION}
sudo installer -package cvmfs-latest.pkg -target /
# / is readonly on macos 11+ - do 'synthetic firmlink' to create /cvmfs
sudo zsh -c 'echo -e "cvmfs\tUsers/Shared/cvmfs\n#comment\n" > /etc/synthetic.conf'
sudo chown root:wheel /etc/synthetic.conf
sudo chmod a+r /etc/synthetic.conf
# apfs.util seems to return non-zero error codes also on success
sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t || true
else
echo "Unsupported platform"
exit 1
Expand Down