Saxon 12.5.0 Mac wheels #246
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: Build Wheels | |
on: push | |
jobs: | |
load_config: | |
runs-on: ubuntu-latest | |
outputs: | |
date: ${{ steps.load.outputs.date }} | |
linuxaarch64: ${{ steps.load.outputs.linuxaarch64 }} | |
linuxx86_64: ${{ steps.load.outputs.linuxx86_64 }} | |
macaarch64: ${{ steps.load.outputs.macaarch64 }} | |
macx86_64: ${{ steps.load.outputs.macx86_64 }} | |
macpath: ${{ steps.load.outputs.macpath }} | |
user: ${{ steps.load.outputs.user }} | |
windows: ${{ steps.load.outputs.windows }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Load the configuration | |
id: load | |
run: | | |
echo user=`jq -r .user config.json` >> $GITHUB_OUTPUT | |
echo macaarch64=`jq -r .macaarch64 config.json` >> $GITHUB_OUTPUT | |
echo macx86_64=`jq -r .macx86_64 config.json` >> $GITHUB_OUTPUT | |
echo windows=`jq -r .windows config.json` >> $GITHUB_OUTPUT | |
echo linuxaarch64=`jq -r .linuxaarch64 config.json` >> $GITHUB_OUTPUT | |
echo linuxx86_64=`jq -r .linuxx86_64 config.json` >> $GITHUB_OUTPUT | |
echo date=`jq -r .date config.json` >> $GITHUB_OUTPUT | |
echo macpath=`jq -r .macpath config.json` >> $GITHUB_OUTPUT | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
needs: load_config | |
env: | |
W_USER: ${{ needs.load_config.outputs.user }} | |
W_MACAARCH64: ${{ needs.load_config.outputs.macaarch64 }} | |
W_MACX86_64: ${{ needs.load_config.outputs.macx86_64 }} | |
W_WINDOWS: ${{ needs.load_config.outputs.windows }} | |
W_LINUXAARCH64: ${{ needs.load_config.outputs.linuxaarch64 }} | |
W_LINUXX86_64: ${{ needs.load_config.outputs.linuxx86_64 }} | |
W_DATE: ${{ needs.load_config.outputs.date }} | |
MACPATH: ${{ needs.load_config.outputs.macpath }} | |
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel==1.2.0" | |
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path libs/win -w {dest_dir} {wheel}" | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
matrix: | |
os: [macos-11, ubuntu-20.04, windows-2019] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure AWS credentials for reading the bucket | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: arn:aws:iam::299107274666:role/staging-wheels-GithubActionReadRoleDF6D587B-yrJ3M0M0VbMY | |
aws-region: eu-west-2 | |
- name: Summarize the config | |
run: | | |
echo "Date:" ${{ env.W_DATE }} | |
echo "User:" ${{ env.W_USER }} | |
echo "Mac (aarch64):" ${{ env.W_MACAARCH64 }} | |
echo "Mac (x86):" ${{ env.W_MACX86_64 }} | |
echo "Linux (aarch64):" ${{ env.W_LINUXAARCH64 }} | |
echo "Linux (x86):" ${{ env.W_LINUXX86_64 }} | |
echo "Windows:" ${{ env.W_WINDOWS }} | |
uname -p | |
- uses: actions/setup-python@v3 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.16.2 | |
- name: Get the Mac aarch64 binaries | |
if: matrix.os == 'macos-11' && env.W_MACAARCH64 == 'true' | |
run: | | |
aws s3 cp s3://saxonica-wheel-staging/${{ env.W_USER }}/mac-aarch64.wheels.tar.gz libs.tar.gz | |
sudo rm -rf mac | |
tar zxvf libs.tar.gz | |
rm -f libs.tar.gz | |
- name: Copy the Mac arch64 binaries to a fixed location | |
if: matrix.os == 'macos-11' && env.W_MACAARCH64 == 'true' | |
run: | | |
sudo mkdir -p ${{ env.MACPATH }}/build/eec/libsaxon | |
sudo mkdir -p ${{ env.MACPATH }}/build/pec/libsaxon | |
sudo mkdir -p ${{ env.MACPATH }}/build/hec/libsaxon | |
sudo cp mac/*/libs/darwin/* ${{ env.MACPATH }}/build/eec/libsaxon/ | |
sudo cp mac/*/libs/darwin/* ${{ env.MACPATH }}/build/pec/libsaxon/ | |
sudo cp mac/*/libs/darwin/* ${{ env.MACPATH }}/build/hec/libsaxon/ | |
- name: Build the Mac arch64 wheels | |
if: matrix.os == 'macos-11' && env.W_MACAARCH64 == 'true' | |
env: | |
CIBW_ARCHS_MACOS: arm64 | |
run: | | |
ls -laR /Volumes/Saxonica/src/saxonica/saxondev | |
cd mac/eec_pypi && python -m cibuildwheel --output-dir ../../macwheelhouse --platform macos && cd ../.. | |
cd mac/pec_pypi && python -m cibuildwheel --output-dir ../../macwheelhouse --platform macos && cd ../.. | |
cd mac/hec_pypi && python -m cibuildwheel --output-dir ../../macwheelhouse --platform macos && cd ../.. | |
- name: Get the Mac x86 binaries | |
if: matrix.os == 'macos-11' && env.W_MACX86_64 == 'true' | |
run: | | |
aws s3 cp s3://saxonica-wheel-staging/${{ env.W_USER }}/mac-x86_64.wheels.tar.gz libs.tar.gz | |
sudo rm -rf mac | |
tar zxvf libs.tar.gz | |
rm -f libs.tar.gz | |
- name: Copy the Mac x86 binaries to a fixed location | |
if: matrix.os == 'macos-11' && env.W_MACX86_64 == 'true' | |
run: | | |
sudo mkdir -p ${{ env.MACPATH }}/build/eec/libsaxon | |
sudo mkdir -p ${{ env.MACPATH }}/build/pec/libsaxon | |
sudo mkdir -p ${{ env.MACPATH }}/build/hec/libsaxon | |
sudo cp mac/*/libs/darwin/* ${{ env.MACPATH }}/build/eec/libsaxon/ | |
sudo cp mac/*/libs/darwin/* ${{ env.MACPATH }}/build/pec/libsaxon/ | |
sudo cp mac/*/libs/darwin/* ${{ env.MACPATH }}/build/hec/libsaxon/ | |
- name: Build the Mac x86 wheels | |
if: matrix.os == 'macos-11' && env.W_MACX86_64 == 'true' | |
env: | |
CIBW_ARCHS_MACOS: x86_64 | |
run: | | |
cd mac/eec_pypi && python -m cibuildwheel --output-dir ../../macwheelhouse --platform macos && cd ../.. | |
cd mac/pec_pypi && python -m cibuildwheel --output-dir ../../macwheelhouse --platform macos && cd ../.. | |
cd mac/hec_pypi && python -m cibuildwheel --output-dir ../../macwheelhouse --platform macos && cd ../.. | |
- name: Get the Linux x86 binaries | |
if: matrix.os == 'ubuntu-20.04' && env.W_LINUXX86_64 == 'true' | |
run: | | |
aws s3 cp s3://saxonica-wheel-staging/${{ env.W_USER }}/linux-x86_64.wheels.tar.gz libs.tar.gz | |
tar zxvf libs.tar.gz | |
rm -f libs.tar.gz | |
- name: Build the Linux x86 wheels | |
if: matrix.os == 'ubuntu-20.04' && env.W_LINUXX86_64 == 'true' | |
env: | |
CIBW_ARCHS_LINUX: x86_64 | |
run: | | |
cd linux/eec_pypi && python -m cibuildwheel --output-dir ../../linuxwheelhouse --platform linux && cd ../.. | |
cd linux/pec_pypi && python -m cibuildwheel --output-dir ../../linuxwheelhouse --platform linux && cd ../.. | |
cd linux/hec_pypi && python -m cibuildwheel --output-dir ../../linuxwheelhouse --platform linux && cd ../.. | |
- name: Get the Windows x86 binaries | |
if: matrix.os == 'windows-2019' && env.W_WINDOWS == 'true' | |
run: | | |
aws s3 cp s3://saxonica-wheel-staging/${{ env.W_USER }}/windows-x86_64.wheels.tar.gz libs.tar.gz | |
tar zxvf libs.tar.gz | |
del libs.tar.gz | |
- name: Build the Windows x86 wheels | |
if: matrix.os == 'windows-2019' && env.W_WINDOWS == 'true' | |
run: | | |
cd windows/eec_pypi | |
copy libs/win/*.lib . | |
python -m cibuildwheel --output-dir ../../windowswheelhouse --platform windows | |
cd ../.. | |
cd windows/pec_pypi | |
copy libs/win/*.lib . | |
python -m cibuildwheel --output-dir ../../windowswheelhouse --platform windows | |
cd ../.. | |
cd windows/hec_pypi | |
copy libs/win/*.lib . | |
python -m cibuildwheel --output-dir ../../windowswheelhouse --platform windows | |
cd ../.. | |
- uses: actions/upload-artifact@v3 | |
if: matrix.os == 'ubuntu-20.04' && env.W_LINUXX86_64 == 'true' | |
with: | |
name: linux-wheels | |
path: ./linuxwheelhouse/*.whl | |
- uses: actions/upload-artifact@v3 | |
if: matrix.os == 'macos-11' && (env.W_MACAARCH64 == 'true' || env.W_MACX86_64 == 'true') | |
with: | |
name: mac-wheels | |
path: ./macwheelhouse/*.whl | |
- uses: actions/upload-artifact@v3 | |
if: matrix.os == 'windows-2019' && env.W_WINDOWS == 'true' | |
with: | |
name: windows-wheels | |
path: ./windowswheelhouse/*.whl |