From 68e7388d58d026237997acf5ad6eeed32dca623a Mon Sep 17 00:00:00 2001 From: Felix Dittrich Date: Sat, 20 Apr 2024 11:09:46 +0200 Subject: [PATCH] [CI] update CI actions (#1558) --- .github/workflows/builds.yml | 6 ++-- .github/workflows/demo.yml | 6 ++-- .github/workflows/doc-status.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/docs.yml | 4 +-- .github/workflows/main.yml | 17 ++++----- .github/workflows/pr-labels.yml | 2 +- .github/workflows/publish.yml | 6 ++-- .github/workflows/pull_requests.yml | 4 +-- .github/workflows/references.yml | 54 ++++++++++++++--------------- .github/workflows/scripts.yml | 20 +++++------ .github/workflows/style.yml | 6 ++-- 12 files changed, 65 insertions(+), 64 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 03f8952287..8f45a8ad2c 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -21,19 +21,19 @@ jobs: name: Install MacOS prerequisites run: brew install cairo pango gdk-pixbuf libffi - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index a3b8a3c204..d62c7d79e0 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -21,19 +21,19 @@ jobs: run: brew install cairo pango gdk-pixbuf libffi - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('demo/tf-requirements.txt') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('demo/pt-requirements.txt') }} diff --git a/.github/workflows/doc-status.yml b/.github/workflows/doc-status.yml index ca6d84c476..294f3dc55a 100644 --- a/.github/workflows/doc-status.yml +++ b/.github/workflows/doc-status.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.9" architecture: x64 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0aa5a44976..70302c957f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -24,7 +24,7 @@ jobs: python: ["3.9"] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9ac34784a7..8efd563559 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,12 +15,12 @@ jobs: with: persist-credentials: false - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - name: Cache python modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-docs diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b8e682cb76..ecfb6a0e3a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,12 +16,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - name: Cache python modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-tests @@ -49,12 +49,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - name: Cache python modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-tests @@ -82,12 +82,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - name: Cache python modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-tests @@ -102,7 +102,7 @@ jobs: coverage run -m pytest tests/pytorch/ coverage xml -o coverage-pt.xml - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: coverage-pytorch path: ./coverage-pt.xml @@ -113,9 +113,10 @@ jobs: needs: [ pytest-common, pytest-tf, pytest-torch ] steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: flags: unittests fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 03240d5493..58d5df6092 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 - name: Install requests run: pip install requests - name: Process commit and find merger responsible for labeling diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e658e29966..3fd0b7c7ca 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,12 +16,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - name: Cache python modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} @@ -55,7 +55,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index cfae7adf3b..87baef1616 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -10,12 +10,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.9" architecture: x64 - name: Cache python modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-docs diff --git a/.github/workflows/references.yml b/.github/workflows/references.yml index 9e7cef1544..e9f7bd54dc 100644 --- a/.github/workflows/references.yml +++ b/.github/workflows/references.yml @@ -18,13 +18,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -32,7 +32,7 @@ jobs: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}- - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -70,13 +70,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -84,7 +84,7 @@ jobs: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}- - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -136,13 +136,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -150,7 +150,7 @@ jobs: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}- - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -191,19 +191,19 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }} @@ -235,19 +235,19 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }} @@ -279,13 +279,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -293,7 +293,7 @@ jobs: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}- - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }}-${{ hashFiles('references/requirements.txt') }} @@ -334,19 +334,19 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }} @@ -380,19 +380,19 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }} @@ -424,19 +424,19 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements-pt.txt') }} diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 60c126243b..a91d4cf5e6 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -21,19 +21,19 @@ jobs: run: brew install cairo pango gdk-pixbuf libffi - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} @@ -67,19 +67,19 @@ jobs: run: brew install cairo pango gdk-pixbuf libffi - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} @@ -113,19 +113,19 @@ jobs: run: brew install cairo pango gdk-pixbuf libffi - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - if: matrix.framework == 'tensorflow' name: Cache python modules (TF) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} - if: matrix.framework == 'pytorch' name: Cache python modules (PT) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} @@ -154,7 +154,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index aa866272b9..c755a06c15 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 @@ -35,12 +35,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x64 - name: Cache python modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}