Skip to content

Commit

Permalink
Update: [Actions] Bump used actions versions
Browse files Browse the repository at this point in the history
actions/checkout from v1/v2 to v3
actions/setup-python from v1 to v4
openttd/actions/checkout from v1 to v2
RalfG/python-wheels-manylinux-build from v0.2.2 to v0.6.0
  • Loading branch information
glx22 committed Dec 3, 2022
1 parent b79e480 commit c7dcf5a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 100 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commit-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 4

Expand All @@ -32,7 +32,7 @@ jobs:
git log --oneline HEAD^..HEAD^2
- name: Checkout commit-checker
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: OpenTTD/OpenTTD-git-hooks
path: git-hooks
Expand Down
40 changes: 7 additions & 33 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,24 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', pypy3]
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy3.7']
exclude:
# Prebuilt pillow wheels aren't always available for the relevant PyPy version.
# The Ubuntu runner has zlib headers and can build it locally, but these can't without more work.
- os: macOS-latest
python-version: pypy3
python-version: pypy3.7
- os: windows-latest
python-version: pypy3
python-version: pypy3.7

steps:
- uses: actions/checkout@v1

- name: Ubuntu cache
uses: actions/cache@v1
if: startsWith(matrix.os, 'ubuntu')
with:
path: ~/.cache/pip
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
- name: macOS cache
uses: actions/cache@v1
if: startsWith(matrix.os, 'macOS')
with:
path: ~/Library/Caches/pip
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
- name: Windows cache
uses: actions/cache@v1
if: startsWith(matrix.os, 'windows')
with:
path: ~\AppData\Local\pip\Cache
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**\setup.py') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: setup.py

- name: Install dependencies
run: |
Expand Down
47 changes: 16 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Checkout tags
uses: openttd/actions/checkout@v1
uses: openttd/actions/checkout@v2
with:
with-tags: true

- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py

- name: Install twine
run: |
python -m pip install --upgrade pip
pip install twine
- name: Build manylinux Python wheels
uses: RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2014_x86_64
uses: RalfG/python-wheels-manylinux-build@v0.6.0-manylinux2014_x86_64
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38'
build-requirements: '-e .' # pip args
Expand All @@ -54,26 +49,21 @@ jobs:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Checkout tags
uses: openttd/actions/checkout@v1
uses: openttd/actions/checkout@v2
with:
with-tags: true

- uses: actions/cache@v1
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py

- name: Install dependencies
run: |
Expand Down Expand Up @@ -111,26 +101,21 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Checkout tags
uses: openttd/actions/checkout@v1
uses: openttd/actions/checkout@v2
with:
with-tags: true

- uses: actions/cache@v1
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py

- name: Install dependencies
run: |
Expand Down
46 changes: 12 additions & 34 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: python -m pip install -e .
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: python
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

testing:
name: Python 3.x on ${{ matrix.os }}
Expand All @@ -38,36 +38,14 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v1
if: startsWith(matrix.os, 'ubuntu')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v1
if: startsWith(matrix.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v1
if: startsWith(matrix.os, 'windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py

- name: Install dependencies
run: |
Expand All @@ -86,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Flake8
uses: TrueBrain/actions-flake8@master
with:
Expand All @@ -97,11 +75,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python 3.6
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.6
python-version: 3.7
- name: Black
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit c7dcf5a

Please sign in to comment.