Skip to content

CML build time

CML build time #38

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@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
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@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: cml_ci_time_evolution.png
path: cml_ci_time_evolution.png
- name: Archive raw data
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: github_ci_data.json
path: github_ci_data.json
- name: Archive data used for figure
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
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@b24d75fe0e728a4bf9fc42ee217caa686d141ee8
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