File tree Expand file tree Collapse file tree 4 files changed +65
-50
lines changed Expand file tree Collapse file tree 4 files changed +65
-50
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,32 @@ CONDA_PATH=$(which conda)
7
7
eval " $( ${CONDA_PATH} shell.bash hook) "
8
8
conda config --set channel_priority strict
9
9
10
+ # Setup the OS_TYPE environment variable that should be used for conditions involving the OS below.
11
+ case $( uname) in
12
+ Linux)
13
+ OS_TYPE=linux
14
+ ;;
15
+ Darwin)
16
+ OS_TYPE=macos
17
+ ;;
18
+ * )
19
+ echo " Unknown OS type:" $( uname)
20
+ exit 1
21
+ ;;
22
+ esac
23
+
24
+ echo ' ::group::Uninstall system JPEG libraries on macOS'
25
+ # The x86 macOS runners, e.g. the GitHub Actions native "macos-12" runner, has some JPEG libraries installed by default
26
+ # that interfere with our build. We uninstall them here and use the one from conda below.
27
+ if [[ " ${OS_TYPE} " == " macos" && $( uname -m) == x86_64 ]]; then
28
+ JPEG_LIBS=$( brew list | grep jpeg)
29
+ echo $JPEG_LIBS
30
+ for lib in $JPEG_LIBS ; do
31
+ brew uninstall --ignore-dependencies --force $lib || true
32
+ done
33
+ fi
34
+ echo ' ::endgroup::'
35
+
10
36
echo ' ::group::Set PyTorch conda channel and wheel index'
11
37
# TODO: Can we maybe have this as environment variable in the job template? For example, `IS_RELEASE`.
12
38
if [[ (${GITHUB_EVENT_NAME} = ' pull_request' && (${GITHUB_BASE_REF} = ' release' * )) || (${GITHUB_REF} = ' refs/heads/release' * ) ]]; then
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Unit-tests on macOS
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - nightly
8
+ - main
9
+ - release/*
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ tests :
14
+ strategy :
15
+ matrix :
16
+ python-version :
17
+ - " 3.8"
18
+ - " 3.9"
19
+ - " 3.10"
20
+ - " 3.11"
21
+ runner : ["macos-12"]
22
+ include :
23
+ - python-version : " 3.8"
24
+ runner : macos-m1-12
25
+ fail-fast : false
26
+ uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
27
+ with :
28
+ repository : pytorch/vision
29
+ # We need an increased timeout here, since the macos-12 runner is the free one from GH
30
+ # and needs roughly 2 hours to just run the test suite
31
+ timeout : 240
32
+ runner : ${{ matrix.runner }}
33
+ script : |
34
+ export PYTHON_VERSION=${{ matrix.python-version }}
35
+ export GPU_ARCH_TYPE=cpu
36
+
37
+ ./.github/unittest.sh
Original file line number Diff line number Diff line change @@ -298,6 +298,8 @@ def get_extensions():
298
298
use_jpeg = use_jpeg and jpeg_found
299
299
if use_jpeg :
300
300
print ("Building torchvision with JPEG image support" )
301
+ print (f" libpng include path: { jpeg_include } " )
302
+ print (f" libpng lib path: { jpeg_lib } " )
301
303
image_link_flags .append ("jpeg" )
302
304
if jpeg_conda :
303
305
image_library += [jpeg_lib ]
You can’t perform that action at this time.
0 commit comments