Skip to content

Commit

Permalink
enable macos unit tests
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 706759813
  • Loading branch information
chunnienc authored and copybara-github committed Dec 16, 2024
1 parent 0704751 commit 37b2c1c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/nightly_unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ jobs:
uses: ./.github/workflows/unittests_python.yml
with:
trigger-sha: ${{ github.sha }}
run-on-macos: true
26 changes: 22 additions & 4 deletions .github/workflows/unittests_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,34 @@ on:
workflow_call:
inputs:
trigger-sha:
required: true
type: string

required: true
run-on-macos:
type: boolean
default: true
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
os: ${{ steps.set-matrix.outputs.os }}
steps:
- name: Set matrix
id: set-matrix
run: |
os=("Linux_runner_8_core")
if [[ "${{ inputs.run-on-macos }}" == "true" ]]; then
os+=("macos-latest")
fi
os=$(jq -c -n '$ARGS.positional' --args "${os[@]}")
echo "os=${os}"
echo "os=${os}" >> $GITHUB_OUTPUT
test:
needs: prepare-matrix
strategy:
matrix:
python-version: ["3.10", "3.11"]
runs-on:
labels: Linux_runner_8_core
os: ${{ fromJson(needs.prepare-matrix.outputs.os) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
Expand Down
9 changes: 3 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
-f https://download.pytorch.org/whl/torch/
torch==2.5.1+cpu
-f https://download.pytorch.org/whl/torchvision/
torchvision==0.20.1+cpu
-f https://download.pytorch.org/whl/torchaudio/
torchaudio==2.5.1+cpu
torch==2.5.1
torchvision==0.20.1
torchaudio==2.5.1
--pre
tf-nightly>=2.19.0.dev20241201
ai-edge-litert-nightly
Expand Down

0 comments on commit 37b2c1c

Please sign in to comment.