Skip to content

Commit

Permalink
devops: add osx-arm64 and linux-aarch64 conda package builds (#2211)
Browse files Browse the repository at this point in the history
Co-authored-by: Max Schmitt <[email protected]>
  • Loading branch information
Tobias-Fischer and mxschmitt authored Apr 2, 2024
1 parent 6a10c42 commit 66ddfee
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,45 @@ jobs:
deploy-conda:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
target-platform: linux-x86_64
- os: ubuntu-latest
target-platform: linux-aarch64
- os: windows-latest
target-platform: win-64
- os: macos-latest-large
target-platform: osx-intel
- os: macos-latest-xlarge
target-platform: osx-arm64
runs-on: ${{ matrix.os }}
defaults:
run:
# Required for conda-incubator/setup-miniconda@v3
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.9
python-version: 3.12
channels: conda-forge
miniconda-version: latest
- name: Prepare
run: conda install anaconda-client conda-build conda-verify
# Pinned because of https://github.com/conda/conda-build/issues/5267
run: conda install anaconda-client conda-build=24.1.2 conda-verify py-lief=0.12.3
- name: Build and Upload
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
conda config --set anaconda_upload yes
conda build --user microsoft .
if [ "${{ matrix.target-platform }}" == "osx-arm64" ]; then
conda build --user microsoft . -m conda_build_config.yaml -m conda_build_config_osx_arm64.yaml
elif [ "${{ matrix.target-platform }}" == "linux-aarch64" ]; then
conda install cross-python_linux-aarch64
conda build --user microsoft . -m conda_build_config.yaml -m conda_build_config_linux_aarch64.yaml
else
conda build --user microsoft . -m conda_build_config.yaml
fi
2 changes: 2 additions & 0 deletions conda_build_config_linux_aarch64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target_platform:
- linux-aarch64
2 changes: 2 additions & 0 deletions conda_build_config_osx_arm64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target_platform:
- osx-arm64
7 changes: 6 additions & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ build:
- playwright = playwright.__main__:main

requirements:
build:
- python # [build_platform != target_platform]
- pip # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
host:
- python
- wheel
Expand All @@ -25,7 +29,8 @@ requirements:
- python
- greenlet ==3.0.3
- pyee ==11.0.1
test:

test: # [build_platform == target_platform]
requires:
- pip
imports:
Expand Down

0 comments on commit 66ddfee

Please sign in to comment.