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

build: remove python 3.7, update macos rust setup, update ci config #38

Merged
merged 4 commits into from
Jul 1, 2024
Merged
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
5 changes: 0 additions & 5 deletions .cargo/config

This file was deleted.

11 changes: 11 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: "${{ matrix.os }}"
steps:
# Check out the code
Expand All @@ -32,7 +32,7 @@ jobs:
id: get-py-path
shell: bash
run: |
echo "::set-output name=path::$(which python)"
echo "path=$(which python)" >> $GITHUB_OUTPUT

# Set the current month and year (used for cache key)
- name: "Get Date"
Expand All @@ -41,7 +41,7 @@ jobs:
# tbh I have yet to find the docs where this output format is
# defined, but I copied this from the official cache action's README.
run: |
echo "::set-output name=date::$(/bin/date -u '+%Y%m')"
echo "date=$(/bin/date -u '+%Y%m')" >> $GITHUB_OUTPUT
shell: bash

# Generate the lockfile
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
id: get-py-path
shell: bash
run: |
echo "::set-output name=path::$(which python)"
echo "path=$(which python)" >> $GITHUB_OUTPUT

# Set the current month and year (used for cache key)
- name: "Get Date"
Expand All @@ -131,7 +131,7 @@ jobs:
# tbh I have yet to find the docs where this output format is
# defined, but I copied this from the official cache action's README.
run: |
echo "::set-output name=date::$(/bin/date -u '+%Y%m')"
echo "date=$(/bin/date -u '+%Y%m')" >> $GITHUB_OUTPUT
shell: bash

# Generate the lockfile
Expand Down Expand Up @@ -212,7 +212,6 @@ jobs:
- { os: ubuntu-latest, name: musllinux }
- { os: macos-latest, name: macosx }
py:
- cp37
- cp38
- cp39
- cp310
Expand Down Expand Up @@ -240,8 +239,9 @@ jobs:
CIBW_ARCHS_WINDOWS: AMD64
CIBW_BEFORE_ALL_LINUX: >
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
CIBW_BEFORE_ALL_MACOS: >
CIBW_BEFORE_ALL_MACOS: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
CIBW_ENVIRONMENT_LINUX: PATH=/root/.cargo/bin:$PATH
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.platform.name }}_*
CIBW_TEST_COMMAND: python {project}/tests/test_py.py
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
id: get-version
shell: bash
run: |
echo "::set-output name=version::$(cargo pkgid | tr '#' '\n' | tail -n 1 | tr ':' ' ' | awk '{print $2}')"
echo "version=$(cargo pkgid | tr '#' '\n' | tail -n 1 | tr ':' ' ' | awk '{print $2}')" >> $GITHUB_OUTPUT

- name: "(DEBUG) log current version"
shell: bash
Expand All @@ -285,13 +285,13 @@ jobs:
id: cargo-version
shell: bash
run: |
echo "::set-output name=new::$(./scripts/newCargoVersion.sh)"
echo "new=$(./scripts/newCargoVersion.sh)" >> $GITHUB_OUTPUT

- name: "Check if new NPM version"
id: npm-version
shell: bash
run: |
echo "::set-output name=new::$(./scripts/newNpmVersion.sh)"
echo "new=$(./scripts/newNpmVersion.sh)" >> $GITHUB_OUTPUT

# Note we don't check for a new python version b/c there are so
# many python artifacts that it is impractical. Instead we just
Expand Down
2 changes: 1 addition & 1 deletion build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export PATH=/root/.cargo/bin:$PATH

mkdir -p build && rm -rf build/*

for PYBIN in /opt/python/{cp37-cp37m,cp38-cp38,cp39-cp39,cp310-cp310,cp311-cp311,cp312-cp312}/bin; do
for PYBIN in /opt/python/{cp38-cp38,cp39-cp39,cp310-cp310,cp311-cp311,cp312-cp312}/bin; do
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"

"${PYBIN}/python" -m ensurepip
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ requires = ["setuptools", "wheel", "setuptools-rust>=1.2.0"]

[tool.black]
line-length = 80
target-version = ['py37']
target-version = ['py38']
Loading