Skip to content

Commit

Permalink
Merge pull request #9 from glotzerlab/feat/only-binary-flag
Browse files Browse the repository at this point in the history
Allow users to toggle --only-binary flag
  • Loading branch information
janbridley authored Jul 11, 2024
2 parents 4510a18 + 3573dda commit 3ac9374
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- run: uv --version

setup_uv_lockfile:
name: setup-uv [lockfile]
name: setup-uv [only-binary=:all:]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -57,6 +57,24 @@ jobs:
- run: uv --version
- run: python -m build --version

setup_uv_lockfile_only_binary_none:
name: setup-uv [only-binary=:none:]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: "3.12"
- name: Set up Python environment
uses: ./setup-uv
with:
lockfile: .github/workflows/lockfile.txt
only-binary: ":none:"
- run: uv --version
- run: python -m build --version

setup_mdbook:
name: setup-mdbook [default]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,6 +111,7 @@ jobs:
- setup_uv_default
- setup_uv_version
- setup_uv_lockfile
- setup_uv_lockfile_only_binary_none
- setup_mdbook
- setup_cargo_bundle_licenses
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion setup-uv/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ inputs:
description: 'Packages to install.'
required: false
default: ''
only-binary:
description: 'Value to pass to the --only-binary option.'
required: false
default: ':all:'

runs:
using: "composite"
Expand All @@ -20,5 +24,5 @@ runs:

- name: Install
if: ${{ inputs.lockfile != '' }}
run: "uv pip sync ${{ inputs.lockfile }} --only-binary :all: --system --reinstall"
run: "uv pip sync ${{ inputs.lockfile }} --only-binary=${{ inputs.only-binary }} --system --reinstall"
shell: bash

0 comments on commit 3ac9374

Please sign in to comment.