-
Notifications
You must be signed in to change notification settings - Fork 654
64 lines (55 loc) · 2.18 KB
/
unittest-macos-cpu.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
57
58
59
60
61
62
63
64
name: Unit-tests on Macos CPU
on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:
env:
CHANNEL: "nightly"
jobs:
tests:
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
with:
runner: macos-12
repository: pytorch/audio
timeout: 180
script: |
echo '::group::Setup Environment Variables'
# Mark Build Directory Safe
git config --global --add safe.directory /__w/audio/audio
# Set up Environment Variables
export PYTHON_VERSION="3.8"
export CU_VERSION=""
export CUDATOOLKIT=""
export USE_OPENMP="0"
# Set CHANNEL
if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export UPLOAD_CHANNEL=test
else
export UPLOAD_CHANNEL=nightly
fi
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_APPLY_CMVN_SLIDING=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_FBANK_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_KALDI_PITCH_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_MFCC_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_SPECTROGRAM_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CUDA=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_HW_ACCEL=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_QUANTIZATION=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_ON_PYTHON_310=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_sentencepiece=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_AUDIO_OUT_DEVICE=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_TEMPORARY_DISABLED=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_SOX_DECODER=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_SOX_ENCODER=true
echo '::endgroup::'
set -euxo pipefail
echo '::group::Install PyTorch and Torchaudio'
./.github/scripts/unittest-linux/install.sh
echo '::endgroup::'
echo '::group::Run Tests'
./.github/scripts/unittest-linux/run_test.sh
echo '::endgroup::'