|
| 1 | +name: CI Legacy |
| 2 | +on: |
| 3 | + # Run on manual trigger |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | + # Run on pull requests |
| 7 | + pull_request: |
| 8 | + paths-ignore: |
| 9 | + - '*.md' |
| 10 | + |
| 11 | + # Run when pushing to main or dev branches |
| 12 | + push: |
| 13 | + branches: |
| 14 | + - main |
| 15 | + - dev* |
| 16 | + |
| 17 | + # Run scheduled CI flow daily |
| 18 | + schedule: |
| 19 | + - cron: '0 8 * * 0' |
| 20 | + |
| 21 | +jobs: |
| 22 | + test: |
| 23 | + runs-on: ubuntu-16.04 |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + module: [attacks, classifiers, speech_recognizers, defences, metrics, wrappers, art] |
| 28 | + include: |
| 29 | + - name: legacy (TensorFlow 2.3.2 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.22.2 Python 3.7) |
| 30 | + framework: legacy |
| 31 | + python: 3.7 |
| 32 | + tensorflow: 2.3.2 |
| 33 | + keras: 2.4.3 |
| 34 | + scikit-learn: 0.22.2 |
| 35 | + torch: 1.7.1+cpu |
| 36 | + torchvision: 0.8.2+cpu |
| 37 | + torchaudio: 0.7.2 |
| 38 | + - name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.23.2 Python 3.7) |
| 39 | + framework: legacy |
| 40 | + python: 3.7 |
| 41 | + tensorflow: 2.4.1 |
| 42 | + keras: 2.4.3 |
| 43 | + torch: 1.7.1+cpu |
| 44 | + torchvision: 0.8.2+cpu |
| 45 | + torchaudio: 0.7.2 |
| 46 | + scikit-learn: 0.23.2 |
| 47 | + - name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.24.1 Python 3.7) |
| 48 | + framework: legacy |
| 49 | + python: 3.7 |
| 50 | + tensorflow: 2.4.1 |
| 51 | + keras: 2.4.3 |
| 52 | + torch: 1.7.1+cpu |
| 53 | + torchvision: 0.8.2+cpu |
| 54 | + torchaudio: 0.7.2 |
| 55 | + scikit-learn: 0.24.1 |
| 56 | + |
| 57 | + name: Run ${{ matrix.module }} ${{ matrix.name }} Tests |
| 58 | + steps: |
| 59 | + - name: Checkout Repo |
| 60 | + |
| 61 | + - name: Setup Python |
| 62 | + |
| 63 | + with: |
| 64 | + python-version: ${{ matrix.python }} |
| 65 | + - name: Install Dependencies |
| 66 | + run: | |
| 67 | + sudo apt-get update |
| 68 | + sudo apt-get -y -q install ffmpeg libavcodec-extra |
| 69 | + python -m pip install --upgrade pip setuptools wheel |
| 70 | + pip install tensorflow==2.4.1 |
| 71 | + pip install keras==2.4.3 |
| 72 | + pip3 install -q -r requirements.txt |
| 73 | + pip list |
| 74 | + - name: Pre-install legacy |
| 75 | + if: ${{ matrix.framework == 'legacy' }} |
| 76 | + run: | |
| 77 | + pip install tensorflow==${{ matrix.tensorflow }} |
| 78 | + pip install keras==${{ matrix.keras }} |
| 79 | + pip install scikit-learn==${{ matrix.scikit-learn }} |
| 80 | + pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/torch_stable.html |
| 81 | + pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/torch_stable.html |
| 82 | + pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/torch_stable.html |
| 83 | + pip list |
| 84 | + - name: Run ${{ matrix.name }} ${{ matrix.module }} Tests |
| 85 | + run: ./run_tests.sh ${{ matrix.framework }} ${{ matrix.module }} |
| 86 | + - name: Upload coverage to Codecov |
| 87 | + |
0 commit comments