Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workspaces #962

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[codespell]
skip = ./.git,./tmp,./gapbind14,./libsemigroups,./tst,./bin,./libtool,configure,configure~,./gh-pages,./autom4te.cache,./cnf,aclocal.m4,./m4,./doc/*.log,./doc/*.html,./doc/*.txt,./doc/*.six,./doc/*.js,./doc/*.bbl,./doc/*.tex,./doc/*.bib
ignore-words-list=yse,alph,Alph,lits,bu,ser,wit,documen,ines
skip = ./.git,./tmp,./gapbind14,./libsemigroups,./tst,./bin,./libtool,configure,configure~,config.guess,./gh-pages,./autom4te.cache,./cnf,aclocal.m4,./m4,./doc/*.log,./doc/*.html,./doc/*.txt,./doc/*.six,./doc/*.js,./doc/*.bbl,./doc/*.tex,./doc/*.bib
ignore-words-list=yse,alph,Alph,lits,bu,ser,wit,documen,ines,manuel
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
schedule:
# Every day at 3:15 AM UTC
- cron: '15 3 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/workspaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This is temporary until/if:
# https://github.com/gap-actions/run-pkg-tests/pull/24
# is merged, or something equivalent, then remove the script ci/run-tests.sh,
# and use the save/load.g files as commented out below
name: "Workspaces"
on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
- "stable-*.*"
schedule:
# Every day at 3:15 AM UTC
- cron: '15 3 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
workspaces:
env:
GAP_VERSION: "4.12.2"
name: "GAP 4.12.2 / ubuntu / 64-bit"
runs-on: ubuntu-latest
container:
image: jamesdbmitchell/gap-docker-minimal:version-4.12.2
options: --user root
volumes:
- ${{ github.workspace }}:/home/gap/inst/gap-4.12.2/pkg/Semigroups
steps:
- name: "Checkout the Semigroups GAP package"

uses: actions/checkout@v3
- name: "Install git + autotools"
run: |
sudo apt-get --yes update
sudo apt-get install git --yes
sudo apt-get install pkg-config m4 libtool automake autoconf --yes
sudo apt-get install libtool-bin --yes
- name: "Setup ccache"
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ${{ runner.os }}-v4.12.2-64-${{ github.ref }}
override_cache_key_fallback: ${{ runner.os }}-v4.12.2-64
- name: "Build the Semigroups GAP package"
run: |
cd /home/gap/inst/gap-4.12.2/pkg/Semigroups
./prerequisites.sh
./autogen.sh
./configure --disable-hpcombi
make -j4
- name: "Install Semigroups GAP package dependencies"
run: |
echo "LoadPackage(\"PackageManager\"); QuitGap(InstallPackage(\"autodoc\", false));" | gap -A -T --quitonbteak
echo "LoadPackage(\"PackageManager\"); QuitGap(InstallPackage(\"datastructures\", false));" | gap -A -T --quitonbteak
echo "LoadPackage(\"PackageManager\"); QuitGap(InstallPackage(\"digraphs\", false));" | gap -A -T --quitonbteak
echo "LoadPackage(\"PackageManager\"); QuitGap(InstallPackage(\"genss\", false));" | gap -A -T --quitonbteak
echo "LoadPackage(\"PackageManager\"); QuitGap(InstallPackage(\"images\", false));" | gap -A -T --quitonbteak
echo "LoadPackage(\"PackageManager\"); QuitGap(InstallPackage(\"orb\", false) and CompilePackage(\"orb\"));" | gap -A -T --quitonbteak
- name: "Run tst/workspaces/save.g"
run: |
cd /home/gap/inst/gap-4.12.2/pkg/Semigroups
gap -A -T --quitonbreak tst/workspaces/save.g
- name: "Run tst/workspaces/load.g"
run: |
cd /home/gap/inst/gap-4.12.2/pkg/Semigroups
gap -A -T --quitonbreak -L tst/workspaces/test-output.w tst/workspaces/load.g
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@
/libsemigroups/
/src/pkgconfig.h.in
/src/semigroups-config.hpp
test-output.w
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,10 @@ module, including many by [Max Horn][], such as
those in PRs
[#490](https://github.com/gap-packages/Semigroups/pull/490),
[#491](https://github.com/gap-packages/Semigroups/pull/491),
[#493](hhttps://github.com/gap-packages/Semigroups/pull/493),
[#501](hhttps://github.com/gap-packages/Semigroups/pull/501),
[#553](hhttps://github.com/gap-packages/Semigroups/pull/553), and
[#562](hhttps://github.com/gap-packages/Semigroups/pull/562).
[#493](https://github.com/gap-packages/Semigroups/pull/493),
[#501](https://github.com/gap-packages/Semigroups/pull/501),
[#553](https://github.com/gap-packages/Semigroups/pull/553), and
[#562](https://github.com/gap-packages/Semigroups/pull/562).

Semigroups now requires version 4.8.1 of the
[orb package](https://gap-packages.github.io/orb), or newer.
Expand Down Expand Up @@ -1412,7 +1412,7 @@ expanded to include more types of semigroups than just those of
transformations and partial permutations).

A minor release fixing several bugs relating to inverse semigroups
of partial permutations pointed out by partcipants at the
of partial permutations pointed out by participants at the
University of St Andrews Research for Undergraduates Summer School
in July 2012. Most notably by Demi Allen, Casey Donoven, Rhiannon
Dougall, Robert Hancock, and [Wilf A. Wilson][]. More specifically,
Expand Down
65 changes: 0 additions & 65 deletions ci/run-tests.sh

This file was deleted.

2 changes: 1 addition & 1 deletion gap/tools/io.gi
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function(arg)
fi;

for i in [1 .. Length(coll)] do
n := Size(coll[i]); # Don't assume all multiplcation tables are same size.
n := Size(coll[i]); # Don't assume all multiplication tables are same size.
if not (IsRectangularTable(coll[i]) and IsInt(coll[i][1][1])) then
if IsString(name) then
IO_Close(file);
Expand Down
1 change: 0 additions & 1 deletion gapbind14/src/gapbind14.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,5 @@ namespace gapbind14 {

MakeImmutable(global_rec);
AssReadOnlyGVar(GVarName(name), global_rec);
m.clear();
}
} // namespace gapbind14
7 changes: 4 additions & 3 deletions tst/workspaces/load-workspace.tst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
##
#############################################################################

# Set up testing environment
# DO NOT USE LOCAL VARIABLES @local in this file!

#@local D, DD, id, idd, xx
# Set up testing environment
gap> START_TEST("Semigroups package: workspaces/load-workspace.tst");
gap> SEMIGROUPS.StartTest();

Expand Down Expand Up @@ -136,6 +136,7 @@ gap> AsDigraph(b);
gap> CanonicalBlocks(b);
<blocks: [ 1* ], [ 2*, 3* ], [ 4*, 5*, 6*, 7* ], [ 8, 9, 10 ]>

#
# No point unbinding local variables, since this will only ever be run in a
# workspace
gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: workspaces/load-workspace.tst");
11 changes: 11 additions & 0 deletions tst/workspaces/load.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#############################################################################
##
#W load.g
#Y Copyright (C) 2023 James D Mitchell
##
## Licensing information can be found in the README file of this package.
##
#############################################################################
##

QuitGap(Test("tst/workspaces/load-workspace.tst") and SemigroupsTestInstall());
17 changes: 16 additions & 1 deletion tst/workspaces/save-workspace.tst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
##
#############################################################################

# DO NOT USE LOCAL VARIABLES @local in this file!

# Set up testing environment

#@local D, DD, S, T, U, b, cong, id, idd, x, xx, y
gap> START_TEST("Semigroups package: workspaces/save-workspace.tst");
gap> SetInfoLevel(InfoDebug, 0);
gap> LoadPackage("semigroups", false);;
Expand Down Expand Up @@ -146,6 +147,20 @@ gap> SaveWorkspace(Concatenation(SEMIGROUPS.PackageDir,
> "/tst/workspaces/test-output.w"));
true

# Unbind local variables, auto-generated by etc/tst-unbind-local-vars.py
gap> Unbind(D);
gap> Unbind(DD);
gap> Unbind(S);
gap> Unbind(T);
gap> Unbind(U);
gap> Unbind(b);
gap> Unbind(cong);
gap> Unbind(id);
gap> Unbind(idd);
gap> Unbind(x);
gap> Unbind(xx);
gap> Unbind(y);

#
gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: workspaces/save-workspace.tst");
14 changes: 14 additions & 0 deletions tst/workspaces/save.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#############################################################################
##
#W save.g
#Y Copyright (C) 2023 James D Mitchell
##
## Licensing information can be found in the README file of this package.
##
#############################################################################
##

SetInfoLevel(InfoPackageLoading, 4);
LoadPackage("semigroups", false);
SetInfoLevel(InfoPackageLoading, 0);
QuitGap(SemigroupsTestInstall() and Test("tst/workspaces/save-workspace.tst"));
Loading