diff --git a/.github/workflows/nightly_release.yml b/.github/workflows/nightly_release.yml index 2b729487..c9232101 100644 --- a/.github/workflows/nightly_release.yml +++ b/.github/workflows/nightly_release.yml @@ -20,6 +20,7 @@ jobs: uses: ./.github/workflows/unittests_python.yml with: trigger-sha: ${{ github.sha }} + run-on-macos: true build-and-release-nightly: needs: run-unittests-python diff --git a/.github/workflows/nightly_unittests.yml b/.github/workflows/nightly_unittests.yml index bf9907d7..44461555 100644 --- a/.github/workflows/nightly_unittests.yml +++ b/.github/workflows/nightly_unittests.yml @@ -20,3 +20,4 @@ jobs: uses: ./.github/workflows/unittests_python.yml with: trigger-sha: ${{ github.sha }} + run-on-macos: true diff --git a/.github/workflows/run_post_merge.yml b/.github/workflows/run_post_merge.yml index 1005fbc5..f62e1a43 100644 --- a/.github/workflows/run_post_merge.yml +++ b/.github/workflows/run_post_merge.yml @@ -28,3 +28,4 @@ jobs: uses: ./.github/workflows/unittests_python.yml with: trigger-sha: ${{ github.event.after }} + run-on-macos: false diff --git a/.github/workflows/run_pre_merge.yml b/.github/workflows/run_pre_merge.yml index 6dcc230c..4cb24d47 100644 --- a/.github/workflows/run_pre_merge.yml +++ b/.github/workflows/run_pre_merge.yml @@ -64,6 +64,7 @@ jobs: uses: ./.github/workflows/unittests_python.yml with: trigger-sha: ${{ github.event.pull_request.head.sha }} + run-on-macos: false run-model-coverage: name: Model Coverage diff --git a/.github/workflows/unittests_python.yml b/.github/workflows/unittests_python.yml index 33e6f3b9..989ca8eb 100644 --- a/.github/workflows/unittests_python.yml +++ b/.github/workflows/unittests_python.yml @@ -12,16 +12,34 @@ on: workflow_call: inputs: trigger-sha: - required: true type: string - + required: true + run-on-macos: + type: boolean + default: false 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: diff --git a/requirements.txt b/requirements.txt index 129b0ebe..c94c6106 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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