source instead of exec in run-readme-pr-macos.yml #2541
Workflow file for this run
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
name: Run the README instructions - with stories - on MacOS | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
test-readme-macos: | |
runs-on: macos-14-xlarge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.11' | |
- name: Setup Xcode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: Run script | |
run: | | |
set -x | |
# NS: Remove previous installation of torch first | |
# as this script does not isntall anything into conda env but rather as system dep | |
pip3 uninstall -y torch || true | |
set -eou pipefail | |
echo "::group::Print machine info" | |
uname -a | |
sysctl machdep.cpu.brand_string | |
sysctl machdep.cpu.core_count | |
echo "::endgroup::" | |
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly" | |
export TORCHCHAT_DEVICE=cpu | |
. .ci/scripts/run-docs readme | |
echo "::group::Completion" | |
echo "tests complete" | |
echo "*******************************************" | |
echo "::endgroup::" | |
test-quantization-macos: | |
runs-on: macos-14-xlarge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.11' | |
- name: Setup Xcode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: Run script | |
run: | | |
set -x | |
# NS: Remove previous installation of torch first | |
# as this script does not isntall anything into conda env but rather as system dep | |
pip3 uninstall -y torch || true | |
set -eou pipefail | |
echo "::group::Print machine info" | |
uname -a | |
sysctl machdep.cpu.brand_string | |
sysctl machdep.cpu.core_count | |
echo "::endgroup::" | |
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly" | |
export TORCHCHAT_DEVICE=cpu | |
. .ci/scripts/run-docs quantization | |
echo "::group::Completion" | |
echo "tests complete" | |
echo "*******************************************" | |
echo "::endgroup::" | |
test-gguf-macos: | |
runs-on: macos-14-xlarge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.11' | |
- name: Setup Xcode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: Run script | |
run: | | |
set -x | |
# NS: Remove previous installation of torch first | |
# as this script does not isntall anything into conda env but rather as system dep | |
pip3 uninstall -y torch || true | |
set -eou pipefail | |
echo "::group::Print machine info" | |
uname -a | |
sysctl machdep.cpu.brand_string | |
sysctl machdep.cpu.core_count | |
echo "::endgroup::" | |
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly" | |
export TORCHCHAT_DEVICE=cpu | |
.ci/scripts/run-docs gguf | |
echo "::group::Completion" | |
echo "tests complete" | |
echo "*******************************************" | |
echo "::endgroup::" | |
test-advanced-macos: | |
runs-on: macos-14-xlarge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.11' | |
- name: Setup Xcode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: Run script | |
run: | | |
set -x | |
# NS: Remove previous installation of torch first | |
# as this script does not isntall anything into conda env but rather as system dep | |
pip3 uninstall -y torch || true | |
set -eou pipefail | |
echo "::group::Print machine info" | |
uname -a | |
sysctl machdep.cpu.brand_string | |
sysctl machdep.cpu.core_count | |
echo "::endgroup::" | |
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly" | |
export TORCHCHAT_DEVICE=cpu | |
. .ci/scripts/run-docs advanced | |
echo "::group::Completion" | |
echo "tests complete" | |
echo "*******************************************" | |
echo "::endgroup::" | |
test-eval-macos: | |
runs-on: macos-14-xlarge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.11' | |
- name: Setup Xcode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: Run script | |
run: | | |
set -x | |
# NS: Remove previous installation of torch first | |
# as this script does not isntall anything into conda env but rather as system dep | |
pip3 uninstall -y torch || true | |
set -eou pipefail | |
echo "::group::Print machine info" | |
uname -a | |
sysctl machdep.cpu.brand_string | |
sysctl machdep.cpu.core_count | |
echo "::endgroup::" | |
.ci/scripts/run-docs evaluation | |
echo "::group::Completion" | |
echo "tests complete" | |
echo "*******************************************" | |
echo "::endgroup::" | |
test-multimodal-macos: | |
runs-on: macos-14-xlarge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.11' | |
- name: Setup Xcode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: Run script | |
run: | | |
set -x | |
# NS: Remove previous installation of torch first | |
# as this script does not isntall anything into conda env but rather as system dep | |
pip3 uninstall -y torch || true | |
set -eou pipefail | |
echo "::group::Print machine info" | |
uname -a | |
sysctl machdep.cpu.brand_string | |
sysctl machdep.cpu.core_count | |
echo "::endgroup::" | |
# metadata does not install properly on macos | |
# .ci/scripts/run-docs multimodal | |
echo "::group::Completion" | |
echo "tests complete" | |
echo "*******************************************" | |
echo "::endgroup::" | |
test-native-macos: | |
runs-on: macos-14-xlarge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.11' | |
- name: Setup Xcode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: Run script | |
run: | | |
set -x | |
# NS: Remove previous installation of torch first | |
# as this script does not isntall anything into conda env but rather as system dep | |
pip3 uninstall -y torch || true | |
set -eou pipefail | |
echo "::group::Print machine info" | |
uname -a | |
sysctl machdep.cpu.brand_string | |
sysctl machdep.cpu.core_count | |
echo "::endgroup::" | |
echo ".ci/scripts/run-docs native DISABLED" | |
# .ci/scripts/run-docs native | |
echo "::group::Completion" | |
echo "tests complete" | |
echo "*******************************************" | |
echo "::endgroup::" | |