Skip to content

Commit f642874

Browse files
authored
Merge pull request #33 from statisticalbiotechnology/fix/gh-actions-macos
Fix/gh actions macos
2 parents 81a0910 + 7ac2c3a commit f642874

4 files changed

Lines changed: 36 additions & 31 deletions

File tree

.github/workflows/build_and_release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,19 @@ jobs:
8181

8282
build-osx:
8383
runs-on: macos-latest
84+
env:
85+
JAVA_HOME: ""
8486
steps:
8587
- uses: actions/checkout@v2
8688
- name: create_dirs
87-
run: mkdir -p ../my_rel ../my_build
89+
run: mkdir -p my_rel my_build
8890
- name: configure_and_make
89-
run: admin/builders/osx64_build.sh -s `pwd`/.. -r `pwd`/../my_rel -b `pwd`/../my_build -g
91+
run: admin/builders/osx64_build.sh -s `pwd`/.. -r `pwd`/my_rel -b `pwd`/my_build -g
9092
- name: Upload packages
9193
uses: actions/upload-artifact@v4
9294
with:
9395
name: osx-packages
94-
path: ../my_rel
96+
path: my_rel
9597

9698
build-win64:
9799
runs-on: windows-latest

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#############################################################################
22
# NAME AND VERSION
33
###############################################################################
4-
cmake_minimum_required(VERSION 2.8)
4+
cmake_minimum_required(VERSION 3.5)
55

66
if(APPLE)
77
# https://gitlab.kitware.com/cmake/cmake/issues/19067

admin/builders/install_proteowizard.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ fi
1919
cd proteowizard
2020

2121
# undo position independent code fix introduced here: https://github.com/ProteoWizard/pwiz/pull/1980
22-
sed -i 's/ -no-pie -fno-pie//g' Jamroot.jam
23-
24-
25-
toolset=""
26-
if [[ "$OSTYPE" == "darwin"* ]]; then
27-
toolset="toolset=clang"
28-
fi
22+
sed -i.bak 's/ -no-pie -fno-pie//g' Jamroot.jam
2923

3024
echo "Building ProteoWizard and Boost, this may take some time.."
3125

@@ -60,14 +54,18 @@ echo "Building ProteoWizard and Boost, this may take some time.."
6054

6155
status=$?
6256
if [ $status -ne 0 ]; then
63-
echo "❌ Build failed. Showing log:"
57+
echo "❌ Build failed with status $status. Showing log:"
6458
cat ../pwiz_installation.log
6559
exit $status
60+
else
61+
echo "✅ Build succeeded."
6662
fi
6763

64+
echo "Updating Proteowizard and Boost libraries and include files."
65+
6866
# manually copy some libraries and headers used by maracluster but not by proteowizard
69-
find build-*-x86_64/ -type f | grep -i libboost_regex-.*\.a$ | xargs -I{} cp {} ../lib
70-
find build-*-x86_64/ -type f | grep -i libboost_program_options-.*\.a$ | xargs -I{} cp {} ../lib
67+
find build-*/ -type f | grep -i libboost_regex-.*\.a$ | xargs -I{} cp {} ../lib
68+
find build-*/ -type f | grep -i libboost_program_options-.*\.a$ | xargs -I{} cp {} ../lib
7169

7270
rsync -ap --include "*/" --include "*.h" --include "*.hpp" --exclude "*" libraries/zlib-1.2.3/ ../include
7371
rsync -ap --include "*/" --include "*.h" --include "*.hpp" --exclude "*" libraries/boost_aux/boost/ ../include/boost
@@ -90,4 +88,5 @@ wget --no-verbose --no-check-certificate https://github.com/boostorg/unordered/a
9088
tar -xzf boost_unordered.tar.gz
9189
rsync -ap --include "*/" --include "*.hpp" --include '*.ipp' --exclude '*' unordered-boost-1.86.0/include/boost/ include/boost
9290

93-
touch pwiz_successful.txt
91+
touch pwiz_successful.txt
92+
echo "✅ Update libraries and include files succeeded."

admin/builders/osx64_build.sh

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,29 @@ if [[ ! -d /Applications/XCode.app ]]
2525
exit 1
2626
fi
2727

28-
package_manager_installed=true
29-
if [[ -d /opt/local/var/macports ]]
30-
then
31-
echo "[ Package manager ] : MacPorts "
28+
package_manager_installed=false
29+
if [[ -d /opt/local/var/macports ]]; then
30+
echo "[ Package manager ] : MacPorts"
3231
package_manager="sudo port"
3332
other_packages="gnutar wget coreutils libomp cmake"
34-
elif [[ -f ${HOME}/bin/brew ]]
35-
then
36-
echo "[ Package manager ] : Homebrew "
37-
package_manager=$HOME/bin/brew
38-
other_packages="gnu-tar wget coreutils libomp cmake"
39-
elif [[ -f /usr/local/bin/brew ]]
40-
then
41-
echo "[ Package manager ] : Homebrew "
42-
package_manager="brew"
43-
${package_manager} update || true # brew.rb raises an error on the vagrant box, just ignore it
44-
other_packages="gnu-tar wget coreutils libomp cmake"
33+
package_manager_installed=true
4534
else
46-
package_manager_installed=false
35+
brew_paths=(
36+
"$HOME/bin/brew"
37+
"/opt/homebrew/bin/brew"
38+
"/usr/local/bin/brew"
39+
)
40+
41+
for path in "${brew_paths[@]}"; do
42+
if [[ -x "$path" ]]; then
43+
echo "[ Package manager ] : Homebrew"
44+
package_manager="$path"
45+
other_packages="gnu-tar wget coreutils libomp cmake"
46+
"$package_manager" update || true
47+
package_manager_installed=true
48+
break
49+
fi
50+
done
4751
fi
4852

4953
if [ "$package_manager_installed" == false ]

0 commit comments

Comments
 (0)