diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 24a2618d96..817beef588 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,9 +15,9 @@ on: - '.github/workflows/docs.yml' jobs: - ############################################################################## + ############################################################################# # build documentation - ############################################################################## + ############################################################################# build-doc: name: Push documentation to website if: github.repository == 'flintlib/flint' @@ -29,7 +29,7 @@ jobs: - name: "Setup" run: | - sudo apt-get install -y python3-sphinx + sudo apt-get install -y python3-sphinx texlive-full sphinx-build --version - name: "Build documentation" @@ -38,12 +38,9 @@ jobs: make html SPHINXOPTS="-W -j auto" - name: "Build PDF documentation" - uses: dante-ev/latex-action@latest - with: - root_file: - compiler: - args: - entrypoint: doc/entrypoint.sh + run: | + cd doc + make latexpdf SPHINXOPTS="-W -j auto" - name: "Create a tarball of the documentation" run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00e0e6c6e7..bb7f22e3f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 , @@ -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 wbhart@opal6.opalstack.com:~/apps/flintlib_org/download/ - # Rebuild the website - ssh -t wbhart@opal6.opalstack.com '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 wbhart@opal6.opalstack.com '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` ?