Skip to content

CML build time

CML build time #62

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@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
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@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: cml_ci_time_evolution.png
path: cml_ci_time_evolution.png
- name: Archive raw data
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: github_ci_data.json
path: github_ci_data.json
- name: Archive data used for figure
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
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@4e5fb42d249be6a45a298f3c9543b111b02f7907
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