Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
17 changes: 11 additions & 6 deletions .github/workflows/macWF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ jobs:
# see https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6 for possible exclusions
matrix:
variant: [ "" , "+allmodules" ]
# this is to test both intel and arm64 macs
# note: macos-14 has a problem in fetching the git repository of plumed, namely a
# "fatal: detected dubious ownership in repository" error
# I didn't find any solution, so for the moment I keep macos-14 off
os: [ macos-13 ]
# macos-15 (arm runner) fails with "Failed to open statefile for plumed:
# Could not open file: .../plumed2/plumed2/macports/science/plumed/Portfile"
# so we only run on intel macs for now
os: [macos-15-intel]
exclude:
# many tests on contributed modules are still failing for numerical reasons on arm64, see https://github.com/plumed/plumed2/pull/950
# once fixed we could introduce this back:
Expand Down Expand Up @@ -57,6 +56,12 @@ jobs:
sudo port -N install $p-plumed
done
source ./macports-ci ccache --save
- name: show logs
if: always()
run: |
cat /opt/local/var/macports/logs/_Users_runner_work_plumed2_plumed2_macports_science_plumed/plumed/main.log
cat /opt/local/var/macports/logs/_Users_runner_work_plumed2_plumed2_macports_python_py-plumed/py39-plumed/main.log

- name: Run tests
run: |
sudo port -N -d test plumed ${{ matrix.variant }}
Expand All @@ -71,7 +76,7 @@ jobs:
fail-fast: false
matrix:
# this is to test both intel and arm64 macs
os: [ macos-13 , macos-14 ]
os: [macos-15-intel, macos-15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Nightly builds
on:
on:
schedule:
- cron: "30 17 * * 0"

Expand All @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest , macos-13 , macos-14]
os: [ubuntu-latest, macos-15-intel, macos-15]
branch: [v2.8, v2.9, master]
runs-on: ${{ matrix.os }}
steps:
Expand Down
1 change: 1 addition & 0 deletions macports/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/science
/python
50 changes: 24 additions & 26 deletions macports/generate-portfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This script generates a Portfile in science/plumed
# Currently the portfile is aimed at testing the currect git hash

alias awk=gawk

prefix=
if git describe --exact-match --tags HEAD 2>/dev/null 1>/dev/null
then
Expand All @@ -17,11 +19,26 @@ else
fi

if test -n "$plumed_repository" ; then
# get this from environment
repository="$plumed_repository"
fetch="fetch.type git\n"
# get this from environment
fetch+="git.url $plumed_repository\n"
# notice that if instead of hashtag we want to put a version, then it should be
# git.branch v${version}
fetch+="git.branch $prefix$version\n"
else
# parent directory:
# parent directory:
repository="${PWD%/*}"

# use a pre-fetch step to copy the sources
fetch="fetch.type none\n\n"
fetch+="pre-fetch {\n"
fetch+=" ui_msg \"Using local source tree\"\n"
fetch+=" set local_repo \"$repository\"\n"
fetch+=" system \"rm -rf \${workpath}/localsrc\"\n"
fetch+=" system \"cp -a \${local_repo} \${workpath}/localsrc\"\n"
fetch+=" return 0\n"
fetch+="}\n\n"
fetch+="worksrcdir \"\${workpath}/localsrc\"\n"
fi

mkdir -p science/plumed
Expand All @@ -36,15 +53,8 @@ cat Portfile.in |
sed "
s/@_VERSION_@/$version/
s/@_REVISION_@/0/
" | awk '{
if($1=="@_FETCH_@"){
print "fetch.type git"
print "git.url '$repository'"
# notice that if instead of hashtag we want to put a version, then it should be
# git.branch v${version}
print "git.branch '$prefix'${version}"
} else print
}' | awk -v modules="$modules" '{
s|@_FETCH_@|$fetch|
" | awk -v modules="$modules" '{
if($1=="@_MODULES_@"){
var=$2
split(modules,list);
Expand Down Expand Up @@ -91,17 +101,5 @@ cat PortfilePython.in |
sed "
s/@_VERSION_@/$version/
s/@_REVISION_@/0/
" | awk '{
if($1=="@_FETCH_@"){
print "fetch.type git"
print "git.url '$repository'"
# notice that if instead of hashtag we want to put a version, then it should be
# git.branch v${version}
print "git.branch '$prefix'${version}"
} else print
}' > python/py-plumed/Portfile





s|@_FETCH_@|$fetch|
" > python/py-plumed/Portfile
Loading