Skip to content

Commit 59bff3f

Browse files
authored
Model registry generation (#32)
1 parent d4a4d30 commit 59bff3f

File tree

3 files changed

+566
-0
lines changed

3 files changed

+566
-0
lines changed

.circleci/config.yml

+46
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,45 @@ jobs:
5858
else
5959
echo "### Nothing to commit"
6060
fi
61+
generate-registry:
62+
docker:
63+
- image: cimg/python:3.10.2
64+
working_directory: ~/mozilla/firefox-translations-models
65+
steps:
66+
- add_ssh_keys:
67+
fingerprints:
68+
- "11:60:82:e2:71:39:67:44:07:4c:16:8f:3d:89:6d:db"
69+
- run:
70+
name: Installing git lfs
71+
command: |
72+
sudo apt-get update
73+
sudo apt-get install -y git-lfs
74+
sudo git lfs install
75+
- checkout
76+
- run:
77+
name: Updating model registry
78+
command: |
79+
python scripts/generate-registry.py
80+
- run:
81+
name: Showing results
82+
command: |
83+
git add registry.json
84+
git --no-pager diff --staged registry.json
85+
- run:
86+
name: Pushing results
87+
command: |
88+
git config user.email "ci-models-evaluation@firefox-translations"
89+
git config user.name "CircleCI evaluation job"
90+
git add registry.json
91+
92+
if [[ $(git status --porcelain) ]]; then
93+
echo "### Commiting results"
94+
git commit -m "Update model registry [skip ci]"
95+
git push --set-upstream origin "$CIRCLE_BRANCH"
96+
else
97+
echo "### Nothing to commit"
98+
fi
99+
61100
62101
workflows:
63102
version: 2
@@ -76,3 +115,10 @@ workflows:
76115
ignore:
77116
- /pull\/[0-9]+/
78117
- main
118+
- generate-registry:
119+
filters:
120+
branches:
121+
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
122+
ignore:
123+
- /pull\/[0-9]+/
124+
- main

0 commit comments

Comments
 (0)