-
Notifications
You must be signed in to change notification settings - Fork 230
56 lines (51 loc) · 1.87 KB
/
run-readme-pr-macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 "::group::Install newer objcopy that supports --set-section-alignment"
# yum install -y devtoolset-10-binutils
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
# echo "::endgroup::"
echo "::group::Create script"
echo "set -eou pipefail" > ./readme-commands.sh
python3 scripts/process-readme.py >> ./readme-commands.sh
echo "exit 1" >> ./readme-commands.sh
echo "::endgroup::"
echo "::group::Run This"
grep -v login ./readme-commands.sh | sed -e '1,$s/llama3/stories15M/g' > ./we-run-this.sh
echo "*******************************************"
cat ./we-run-this.sh
echo "*******************************************"
bash -x ./we-run-this.sh
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"