Skip to content

Commit

Permalink
Merge pull request #751 from galacticusorg/fixNoGit2MacOS
Browse files Browse the repository at this point in the history
Do not use `libgit2` for MacOS static builds
  • Loading branch information
abensonca authored Dec 3, 2024
2 parents a6a5c8c + f49afa0 commit 3da16df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ jobs:
- name: Build Galacticus
run: |
set -o pipefail
make -j`sysctl -n hw.activecpu` Galacticus.exe tests.hashes.cryptographic.exe 2>&1 | tee build.log
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe tests.hashes.cryptographic.exe 2>&1 | tee build.log
./scripts/build/staticRelinker.pl `grep '\-o Galacticus.exe' build.log`
./scripts/build/staticRelinker.pl `grep '\-o tests.hashes.cryptographic.exe' build.log`
dsymutil -o Galacticus.exe.dSYM Galacticus.exe
Expand Down Expand Up @@ -457,7 +457,7 @@ jobs:
- name: Build Galacticus
run: |
set -o pipefail
make -j`sysctl -n hw.activecpu` Galacticus.exe 2>&1 | tee build.log
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe 2>&1 | tee build.log
./scripts/build/staticRelinker.pl `grep '\-o Galacticus.exe' build.log`
dsymutil -o Galacticus.exe.dSYM Galacticus.exe
zip -r debugSymbolsMacOS-M1.zip Galacticus.exe.dSYM
Expand Down Expand Up @@ -486,7 +486,7 @@ jobs:
uses: ./.github/actions/buildMacOS
- name: Build Galacticus
run: |
make -j`sysctl -n hw.activecpu` GALACTICUS_BUILD_OPTION=lib libgalacticus.so
make -j`sysctl -n hw.activecpu` USEGIT2=no GALACTICUS_BUILD_OPTION=lib libgalacticus.so
- name: Package the code
run: |
cd $GALACTICUS_EXEC_PATH
Expand Down Expand Up @@ -523,7 +523,7 @@ jobs:
uses: ./.github/actions/buildMacOS
- name: Build Galacticus
run: |
make -j`sysctl -n hw.activecpu` Galacticus.exe
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe
- name: Build tools
run: |
export GALACTICUS_EXEC_PATH=`pwd`
Expand Down Expand Up @@ -599,7 +599,7 @@ jobs:
uses: ./.github/actions/buildMacOS
- name: Build Galacticus
run: |
make -j`sysctl -n hw.activecpu` Galacticus.exe 2>&1 | tee build.log
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe 2>&1 | tee build.log
./scripts/build/staticRelinker.pl `grep '\-o Galacticus.exe' build.log`
- name: Build tools
run: |
Expand Down Expand Up @@ -1380,7 +1380,7 @@ jobs:
sudo port select --set python3 python312
- name: Build Galacticus
run: |
make -j`sysctl -n hw.activecpu` GALACTICUS_BUILD_OPTION=lib libgalacticus.so
make -j`sysctl -n hw.activecpu` USEGIT2=no GALACTICUS_BUILD_OPTION=lib libgalacticus.so
mkdir galacticus
mkdir galacticus/lib
mkdir galacticus/python
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ $(BUILDPATH)/Makefile_Config_MathEval: source/libmatheval_config.cpp
# line.
-include $(BUILDPATH)/Makefile_Config_Git2
ifeq '${STATIC}' '-static'
$(BUILDPATH)/Makefile_Config_Git2:
@mkdir -p $(BUILDPATH)
echo "FCFLAGS += -DGIT2UNAVAIL" > $(BUILDPATH)/Makefile_Config_Git2
echo "CFLAGS += -DGIT2UNAVAIL" > $(BUILDPATH)/Makefile_Config_Git2
echo "CPPFLAGS += -DGIT2UNAVAIL" >> $(BUILDPATH)/Makefile_Config_Git2
else ifeq '${USEGIT2}' 'no'
$(BUILDPATH)/Makefile_Config_Git2:
@mkdir -p $(BUILDPATH)
echo "FCFLAGS += -DGIT2UNAVAIL" > $(BUILDPATH)/Makefile_Config_Git2
Expand Down

0 comments on commit 3da16df

Please sign in to comment.