MacOS wheels ARM64 #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: MacOS wheels ARM64 | |
on: [workflow_dispatch] | |
env: | |
WHEEL_SDIR: wheelhouse | |
jobs: | |
build_psutil: | |
name: psutil ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["self-hosted"] | |
python: ["3.12"] | |
platform: ["arm64"] | |
macos-target: ["13"] | |
os-name: ["osx"] | |
env: | |
REPO_DIR: psutil | |
BUILD_COMMIT: release-6.0.0 | |
WHEEL_SDIR: wheelhouse | |
PLAT: "${{ matrix.platform }}" | |
MB_PYTHON_VERSION: "${{ matrix.python }}" | |
MB_ML_VER: "2014" | |
BUILD_DEPENDS: "cython wheel setuptools" | |
TEST_DEPENDS: "cython" | |
TRAVIS_OS_NAME: ${{ matrix.os-name }} | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: get code of psutil | |
run: | | |
echo $PATH | |
bash -x .github/workflows/build.sh | |
- name: Build Wheel of psutil | |
run: | | |
bash -x .github/workflows/wheel.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
build_pyproj: | |
name: pyproj ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["self-hosted"] | |
python: ["3.12"] | |
platform: ["arm64"] | |
macos-target: ["13"] | |
os-name: ["osx"] | |
env: | |
REPO_DIR: pyproj | |
BUILD_COMMIT: 3.6.1 | |
PLAT: "${{ matrix.platform }}" | |
MB_PYTHON_VERSION: "${{ matrix.python }}" | |
MB_ML_VER: "2014" | |
BUILD_DEPENDS: "cython wheel setuptools numpy==1.26.4" | |
TEST_DEPENDS: "cython" | |
TRAVIS_OS_NAME: ${{ matrix.os-name }} | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup cmake | |
run: | | |
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" | |
echo $PATH | |
brew install cmake | |
echo "check python3" | |
python3 -c "import sys; print(sys.version)" | |
- name: Get code of pyproj | |
run: | | |
export PATH: "/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" | |
echo $PATH | |
bash -x .github/workflows/build.sh | |
- name: Build Wheel of pyproj | |
run: | | |
export PATH: "/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" | |
echo $PATH | |
bash -x .github/workflows/wheel.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
build_Fiona: | |
name: Fiona ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["self-hosted"] | |
python: ["3.12"] | |
platform: ["arm64"] | |
macos-target: ["13"] | |
os-name: ["osx"] | |
env: | |
REPO_DIR: Fiona | |
BUILD_COMMIT: 1.9.5 | |
GDAL_FIONA: 3.7.3 | |
PLAT: "${{ matrix.platform }}" | |
MB_PYTHON_VERSION: "${{ matrix.python }}" | |
MB_ML_VER: "2014" | |
BUILD_DEPENDS: "oldest-supported-numpy cython wheel septools" | |
TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz" | |
TRAVIS_OS_NAME: ${{ matrix.os-name }} | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup cmake | |
run: | | |
ls -lrt /opt/homebrew/bin/ | |
/opt/homebrew/bin/brew install cmake | |
echo "check python3" | |
python3 -c "import sys; print(sys.version)" | |
- name: Get code of Fiona | |
run: | | |
bash -x .github/workflows/build.sh | |
- name: Build Wheel of Fiona | |
env: | |
BUILD_COMMIT: 1.9.5 | |
BUILD_DEPENDS: "oldest-supported-numpy cython wheel numpy==1.26.4 setuptools" | |
TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz numpy==1.26.4" | |
run: | | |
bash -x .github/workflows/wheel.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
build_GDAL: | |
name: GDAL ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["self-hosted"] | |
python: ["3.12"] | |
platform: ["arm64"] | |
macos-target: ["13"] | |
os-name: ["osx"] | |
env: | |
REPO_DIR: gdal | |
BUILD_COMMIT: v3.7.3 | |
WHEEL_SDIR: wheelhouse | |
PLAT: "${{ matrix.platform }}" | |
MB_PYTHON_VERSION: "${{ matrix.python }}" | |
MB_ML_VER: "2014" | |
BUILD_DEPENDS: "numpy==1.26.4 setuptools wheel" | |
TEST_DEPENDS: "numpy==1.26.4" | |
TRAVIS_OS_NAME: ${{ matrix.os-name }} | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup cmake | |
run: | | |
ls -lrt /opt/homebrew/bin/ | |
/opt/homebrew/bin/brew install cmake | |
echo "check python3" | |
python3 -c "import sys; print(sys.version)" | |
- name: Get code of gdal | |
run: | | |
bash -x .github/workflows/build.sh | |
- name: Build Wheel of GDAL | |
run: | | |
bash -x .github/workflows/wheel.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
test_wheel: | |
needs: [build_GDAL, build_pyproj, build_Fiona] | |
name: test ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["self-hosted"] | |
python: ["3.12"] | |
platform: ["arm64"] | |
macos-target: ["13"] | |
os-name: ["osx"] | |
env: | |
BRANCH_TEST: ae-py312 | |
PYTHON_VERSION: "${{ matrix.python }}" | |
steps: | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: download artifact | |
uses: actions/download-artifact@v3 | |
id: download | |
with: | |
name: wheels | |
path: wheelhouse | |
- name: "Echo artifact download path" | |
run: echo ${{steps.download.outputs.download-path}} | |
- name: Test wheels with python ${{ matrix.python-version }} | |
run: | | |
set -x | |
echo "engine installation to test wheel" | |
python3 -m venv $HOME/openquake | |
source $HOME/openquake/bin/activate | |
pip install -U pip wheel setuptools | |
#pip install -r https://raw.githubusercontent.com/gem/oq-engine/master/requirements-py311-linux64.txt | |
cd ${{steps.download.outputs.download-path}} | |
PYCUT=`echo "${PYTHON_VERSION//.}"` | |
ls *${PYCUT}* | |
sleep 36 | |
pip install --force-reinstall *${PYCUT}* | |
cd $HOME | |
git clone -b ${BRANCH_TEST} https://github.com/gem/oq-engine.git | |
cd oq-engine | |
git status | |
pip install -r requirements-py312-macos_arm64.txt | |
pip install -e . | |
cd $HOME/oq-engine | |
oq engine --upgrade-db | |
sleep 5 | |
pip install pytest | |
sleep 3 | |
pytest -vsx --color=yes openquake/sep/tests/test_utils.py | |
pytest -vsx --color=yes openquake/sep | |
pytest -vsx --color=yes openquake/calculators | |
oq engine --run https://downloads.openquake.org/jobs/risk_test.zip | |
pytest -vsx --color=yes openquake/hazardlib/tests/gsim/kotha_2020_test.py |