Skip to content

CML build time

CML build time #91

Workflow file for this run

# This workflow uses GitHub CLI to get timings of last 50 runs of Concrete ML main CI
# and send it to slack and add it as an artifact on the workflow
name: CML build time
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
# At 22:00 on Sunday
# Timezone is UTC, so Paris time is +2 during the summer and +1 during winter
- cron: '0 22 * * 0'
env:
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
RUNNER_TOOL_CACHE: /opt/hostedtoolcache
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
publish-timings:
# Using the regular Ubuntu 20.04 version recently started to raise related to grub-efi-amd64-signed
# More info : https://github.com/orgs/community/discussions/47863
runs-on: ubuntu-22.04
steps:
- name: Add masks
run: |
echo "::add-mask::${{ secrets.INTERNAL_PYPI_URL_FOR_MASK }}"
echo "::add-mask::${{ secrets.INTERNAL_REPO_URL_FOR_MASK }}"
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
id: setup-python
with:
python-version: 3.8
- name: Install dependencies
env:
SYSTEM_VERSION_COMPAT: 0
run: |
sudo apt update
# We need to freeze docker.io because its update requires user input
sudo apt-mark hold docker.io
sudo ./script/make_utils/setup_os_deps.sh
make setup_env
- name: Generate figure
run: |
poetry run python ./script/actions_utils/monitor.py
- name: Archive figure
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: cml_ci_time_evolution.png
path: cml_ci_time_evolution.png
- name: Archive raw data
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: github_ci_data.json
path: github_ci_data.json
- name: Archive data used for figure
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: github_ci_data.csv
path: github_ci_data.csv
- name: Slack Notification
if: ${{ success() }}
continue-on-error: true
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990
env:
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "CML-CI timings over last 4 weeks available at: (${{ env.ACTION_RUN_URL }})"
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
- name: Upload figure to Slack
run: |
curl -F file=@cml_ci_time_evolution.png -F "initial_comment=CML CI time evolution (over last 4 weeks)" -F channels=${{ secrets.CML_INTERNAL_UPDATE_SLACK_CHANNEL_ID }} -H "Authorization: Bearer ${{ secrets.SLACK_CI_MONITORING_BOT_TOKEN }}" https://slack.com/api/files.upload