Skip to content

Hermite renamed in FIAT (#590) #74

Hermite renamed in FIAT (#590)

Hermite renamed in FIAT (#590) #74

Workflow file for this run

name: Archive DefElement
on:
push:
branches: [ main ]
workflow_dispatch:
permissions: {}
concurrency:
group: archive-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-version-number:
name: Check version number
runs-on: ubuntu-22.04
outputs:
release: ${{ steps.version.outputs.release }}
steps:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install PyGitHub
run: python3 -m pip install PyGitHub
- name: Check version number
run: python3 .github/scripts/check_version_number.py >> $GITHUB_OUTPUT
id: version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
build-archive:
name: Build archive
runs-on: ubuntu-22.04
needs:
- check-version-number
permissions:
id-token: write # Needed by push
contents: write # Allow pushing of zip
if: needs.check-version-number.outputs.release != 'no'
steps:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Clone verification
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: ./verification
repository: DefElement/DefElement
ref: verification
persist-credentials: false
continue-on-error: true
- name: Move verification jsons
run: |
mv verification/*.json .
rm -r verification
- run: mkdir -p ~/.local/share/fonts
name: Make font folder
- name: Clone Varela Round
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: ./varela-r
repository: avrahamcornfeld/Varela-Round-Hebrew
ref: master
persist-credentials: false
- run: |
cp varela-r/fonts/VarelaRound-Regular.otf ~/.local/share/fonts/
rm -r varela-r
name: Install Varela Round
- name: Download and install Computer Modern
run: |
wget https://downloads.sourceforge.net/project/cm-unicode/cm-unicode/0.7.0/cm-unicode-0.7.0-otf.tar.xz
tar -xf cm-unicode-0.7.0-otf.tar.xz
cp cm-unicode-0.7.0/cmunti.otf ~/.local/share/fonts/
rm -r cm-unicode-0.7.0
rm cm-unicode-0.7.0-otf.tar.xz
- run: python3 -m pip install .
name: Install defelement
- run: python3 build.py _html --verification-json verification.json --processes 4
name: Build website HTML
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install implementations
run: |
python3 -m pip install setuptools
python3 install_implementations.py
- name: Remove build cache
run: rm -r .defelement-build-cache
- name: Remove __pycache__
run: |
rm -r defelement/__pycache__
rm -r defelement/implementations/__pycache__
- name: Make lock file
run: python3 -m pip freeze > requirements.lock
- name: Make tar.gz
run: tar --exclude '.git' -czvf ../defelement-v${NEEDS_CHECK_VERSION_NUMBER_OUTPUTS_RELEASE}.tar.gz .
env:
NEEDS_CHECK_VERSION_NUMBER_OUTPUTS_RELEASE: ${{ needs.check-version-number.outputs.release }}
- name: Install PyGitHub
run: python3 -m pip install PyGitHub
- name: Make release
run: python3 .github/scripts/make_release.py
env:
PATH: ".."
VERSION: ${{ needs.check-version-number.outputs.release }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to Zenodo
run: python3 .github/scripts/upload_to_zenodo.py
env:
PATH: ".."
VERSION: ${{ needs.check-version-number.outputs.release }}
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}