Skip to content

Commit

Permalink
Update CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMoroz committed Sep 12, 2024
1 parent a44a228 commit 6ba2319
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autotests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
- name: Download wheel artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: all-wheels
path: ./wheels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
- name: Upload wheels as artifact
uses: actions/upload-artifact@v4
with:
name: manylinux-wheels
name: manylinux-wheels-py${{ matrix.python-version }}
path: wheelhouse/*.whl
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
- name: Upload wheels as artifact
uses: actions/upload-artifact@v4
with:
name: windows-wheels
name: windows-wheels-py${{ matrix.python-version }}
path: PythonBuild/dist/*.whl
23 changes: 13 additions & 10 deletions .github/workflows/download_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,20 @@ jobs:
run_id: runs.data.workflow_runs[0].id
});
const matchingArtifact = artifacts.data.artifacts.find(a => a.name === artifactName);
if (!matchingArtifact) return false;
const matchingArtifacts = artifacts.data.artifacts.filter(a => a.name.startsWith(artifactName));
if (matchingArtifacts.length === 0) return false;
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchingArtifact.id,
archive_format: 'zip',
});
for (const artifact of matchingArtifacts) {
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: 'zip',
});
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${artifactName}.zip`, Buffer.from(download.data));
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${artifact.name}.zip`, Buffer.from(download.data));
console.log(`Downloaded ${artifact.name}.zip`);
}
return true;
}
Expand All @@ -71,7 +74,7 @@ jobs:
done
- name: Upload wheels as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: all-wheels
path: ./wheels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
python-version: '3.x'
- name: Download wheel artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: all-wheels
path: ./wheels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload_to_test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
python-version: '3.x'
- name: Download wheel artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: all-wheels
path: ./wheels
Expand Down

0 comments on commit 6ba2319

Please sign in to comment.