forked from flintlib/flint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update release and documentation CI (flintlib#2174)
* Update release action * Append version and date into HISTORY on server * Set the release's title to FLINT v${VERSION} * Use texlive from apt instead of relying on a GH action * Push tag annotation into the release description * Use texlive-full from apt in documentation CI
- Loading branch information
1 parent
20062be
commit 3e32e7e
Showing
2 changed files
with
27 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,8 @@ on: | |
default: nightly | ||
push: | ||
tags: | ||
- v[1-9]+.[0-9]+.[0-9] # allow v1.2.3 | ||
- v[1-9]+.[0-9]+.[0-9]-* # allow v1.2.3-beta3 etc. | ||
- v[1-9]+.[0-9]+.[0-9] # allow v1.2.3 | ||
- v[1-9]+.[0-9]+.[0-9]-[a-z0-9]+ # allow v1.2.3-beta3 etc. | ||
schedule: | ||
# Every day at 3:33 AM UTC | ||
- cron: '33 3 * * *' | ||
|
@@ -31,7 +31,7 @@ concurrency: | |
|
||
jobs: | ||
version_and_tag: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
outputs: | ||
version: ${{ steps.get-version.outputs.version }} | ||
tag_name: ${{ steps.get-tag_name.outputs.tag_name }} | ||
|
@@ -70,7 +70,7 @@ jobs: | |
make-archive: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
needs: version_and_tag | ||
env: | ||
FLINT_VERSION: ${{ needs.version_and_tag.outputs.version }} | ||
|
@@ -97,7 +97,7 @@ jobs: | |
|
||
test-archive: | ||
needs: [version_and_tag, make-archive] | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
env: | ||
FLINT_VERSION: ${{ needs.version_and_tag.outputs.version }} | ||
TAG_NAME: ${{ needs.version_and_tag.outputs.tag_name }} | ||
|
@@ -147,7 +147,7 @@ jobs: | |
upload-archive: | ||
needs: [version_and_tag, make-archive, test-archive] | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
env: | ||
FLINT_VERSION: ${{ needs.version_and_tag.outputs.version }} | ||
TAG_NAME: ${{ needs.version_and_tag.outputs.tag_name }} | ||
|
@@ -170,22 +170,25 @@ jobs: | |
# figure out SUBJECT and PRERELEASE | ||
- if: env.TAG_NAME == 'nightly' | ||
run: | | ||
(echo 'SUBJECT=FLINT nightly release'; | ||
echo 'PRERELEASE=--prerelease --draft') >> $GITHUB_ENV | ||
(echo "SUBJECT=\"FLINT nightly release\""; | ||
echo "PRERELEASE=\"--prerelease --draft\"") >> $GITHUB_ENV | ||
gh release delete nightly --yes || true | ||
git push origin :nightly || true | ||
- if: env.TAG_NAME != 'nightly' | ||
run: | | ||
(echo 'SUBJECT=FLINT release'; | ||
echo 'PRERELEASE=') >> $GITHUB_ENV | ||
(echo "SUBJECT=\"FLINT v${FLINT_VERSION}\""; | ||
echo "PRERELEASE=") >> $GITHUB_ENV | ||
gh release delete stable --yes || true | ||
git push origin :stable || true | ||
- name: Generate checksums | ||
- name: Generate release message | ||
run: | | ||
printf '## SHA256 Checksums\n```\n' > $RUNNER_TEMP/notes.md | ||
# Print tag message | ||
git for-each-ref refs/tags/v${FLINT_VERSION} --format='%(contents)' > $RUNNER_TEMP/notes.md | ||
# Generate checksums | ||
printf '## SHA256 Checksums\n```\n' >> $RUNNER_TEMP/notes.md | ||
for ext in tar.gz tar.xz zip; do | ||
fn=flint-${FLINT_VERSION}.$ext | ||
# `sha256sum` outputs <sha> <path>, | ||
|
@@ -207,19 +210,12 @@ jobs: | |
gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA flint-${FLINT_VERSION}.{tar.gz,tar.xz,zip} | ||
- if: env.TAG_NAME != 'nightly' | ||
name: "Setup for PDF documentation" | ||
name: "Build PDF documentation" | ||
run: | | ||
sudo apt-get install -y python3-sphinx | ||
sudo apt-get install -y python3-sphinx texlive-full | ||
sphinx-build --version | ||
- if: env.TAG_NAME != 'nightly' | ||
name: "Build PDF documentation" | ||
uses: dante-ev/latex-action@latest | ||
with: | ||
root_file: | ||
compiler: | ||
args: | ||
entrypoint: doc/entrypoint.sh | ||
cd doc/ | ||
make latexpdf SPHINXOPTS="-W -j auto" | ||
- if: env.TAG_NAME != 'nightly' | ||
name: "Setup SSH key" | ||
|
@@ -236,7 +232,7 @@ jobs: | |
mv doc/build/latex/flint.pdf flint-${FLINT_VERSION}.pdf | ||
for ext in pdf tar.gz zip; do | ||
scp flint-${FLINT_VERSION}.$ext [email protected]:~/apps/flintlib_org/download/ | ||
# Rebuild the website | ||
ssh -t [email protected] 'cd ~/flintwebpage && python3 downloads.py ~/apps/flintlib_org && python3 build.py ~/apps/flintlib_org' | ||
# Rebuild the website and append version-date tuple to HISTORY | ||
ssh -t [email protected] 'cd ~/flintwebpage && date +'"'"'%Y-%m-%d'"'"' >> HISTORY && python3 downloads.py ~/apps/flintlib_org && python3 build.py ~/apps/flintlib_org' | ||
# TODO: we could / should perhaps also test `make install` ? |