Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macos-11 release #230

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ jobs:
nif: ["2.16"]
job:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 }
- { target: aarch64-apple-darwin, os: macos-11 }
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
if: contains(matrix.job.os, 'ubuntu')
with:
elixir-version: "1.14.0" # Define the elixir version [required]
otp-version: "24.2" # Define the OTP version [required]
- name: Build with cibuildwheel
run: |
pip install cibuildwheel
cibuildwheel --output-dir wheelhouse
- name: Set up Zig
uses: goto-bus-stop/setup-zig@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions native/py_proj/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python Project for Beaver

This project is created to make use of pip wheels tools to create multiple platform builds.
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[tool.cibuildwheel]
build-verbosity = 3
build = "cp310-*"
skip = ["*-manylinux_i686", "*-musllinux*"]
manylinux-aarch64-image = "manylinux_2_28"
manylinux-x86_64-image = "manylinux_2_28"

[tool.cibuildwheel.linux]
before-build = ["{project}/scripts/docker_prepare_elixir.sh"]

[tool.cibuildwheel.macos]
before-build = ["brew install zig elixir"]
14 changes: 14 additions & 0 deletions scripts/docker_prepare_elixir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -xe

# manylinux prep
if [[ -f "/etc/centos-release" ]]; then
for i in $(seq 1 5); do
dnf install -y elixir zig && s=0 && break || s=$? && sleep 15
done

elif [[ -f "/etc/alpine-release" ]]; then
# musllinux prep
# ccache already present
apk add elixir zig
fi
Loading