[pre-commit.ci] pre-commit autoupdate #2117
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build package | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
windows: | |
environment: aws | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v6 | |
with: | |
python-version: "3.12" | |
- name: Install requirements | |
run: pip install -r requirements.txt | |
- name: Download dvc pkg | |
run: python download.py | |
- name: Set pkg type | |
shell: bash | |
run: echo 'PKG = "exe"' > dvc/dvc/_build.py | |
- name: Install dvc requirements | |
run: | | |
pip install .\dvc[all] | |
# https://github.com/iterative/dvc/issues/7949 | |
pip install PyInstaller==6.14.0 | |
# https://github.com/iterative/dvc/issues/9654 | |
pip install flufl-lock==7.1.1 | |
dvc doctor | |
- name: Build binary | |
run: python build_bin.py | |
- name: Pull images | |
run: dvc pull | |
- name: Build package | |
run: python build.py | |
- uses: azure/login@v2 | |
with: | |
client-id: ${{ vars.MICROSOFT_AZURE_CLIENT }} | |
tenant-id: ${{ vars.MICROSOFT_AZURE_TENANT }} | |
subscription-id: ${{ vars.MICROSOFT_AZURE_SUBSCRIPTION }} | |
- uses: azure/trusted-signing-action@v0 | |
with: | |
endpoint: https://eus.codesigning.azure.net/ | |
trusted-signing-account-name: iterative | |
certificate-profile-name: dvc-exe | |
files-folder: ${{ github.workspace }} | |
files-folder-filter: exe | |
file-digest: SHA256 | |
timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
timestamp-digest: SHA256 | |
- uses: aws-actions/configure-aws-credentials@v5 | |
with: | |
aws-region: us-east-2 | |
role-to-assume: arn:aws:iam::977611293394:role/dvc-public-exe-deployer | |
- name: Upload | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: python upload.py dvc-*.exe s3://dvc-packages/exe/ | |
notify: | |
if: github.ref == 'refs/heads/main' && failure() | |
needs: [windows] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Notification | |
uses: rtCamp/[email protected] | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: 'Package build failed for ${{ github.repository }}' | |
SLACK_TITLE: CI Status | |
SLACK_USERNAME: dvc-pkg-build |