Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix artifacts upload, add arm build #26

Merged
merged 12 commits into from
Feb 2, 2024
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
with:
CIBW_SKIP: "pp* cp36-* cp37-*"
CIBW_BUILD: "cp*-macosx* cp*-manylinux* cp*-win*"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: "x86_64 aarch64"
CIBW_ARCHS_WINDOWS: "x86"
VERSION: ${{ github.ref_name }}
secrets: inherit

Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
CIBW_BUILD:
required: true
type: string
CIBW_ARCHS_MACOS:
required: false
type: string
CIBW_ARCHS_LINUX:
required: false
type: string
CIBW_ARCHS_WINDOWS:
required: false
type: string
VERSION:
required: false
type: string
Expand All @@ -23,18 +32,30 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set correct version
if: ${{ inputs.VERSION != '' }}
run: echo -n "${{ inputs.VERSION }}" > VERSION
- name: Build wheels
uses: pypa/[email protected].4
uses: pypa/[email protected].5
with:
output-dir: wheelhouse
env:
CIBW_SKIP: ${{ inputs.CIBW_SKIP }}
CIBW_BUILD: ${{ inputs.CIBW_BUILD }}
CIBW_ARCHS_MACOS: ${{ inputs.CIBW_ARCHS_MACOS }}
CIBW_ARCHS_LINUX: ${{ inputs.CIBW_ARCHS_LINUX }}
CIBW_ARCHS_WINDOWS: ${{ inputs.CIBW_ARCHS_WINDOWS }}
- name: List wheels
run: ls -lah ./wheelhouse
shell: bash
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build-sdist:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,32 @@ jobs:
with:
CIBW_SKIP: "pp* cp36-* cp37-*"
CIBW_BUILD: "cp*-macosx* cp*-manylinux* cp*-win*"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: "x86_64 aarch64"
CIBW_ARCHS_WINDOWS: "x86"
secrets: inherit

full-tests-python:
needs: [fast-tests-python, external-build-workflow]
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, macos-14, windows-latest] # at the moment macos-14 is exclusive M1 chip
# macos-14 not supporting 3.8 and 3.9
exclude:
- python-version: 3.8
os: macos-14
- python-version: 3.9
os: macos-14
fail-fast: false
name: Test wheel on ${{ matrix.os }} and Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: artifact # if `name: artifact` is omitted, the action will create extra parent dir
# for macos-14 get macos-latest artifacts
name: wheels-${{ matrix.os == 'macos-14' && 'macos-latest' || matrix.os }}
path: dist
- name: Show dist files
run: ls -lah ./dist
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![PyPI version](https://badge.fury.io/py/codebleu.svg)](https://badge.fury.io/py/codebleu)


This repository contains an unofficial `CodeBLEU` implementation that supports `Linux`, `MacOS` and `Windows`. It is available through `PyPI` and the `evaluate` library.
This repository contains an unofficial `CodeBLEU` implementation that supports `Linux`, `MacOS` (incl. M-series) and `Windows`. It is available through `PyPI` and the `evaluate` library.

Available for: `Python`, `C`, `C#`, `C++`, `Java`, `JavaScript`, `PHP`, `Go`, `Ruby`.

Expand Down
Loading