Skip to content

Commit

Permalink
Update deprecated actions and images in CI (#1815)
Browse files Browse the repository at this point in the history
* update action versions

* use more multi cpu in testing

* fix uploading and downloading artifacts

* more fixes to download artifacts

* upgrade `macos` to 13

* remove `xdist`

* better artifact names
  • Loading branch information
MahmoudAshraf97 authored Nov 19, 2024
1 parent 5795843 commit e14fffb
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
backend: [mkl, dnnl]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
backend: [openblas]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -137,11 +137,11 @@ jobs:
include:
- os: ubuntu-20.04
arch: aarch64
- os: macos-12
- os: macos-13
arch: arm64

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -150,7 +150,7 @@ jobs:
name: Set up QEMU

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.21.3
with:
package-dir: python
output-dir: python/wheelhouse
Expand All @@ -168,9 +168,9 @@ jobs:
CIBW_SKIP: pp* *-musllinux_*

- name: Upload Python wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-wheels
name: python-wheels-${{ runner.os }}-${{ matrix.arch }}
path: python/wheelhouse


Expand All @@ -185,21 +185,23 @@ jobs:

steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

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

- name: Prepare test environment
shell: bash
run: |
./python/tools/prepare_test_environment.sh
- name: Download Python wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-wheels
pattern: python-wheels-${{ runner.os }}-*
merge-multiple: true
path: .

- name: Install wheel
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -222,10 +224,10 @@ jobs:
runs-on: ubuntu-latest

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

- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down Expand Up @@ -257,9 +259,11 @@ jobs:

steps:
- name: Download Python wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-wheels
pattern: python-wheels-*
merge-multiple: true
path: .

- name: Publish Python wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand All @@ -272,7 +276,7 @@ jobs:
build-and-push-docker-images:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -299,17 +303,19 @@ jobs:
needs: [check-python-style, build-python-wheels]

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

- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Download CTranslate2 wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-wheels
pattern: python-wheels-${{ runner.os }}-*
merge-multiple: true
path: .

- name: Install CTranslate2 wheel
run: |
Expand Down

0 comments on commit e14fffb

Please sign in to comment.