Skip to content

Improvements to automorphisms/isomorphisms of solvable group #7657

Improvements to automorphisms/isomorphisms of solvable group

Improvements to automorphisms/isomorphisms of solvable group #7657

Workflow file for this run

# This workflow takes care of creating release archives for the
# GAP distribution. It is run for all PR and branch pushes as usual,
# but also on tags named `vX.Y.Z` with X, Y, Z numbers.
#
# For builds triggered by a tag, the tag is turned into a GitHub release and
# the produced archives are attached to that.
name: "Wrap releases"
on:
workflow_dispatch:
pull_request:
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.
branches:
- 'master'
- 'stable-*'
schedule:
# Every day at 3:33 AM UTC
- cron: '33 3 * * *'
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the default repository branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
env:
NO_COVERAGE: 1
jobs:
tools:
name: "Validate release scripts"
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v7
- name: "Set up Python"
uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: "Install some python packages"
run: |
python -m pip install -r dev/releases/requirements.txt
python -m pip install black isort mypy pytest
- name: "Check code formatting"
run: python -m black --check --diff dev/releases
- name: "Check imports"
run: python -m isort --check --profile black dev/releases
#- name: "Validate types"
# run: python -m mypy --disallow-untyped-calls --disallow-untyped-defs dev/releases/*.py
- name: "Run tests"
run: cd dev/releases && python -m pytest
unix:
name: "Create Unix archives and data"
needs: tools
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
gap-build-version: ${{ steps.get-build.outputs.name }}
env:
# Ubuntu only ships autoconf 2.71, but we need 2.72 for compatibility
# with GCC 14 & recent clang versions, so we build it ourselves.
AUTOCONF_VERSION: "2.72"
AUTOCONF_SHA256: "ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a"
steps:
# We need to force fetch tags on the repository in the next step, which
# requires fetching the entire history. Therefore, we might as well do
# that here when checking out the repo, which is what setting fetch-depth
# to 0 accomplishes here.
- uses: actions/checkout@v7
with:
fetch-depth: 0
# We need to know the git tags of the repository, because the GAP build
# system uses the tags to generate the version string for the GAP build,
# which we then extract in the "Record the GAP build version" step below.
#
# When an annotated tag is pushed, then for some reason we don't see it
# in this action; instead an unannotated tag with the same name is
# present, we resolve this by force-fetching tags.
# But we first fetch tags from gap-system/gap, so that our scripts should
# know about all of the 'usual' tags.
# Only then do we fetch tags from the current fork, which will overwrite
# any of those from gap-system/gap that conflict.
- name: "Force fetch tags"
run: |
git fetch https://github.com/gap-system/gap --tags --force
git fetch --tags --force
# Downloading the autoconf tarball from the GNU file servers regularly
# fails with 5xx errors. So we keep a copy of it in the GitHub Actions
# cache: as long as this workflow keeps running (it does so daily), the
# cache never expires, and we hardly ever bother the GNU servers again.
- name: "Cache the autoconf ${{ env.AUTOCONF_VERSION }} tarball"
uses: actions/cache@v6
with:
path: ~/.cache/gnu
key: autoconf-${{ env.AUTOCONF_VERSION }}.tar.xz
- name: "Install autoconf ${{ env.AUTOCONF_VERSION }}"
run: |
set -e
TARBALL="autoconf-${AUTOCONF_VERSION}.tar.xz"
mkdir -p ~/.cache/gnu
if [ ! -f ~/.cache/gnu/"${TARBALL}" ] ; then
# ftpmirror.gnu.org redirects to a nearby mirror and hence is what
# GNU asks us to use; ftp.gnu.org is the master server, so only
# resort to it if all else fails.
for url in "https://ftpmirror.gnu.org/gnu/autoconf/${TARBALL}" \
"https://mirrors.kernel.org/gnu/autoconf/${TARBALL}" \
"https://ftp.gnu.org/gnu/autoconf/${TARBALL}" ; do
echo "Fetching ${url}"
wget --tries=3 --timeout=30 --retry-connrefused \
--retry-on-http-error=429,500,502,503,504 \
-O "${TARBALL}" "${url}" && break
done
# verify before caching, so that a failed or truncated download
# cannot poison the cache
echo "${AUTOCONF_SHA256} ${TARBALL}" | sha256sum --check --strict
mv "${TARBALL}" ~/.cache/gnu/"${TARBALL}"
fi
# verify again, as this time the tarball may have come from the cache
echo "${AUTOCONF_SHA256} ${HOME}/.cache/gnu/${TARBALL}" | sha256sum --check --strict
tar xf ~/.cache/gnu/"${TARBALL}"
cd "autoconf-${AUTOCONF_VERSION}"
./configure
make -j$(nproc)
sudo make install
autoconf --version
- name: "Set up Python"
uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: "Install some python packages"
run: |
python -m pip install -r dev/releases/requirements.txt
- name: "Install latex"
run: |
packages=(
texlive-latex-base
texlive-latex-recommended
texlive-latex-extra
texlive-fonts-recommended
)
sudo apt-get update
sudo apt-get install --no-install-recommends "${packages[@]}"
- name: "Configure GAP"
run: dev/ci-configure-gap.sh
- name: "Build GAP"
run: dev/ci-build-gap.sh
- name: "Record the GAP build version"
id: get-build
run: |
BUILD=`head -1 cnf/GAP-VERSION-FILE | cut -d ' ' -f3`
echo "steps.get-build.outputs.name = ${BUILD}"
echo "name=${BUILD}" >> $GITHUB_OUTPUT
- name: "Make archives"
run: python -u ./dev/releases/make_archives.py
- name: "Test building GAP from the primary release archive"
run: |
mkdir -p test-gap-tarball
pushd test-gap-tarball
tar xvf ../tmp/gap-${{ steps.get-build.outputs.name }}.tar.gz
cd gap*
# test building GAP
./configure --prefix=/tmp/gapprefix
make -j8
popd
- name: "Test 'make install' from the primary release archive"
run: |
pushd test-gap-tarball/gap*
../../dev/ci.sh testmakeinstall
popd
# Upload the main GAP .tar.gz file (which includes packages).
#
# Warning: the result is a single .zip file (so things are compressed twice).
- name: "Upload GAP tarball"
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
name: gap
path: tmp/gap-${{ steps.get-build.outputs.name }}.tar.gz
retention-days: 1
# Always upload metadata, and keep longer, since it is much smaller.
- name: "Upload JSON metadata"
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
name: "JSON metadata"
path: tmp/*json.gz
retention-days: 7
- name: "Make GitHub release"
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: python -u ./dev/releases/make_github_release.py ${GITHUB_REF#refs/tags/} tmp/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
cygwin:
name: "Create Windows x86_64 installer"
needs: unix
runs-on: windows-2022
timeout-minutes: 120
env:
CHERE_INVOKING: 1
GAP_VERSION: ${{ needs.unix.outputs.gap-build-version }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
steps:
# The GAP to be wrapped is put into gap-$GAP_VERSION/
# The gap-windows script requires the GAP directory to be named this way.
# Download the artifact -- for an actual release, this contains the
# exact same tarball as was uploaded to the release as an asset
- name: "Download GAP archive from previous job"
uses: actions/download-artifact@v8
with:
name: gap
- name: "Extract the GAP release tarball"
run: |
tar -zxf gap-${GAP_VERSION}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Clone the Windows installer maker scripts"
uses: actions/checkout@v7
with:
repository: gap-system/gap-windows
ref: main
path: gap-windows
- uses: gap-actions/setup-cygwin@v2
# Currently, the gap-windows/release_gap.sh script wraps the GAP
# contained in gap-${GAP_VERSION}, and outputs its installer to
# gap-windows/Output/gap-${GAP_VERSION}-$ARCH.exe
#
# TODO:
# * Investigate how to speed this up. e.g. if we don't need to compile
# GAP's manuals then could we perhaps avoid installing TeXLive?
# * Investigate splitting release_gap.sh into multiple scripts so that
# this big step can be split up into multiple steps
- name: "Compile GAP and its packages, and create the installer"
shell: C:\cygwin64\bin\bash.exe --login --norc -o igncr '{0}'
run: |
cd ${GITHUB_WORKSPACE}/gap-windows
bash release_gap.sh
# compute the sha256sum, taking care to avoid a trailing newline
NAME=Output/gap-${{ env.GAP_VERSION }}-x86_64.exe
printf "%s" "$(sha256sum $NAME | cut -c1-64)" >$NAME.sha256
env:
ARCH: x86_64
# Artifacts live for 1 day, i.e. until the next cron job runs.
- name: "Upload the installer as an artifact"
if: ${{ github.event_name == 'schedule' }}
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
name: gap-${{ env.GAP_VERSION }}-x86_64.exe
path: gap-windows/Output/gap-${{ env.GAP_VERSION }}-x86_64.exe
retention-days: 1
- name: "Upload the installer to tag"
uses: softprops/action-gh-release@v3
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
files: |
gap-windows/Output/gap-${{ env.GAP_VERSION }}-x86_64.exe
gap-windows/Output/gap-${{ env.GAP_VERSION }}-x86_64.exe.sha256
# The following job is duplicated in CI.yml - keep the two in sync.
# (except for their different 'needs' components).
slack-notification:
name: Send Slack notification on status change
needs:
- unix
- cygwin
if: ${{ always() && github.event_name != 'pull_request' && github.repository == 'gap-system/gap' }}
runs-on: ubuntu-slim
steps:
- name: Get branch name
id: get-branch
run: echo "branch=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Determine whether CI status changed
uses: gap-actions/should-i-notify-action@v1
id: should_notify
with:
branch: ${{ steps.get-branch.outputs.branch }}
needs_context: ${{ toJson(needs) }}
github_token: ${{ secrets.GITHUB_TOKEN }}
notify_on_changed_status: true
- name: Send slack notification
uses: act10ns/slack@v2
if: ${{ steps.should_notify.outputs.should_send_message == 'yes' }}
with:
status: ${{ steps.should_notify.outputs.current_status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}