-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add valgrind workflow * Create core * Change matrix structure * Add valgrind job * Edit 4.10 job * Consistent indents * Add os * Add config-options * Make bliss and planarity a matrix * os -> OS * Remove old workflow files * kernel: fix compilation in debug mode * config-options -> Config-options * Remove --enable-code-coverage test * Add NO_COVERAGE * Valgrind only on release * Output g++ version * Add macOS into name of mac-only step * Add graphviz * consistent use of NautyTracesInterface * remove tests for GAP 4.10 * Use stable-4.13 as default * Warning is error when testing warnings * Make names consistent --------- Co-authored-by: James D. Mitchell <[email protected]>
- Loading branch information
1 parent
3b42ed7
commit c9b186a
Showing
15 changed files
with
430 additions
and
570 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Run package tests | ||
description: Run package tests | ||
inputs: | ||
NO_COVERAGE: | ||
description: set to a non-empty string to suppress gathering coverage | ||
required: false | ||
type: string | ||
default: "" | ||
GAP_TESTFILE: | ||
description: Name of the GAP file to be read for executing the package tests (overrides TestFile in PackageInfo.g) | ||
required: false | ||
type: string | ||
default: "" | ||
only-needed: | ||
description: If set to true then only needed dependencies of the package being tested are loaded | ||
required: false | ||
type: boolean | ||
default: false | ||
pre-gap: | ||
description: Commands to be prepended to gap | ||
required: false | ||
type: string | ||
default: "" | ||
|
||
env: | ||
CHERE_INVOKING: 1 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Run tests | ||
run: | | ||
set -ex | ||
GAPROOT=${GAPROOT-$HOME/gap} | ||
# set up a custom GAP root containing only this package, so that | ||
# we can force GAP to load the correct version of this package | ||
# (we already did that in build_pkg.sh, but we do it again here, | ||
# to allow the occasional instance where a package wants to also | ||
# run the tests of others packages, by invoking this script multiple | ||
# times in different directories) | ||
mkdir -p /tmp/gaproot/pkg/ | ||
ln -f -s $PWD /tmp/gaproot/pkg/ | ||
# start GAP with custom GAP root, to ensure correct package version is loaded | ||
GAP="${{ inputs.pre-gap }} $GAPROOT/gap -l /tmp/gaproot; --quitonbreak" | ||
if ${{ inputs.only-needed }} = 'true' ; then | ||
GAP="$GAP -A" | ||
fi | ||
# Unless explicitly turned off by setting the NO_COVERAGE environment variable, | ||
# we collect coverage data | ||
if [[ -z "${{ inputs.NO_COVERAGE }}" ]]; then | ||
mkdir -p ${COVDIR-coverage} | ||
GAP="$GAP --cover ${COVDIR-coverage}/$(mktemp XXXXXX).coverage" | ||
fi | ||
cat > __TEST_RUNNNER__.g <<EOF | ||
GAP_TESTFILE:="${{ inputs.GAP_TESTFILE }}"; | ||
Read("PackageInfo.g"); | ||
info := GAPInfo.PackageInfoCurrent; | ||
if IsEmpty(GAP_TESTFILE) or not IsExistingFile(GAP_TESTFILE) then | ||
GAP_TESTFILE := info.TestFile; | ||
fi; | ||
# Load the package with debug info | ||
SetInfoLevel(InfoPackageLoading, PACKAGE_DEBUG); | ||
SetPackagePath(info.PackageName, "/tmp/gaproot/pkg/$(basename $PWD)"); | ||
if ${{ inputs.only-needed }} = true then | ||
LoadPackage(info.PackageName : OnlyNeeded); | ||
else | ||
LoadPackage(info.PackageName); | ||
fi; | ||
SetInfoLevel(InfoPackageLoading, PACKAGE_ERROR); | ||
Print("Now running tests from ", GAP_TESTFILE, "\n"); | ||
if EndsWith(GAP_TESTFILE, ".tst") then | ||
QUIT_GAP(Test(GAP_TESTFILE, rec(compareFunction := "uptowhitespace"))); | ||
else | ||
Read(GAP_TESTFILE); | ||
Error("Package TestFile did not exit gap"); | ||
fi; | ||
EOF | ||
$GAP __TEST_RUNNNER__.g | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Config-options | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable-*.* | ||
schedule: | ||
# Every day at 3:30 AM UTC | ||
- cron: 30 3 * * * | ||
env: | ||
NO_COVERAGE: true | ||
|
||
jobs: | ||
with-external-planarity-bliss: | ||
name: ${{ matrix.bliss }} ${{ matrix.planarity }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
planarity: | ||
- --with-external-planarity | ||
- "" | ||
bliss: | ||
- --with-external-bliss | ||
- "" | ||
exclude: | ||
- planarity: "" | ||
bliss: "" | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Output g++ version . . . | ||
run: g++ --version | ||
- name: Install micromamba environment from environment.yml . . . | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-name: digraphs | ||
cache-environment: true | ||
create-args: ${{ matrix.bliss && 'bliss' || '' }} ${{ matrix.planarity && 'planarity' || ''}} | ||
- name: Set environment variables . . . | ||
run: | | ||
echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/digraphs/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/digraphs/share/pkgconfig" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/digraphs/lib" >> $GITHUB_ENV | ||
echo "CFLAGS=-I$MAMBA_ROOT_PREFIX/envs/digraphs/include" >> $GITHUB_ENV | ||
echo "LDFLAGS=-L$MAMBA_ROOT_PREFIX/envs/digraphs/lib" >> $GITHUB_ENV | ||
- name: Install GAP and clone/compile necessary packages . . . | ||
uses: gap-actions/setup-gap@v2 | ||
with: | ||
GAP_PKGS_TO_CLONE: NautyTracesInterface digraphs/graphviz | ||
GAP_PKGS_TO_BUILD: io orb datastructures grape NautyTracesInterface | ||
GAPBRANCH: stable-4.13 | ||
- name: Build Digraphs . . . | ||
uses: gap-actions/build-pkg@v1 | ||
with: | ||
CONFIGFLAGS: ${{ matrix.bliss }} ${{ matrix.planarity }} | ||
- name: Run Digraphs package's tst/teststandard.g . . . | ||
uses: gap-actions/run-pkg-tests@v2 | ||
with: | ||
NO_COVERAGE: true | ||
|
||
all-options: | ||
name: ${{ matrix.debug }} ${{ matrix.warnings }} ${{ matrix.without-intrinsics }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
warnings: | ||
- "--enable-compile-warnings" | ||
- "" | ||
debug: | ||
- "--enable-debug" | ||
- "" | ||
without-intrinsics: | ||
- "--without-intrinsics" | ||
- "" | ||
exclude: | ||
- warnings: "" | ||
debug: "" | ||
without-intrinsics: "" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Output g++ version . . . | ||
run: g++ --version | ||
- name: Install GAP and clone/compile necessary packages . . . | ||
uses: gap-actions/setup-gap@v2 | ||
with: | ||
GAP_PKGS_TO_CLONE: NautyTracesInterface digraphs/graphviz | ||
GAP_PKGS_TO_BUILD: io orb datastructures grape NautyTracesInterface | ||
GAPBRANCH: stable-4.13 | ||
- name: Build Digraphs . . . | ||
uses: gap-actions/build-pkg@v1 | ||
with: | ||
CONFIGFLAGS: ${{ matrix.debug }} ${{ matrix.without-intrinsics }} ${{ matrix.warnings && '--enable-compile-warnings WARNING_CXXFLAGS="-Werror" WARNING_CFLAGS="-Werror"' || '' }} | ||
- name: Run Digraphs package's tst/teststandard.g . . . | ||
uses: gap-actions/run-pkg-tests@v2 |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.