-
Notifications
You must be signed in to change notification settings - Fork 10
84 lines (70 loc) · 2.09 KB
/
macos_conda_only.yaml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: MacOS From Source
on:
pull_request:
push:
branches:
- nightly
- main
- release/*
tags:
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
permissions:
id-token: write
contents: write
defaults:
run:
shell: bash -l -eo pipefail {0}
jobs:
install-and-test:
runs-on: macos-m1-stable
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
if: ${{ always() }}
steps:
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: test
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install PyTorch
run: |
conda install pytorch::pytorch torchvision torchaudio -c pytorch
- name: Install compile from source dependencies
run: |
conda install cmake pkg-config "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
- name: Check out repo
uses: actions/checkout@v3
- name: Install torchcodec from source
run: |
pip install -e ".[dev]" --no-build-isolation -vv
- name: Install test dependencies
run: |
conda install numpy pytest pillow
- name: Smoke test
run: |
python test/decoders/manual_smoke_test.py
- name: Run Python tests
continue-on-error: true
run: |
pytest test --capture=fd -k "test_throws_exception_at_eof" -vvv
- name: Print debug text
run: |
echo "pwd"
pwd
echo ""
echo "ls -lh"
ls -lh
echo ""
echo "cat debug.txt"
cat debug.txt