Skip to content

fix: bug

fix: bug #4

Workflow file for this run

name: fairseq
on: [workflow_dispatch, push, pull_request]
jobs:
build:
name: Build fairseq
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: |
python -m pip install --upgrade "pip<24.1"
pip install fairseq
- run: |
# 记录fairseq版本到env
fairseq_version=$(python -c "import fairseq; print(fairseq.__version__)")
echo "fairseq_version=$fairseq_version" >> $GITHUB_ENV
- run: |
python -c "import torch; print(f'Using torch version: {torch.__version__}')"
continue-on-error: true
- uses: actions/upload-artifact@v3
with:
name: Windows whl
path: fairseq-*.whl
if-no-files-found: error
- name: Create GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fairseq-*.whl
tag: fairseq-${{ env.fairseq_version }}
name: Release fairseq-${{ env.fairseq_version }}
body: |
This release contains the fairseq wheel for version ${{ env.fairseq_version }} with python ${{ matrix.python-version }}
draft: false
prerelease: false