-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experiment with MACOS_DEPLOYMENT_TARGET
- Loading branch information
1 parent
6b7a738
commit 31a892b
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: "Test macOS 12 (x86_64)" | ||
|
||
on: | ||
pull_request | ||
|
||
env: | ||
PACKAGE_NAME: ruff | ||
MODULE_NAME: ruff | ||
PYTHON_VERSION: "3.11" | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_NET_RETRY: 10 | ||
CARGO_TERM_COLOR: always | ||
RUSTUP_MAX_RETRIES: 10 | ||
|
||
jobs: | ||
macos-x86_64: | ||
runs-on: macos-13 | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: 12.0 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
architecture: x64 | ||
- name: "Prep README.md" | ||
run: python scripts/transform_readme.py --target pypi | ||
- name: "Build wheels - x86_64" | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: x86_64 | ||
args: --release --locked --out dist | ||
- name: "Upload wheels" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-macos-x86_64 | ||
path: dist | ||
- name: "Archive binary" | ||
run: | | ||
TARGET=x86_64-apple-darwin | ||
ARCHIVE_NAME=ruff-$TARGET | ||
ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | ||
mkdir -p $ARCHIVE_NAME | ||
cp target/$TARGET/release/ruff $ARCHIVE_NAME/ruff | ||
tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | ||
shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | ||
- name: "Upload binary" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts-macos-x86_64 | ||
path: | | ||
*.tar.gz | ||
*.sha256 | ||
test: | ||
needs: macos-x86_64 | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
architecture: x64 | ||
- name: "Download binaries" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: artifacts-macos-x86_64 | ||
- name: "Extract" | ||
run: tar xzvf ruff-x86_64-apple-darwin.tar.gz | ||
- name: "Run Ruff" | ||
run: ./ruff --help |