Skip to content

Commit

Permalink
Merge pull request #249 from mh-northlander/feature/update-workflow
Browse files Browse the repository at this point in the history
Update workflow actions (node 16 to 20)
  • Loading branch information
mh-northlander authored Jun 3, 2024
2 parents 100f206 + 6507deb commit 5a92ccd
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 39 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/build-python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand All @@ -30,20 +30,21 @@ jobs:
working-directory: ./python
run: bash build-sdist.sh

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: python/dist/*

build-linux-wheels:
name: Build Linux Python Wheels (+PGO)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download dictionary
run: bash fetch_dictionary.sh "20220519" "core"

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -57,8 +58,9 @@ jobs:
with:
script: python/build-wheels-manylinux-pgo.sh

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-manylinux
path: python/dist/*manylinux*

build-non-linux-wheels:
Expand All @@ -67,16 +69,16 @@ jobs:
strategy:
matrix:
os: [windows-latest, macOS-latest]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -102,8 +104,9 @@ jobs:
ARCHFLAGS: -arch x86_64 -arch arm64
MACOSX_DEPLOYMENT_TARGET: 10.12

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}-${{ matrix.python-version }}
path: python/dist/*.whl

upload-to-pypi: # run only if all have succeeded
Expand All @@ -112,10 +115,11 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') # only for tags
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact # default artifact name
pattern: artifact-*
path: dist/
merge-multiple: true

- name: List files to upload
run: ls -R dist/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build rust document
# build document of lib only for now to avoid name collision.
Expand All @@ -19,7 +19,7 @@ jobs:
run: mv ./target/doc ./docs/rust

- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
Expand All @@ -36,7 +36,7 @@ jobs:
run: mv ./python/docs/build/html ./docs/python

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
36 changes: 20 additions & 16 deletions .github/workflows/python-upload-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand All @@ -28,20 +28,21 @@ jobs:
working-directory: ./python
run: bash build-sdist.sh

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: python/dist/*

build-linux-wheels:
name: Build Linux Python Wheels (+PGO)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download dictionary
run: bash fetch_dictionary.sh "20220519" "core"

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -58,8 +59,9 @@ jobs:
with:
script: python/build-wheels-manylinux-pgo.sh

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-manylinux
path: python/dist/*manylinux*

build-non-linux-wheels:
Expand All @@ -68,16 +70,16 @@ jobs:
strategy:
matrix:
os: [windows-latest, macOS-latest]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down Expand Up @@ -106,18 +108,20 @@ jobs:
ARCHFLAGS: -arch x86_64 -arch arm64
MACOSX_DEPLOYMENT_TARGET: 10.12

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}-${{ matrix.python-version }}
path: python/dist/*.whl

upload-to-testpypi: # run only if all have succeeded
needs: [ build-sdist, build-non-linux-wheels, build-linux-wheels ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact # default artifact name
pattern: artifact-*
path: dist/
merge-multiple: true

- name: List files to upload
run: ls -R dist/
Expand All @@ -135,13 +139,13 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download dictionary
run: bash fetch_dictionary.sh "20220519" "core"

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -32,7 +32,7 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-lint-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Rustfmt
run: cargo fmt -- --check --files-with-diff
2 changes: 1 addition & 1 deletion .github/workflows/rust-noncached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download dictionary
run: bash fetch_dictionary.sh "20220519" "core"
- name: Run tests (Debug)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download dictionary
run: bash fetch_dictionary.sh "20220519" "core"

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down

0 comments on commit 5a92ccd

Please sign in to comment.