2121jobs :
2222 # This workflow contains a single job called "build"
2323 osx_build :
24- # The type of runner that the job will run on
25- runs-on : macos-latest
24+ # The type of runner that the job will run on, macos-13 is x86_64
25+ runs-on : ${{ matrix.distro }}
2626 if : ${{ !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') }}
2727
28+ strategy :
29+ fail-fast : true
30+ matrix :
31+ distro :
32+ - ' macos-13'
33+ - ' macos-14'
34+ include :
35+ - distro : ' macos-13'
36+ pre : ' x86_64'
37+ - distro : ' macos-14'
38+ pre : ' arm64'
2839 env :
2940 GEODA_VER : ' 1.22.0'
41+ GEODA_ARCH : ${{ matrix.pre }}
3042
3143 # Steps represent a sequence of tasks that will be executed as part of the job
3244
@@ -42,40 +54,52 @@ jobs:
4254 p12-file-base64 : ${{ secrets.MACOS_CERTIFICATE }}
4355 p12-password : ${{ secrets.MACOS_CERTIFICATE_PWD }}
4456
45- - name : Setup Brew
57+ - name : Install GDAL using Brew x86_64
58+ if : ${{ matrix.pre == 'x86_64' }}
4659 run : |
47- 48- ln -s /usr/local/opt/[email protected] /usr/local/opt/boost 60+ rm /usr/local/bin/2to3 || true
61+ rm /usr/local/bin/idle3 || true
62+ rm /usr/local/bin/pydoc3 || true
63+ rm /usr/local/bin/python3 || true
64+ rm /usr/local/bin/python3-config || true
65+ brew install --force --overwrite --quiet gdal || true
66+
67+ - name : Install GDAL using Brew Arm64
68+ if : ${{ matrix.pre == 'arm64' }}
69+ run : |
70+ arch
4971 brew install gdal
72+ sudo ln -s /opt/homebrew/opt/gdal /usr/local/opt/gdal
5073
5174 - uses : actions/cache@v3
5275 id : cache
5376 with :
5477 path : |
5578 BuildTools/macosx/libraries
5679 BuildTools/macosx/temp
57- key : ${{ runner.os }}-deps-cache-${{ hashFiles('BuildTools/macosx/install.sh') }}
80+ key : ${{ runner.os }}-${{ matrix.pre }}- deps-cache-${{ hashFiles('BuildTools/macosx/install.sh') }}
5881
5982 - if : steps.cache.outputs.cache-hit != 'true'
6083 name : Build Dependencies
6184 run : |
6285 cd BuildTools/macosx
6386 export GEODA_HOME=$PWD
64- export GEODA_ARCH=x86_64
87+ export GEODA_ARCH=${{ env.GEODA_ARCH }}
6588 ./install.sh
6689
6790 - name : Build GeoDa
6891 run : |
6992 mkdir -p o
7093 cd BuildTools/macosx
7194 export GEODA_HOME=$PWD
95+ export GEODA_ARCH=${{ env.GEODA_ARCH }}
7296 cp ../../GeoDamake.macosx.opt ../../GeoDamake.opt
7397 echo "find identity"
7498 security find-identity -v
7599 VER_MAJOR=$(grep version_major $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
76100 VER_MINOR=$(grep version_minor $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
77101 VER_BUILD=$(grep version_build $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
78- GEODA_VERSION=$VER_MAJOR.$VER_MINOR.$VER_BUILD
102+ GEODA_VERSION=$VER_MAJOR.$VER_MINOR.$VER_BUILD-$GEODA_ARCH
79103 echo $GEODA_VERSION
80104 make -j$(sysctl -n hw.ncpu)
81105 make app
86110 # Upload artifact
87111 - uses : actions/upload-artifact@v3
88112 with :
89- name : GeoDa-${{ env.GEODA_VER }}-MacOS
90- path : ${{ github.workspace }}/BuildTools/macosx/create-dmg/GeoDa${{ env.GEODA_VER }}-Installer.dmg
113+ name : GeoDa-${{ env.GEODA_VER }}-${{ env.GEODA_ARCH }}- MacOS
114+ path : ${{ github.workspace }}/BuildTools/macosx/create-dmg/GeoDa${{ env.GEODA_VER }}-${{ env.GEODA_ARCH }}- Installer.dmg
0 commit comments