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

Setup CI #6

Merged
merged 2 commits into from
May 2, 2024
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
36 changes: 36 additions & 0 deletions .github/workflows/gap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "GAP"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- stable-*.*

jobs:
test-unix:
name: "${{ matrix.os }}${{ matrix.ABI }} / GAP ${{ matrix.gap-branch }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
fail-fast: false
matrix:
os:
- ubuntu
gap-branch:
- master
- stable-4.11
- stable-4.12
- stable-4.13

steps:
- uses: actions/checkout@v4
- name: "Install GAP and clone/compile necessary packages"
uses: gap-actions/setup-gap@v2
with:
GAPBRANCH: ${{ matrix.gap-branch }}
- name: "Run DigraphsTestInstall"
uses: gap-actions/run-pkg-tests@v2
with:
GAP_TESTFILE: "tst/testall.g"
- uses: gap-actions/process-coverage@v2
- uses: codecov/codecov-action@v3
3 changes: 2 additions & 1 deletion gap/dot.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,8 @@ function(attrs)
if ' ' in key then
key := StringFormatted("\"{}\"", key);
fi;
if ' ' in val then
if ' ' in val or '>' in val then
# TODO what are the allowed things in the value?
val := StringFormatted("\"{}\"", val);
fi;
fi;
Expand Down
28 changes: 3 additions & 25 deletions gap/splash.gi
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,11 @@ if not IsBound(Splash) then # This function is written by A. Egri-Nagy
fi;
fi;

# type
if IsBound(opt.type) and (opt.type = "latex" or opt.type = "dot") then
type := opt.type;
elif Length(str) >= 6 and str{[1 .. 6]} = "%latex" then
type := "latex";
elif Length(str) >= 5 and str{[1 .. 5]} = "//dot" then
type := "dot";
else
ErrorNoReturn("the component \"type\" of the 2nd argument <a record> ",
" must be \"dot\" or \"latex\",");
fi;
if type = "latex" then
inn := Concatenation(dir, file, ".tex");
else # type = "dot"
inn := Concatenation(dir, file, ".dot");
fi;
inn := Concatenation(dir, file, ".dot");

# output type and name
filetype := "pdf"; # default
if IsBound(opt.filetype) and IsString(opt.filetype) and type <> "latex" then
if IsBound(opt.filetype) and IsString(opt.filetype) then
filetype := opt.filetype;
fi;
out := Concatenation(dir, file, ".", filetype);
Expand All @@ -112,16 +97,9 @@ if not IsBound(Splash) then # This function is written by A. Egri-Nagy

# Write and compile the file
FileString(inn, str);
if type = "latex" then
# Requires GAP >= 4.11:
# Exec(StringFormatted("cd {}; pdflatex {} 2>/dev/null 1>/dev/null", dir);
Exec(Concatenation("cd ", dir, ";",
"pdflatex ", file, " 2>/dev/null 1>/dev/null"));
else # type = "dot"
# Requires GAP >= 4.11:
# Exec(StringFormatted("{} -T {} {} -o {}", engine, filetype, inn, out));
Exec(Concatenation(engine, " -T", filetype, " ", inn, " -o ", out));
fi;
Exec(Concatenation(engine, " -T", filetype, " ", inn, " -o ", out));
Exec(Concatenation(viewer, " ", out, " 2>/dev/null 1>/dev/null &"));
end);
fi;
Loading