diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml new file mode 100644 index 000000000..9067b5cd0 --- /dev/null +++ b/.github/workflows/valgrind.yml @@ -0,0 +1,57 @@ +name: Valgrind +on: + workflow_dispatch: + release: + types: [created] + push: + branches: + - rc-v* + pull_request: + paths: + - src/*.[hc]pp + +concurrency: + # Group by workflow and ref; the last component ensures that for pull + # requests, we limit to 1 concurrent job, but for the main branch we don't + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }} + # Only cancel intermediate pull request builds + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +jobs: + test-valgrind: + name: "Ubuntu / GAP stable-4.15 / valgrind" + runs-on: ubuntu-latest + env: + NO_COVERAGE: true + VALGRIND: valgrind --trace-children=yes --leak-check=full --error-exitcode=1 + steps: + - uses: actions/checkout@v5 + - name: "Output g++ version . . ." + run: g++ --version + - name: "Install Valgrind . . ." + run: sudo apt-get install valgrind + - name: "Install GAP . . ." + uses: gap-actions/setup-gap@v3 + with: + gap-version: stable-4.15 + configflags: --enable-valgrind + - name: "Build additional necessary GAP packages . . ." + run: | + cd ${GAPROOT}/pkg + ../bin/BuildPackages.sh --strict digraphs* io* orb* datastructures* profiling* + - name: "Build Semigroups . . ." + uses: gap-actions/build-pkg@v2 + with: + CONFIGFLAGS: --disable-hpcombi + - name: "Run SemigroupsTestInstall . . ." + uses: gap-actions/run-pkg-tests@v4 + with: + testfile: tst/github_actions/install.g + pre-gap: ${{ env.VALGRIND }} + coverage: false + - name: "Run SemigroupsTestStandard . . ." + uses: gap-actions/run-pkg-tests@v4 + with: + testfile: tst/github_actions/standard.g + pre-gap: ${{ env.VALGRIND }} + coverage: false diff --git a/src/bipart.cpp b/src/bipart.cpp index dd6504154..68c0640f1 100644 --- a/src/bipart.cpp +++ b/src/bipart.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2016 James D. Mitchell +// Copyright (C) 2016-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/bipart.hpp b/src/bipart.hpp index 44a52236a..9b0e69b3a 100644 --- a/src/bipart.hpp +++ b/src/bipart.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2016 James D. Mitchell +// Copyright (C) 2016-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/cong.cpp b/src/cong.cpp index 62cada6e5..4b11bc825 100644 --- a/src/cong.cpp +++ b/src/cong.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/cong.hpp b/src/cong.hpp index ce6cd4cc3..ad084a8ff 100644 --- a/src/cong.hpp +++ b/src/cong.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/conglatt.cpp b/src/conglatt.cpp index 6752f0303..cb4f0c00a 100644 --- a/src/conglatt.cpp +++ b/src/conglatt.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2022 James D. Mitchell +// Copyright (C) 2022-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/conglatt.hpp b/src/conglatt.hpp index 4614c27df..83fa65399 100644 --- a/src/conglatt.hpp +++ b/src/conglatt.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2022 James D. Mitchell +// Copyright (C) 20222-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-base.cpp b/src/froidure-pin-base.cpp index 1e01da412..0ed0cf26a 100644 --- a/src/froidure-pin-base.cpp +++ b/src/froidure-pin-base.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2022 James D. Mitchell +// Copyright (C) 2022-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-bipart.cpp b/src/froidure-pin-bipart.cpp index 96e340927..985cb4133 100644 --- a/src/froidure-pin-bipart.cpp +++ b/src/froidure-pin-bipart.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-bmat.cpp b/src/froidure-pin-bmat.cpp index 941dda818..505fcdc82 100644 --- a/src/froidure-pin-bmat.cpp +++ b/src/froidure-pin-bmat.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-fallback.cpp b/src/froidure-pin-fallback.cpp index d61965562..7b27c8852 100644 --- a/src/froidure-pin-fallback.cpp +++ b/src/froidure-pin-fallback.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2016-2022 James D. Mitchell +// Copyright (C) 2016-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-fallback.hpp b/src/froidure-pin-fallback.hpp index 8981f5f99..3f1df13bf 100644 --- a/src/froidure-pin-fallback.hpp +++ b/src/froidure-pin-fallback.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2016-2022 James D. Mitchell +// Copyright (C) 2016-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-matrix.cpp b/src/froidure-pin-matrix.cpp index e3e5ba089..2ad8cef2d 100644 --- a/src/froidure-pin-matrix.cpp +++ b/src/froidure-pin-matrix.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-max-plus-mat.cpp b/src/froidure-pin-max-plus-mat.cpp index 59732a2aa..c445b1444 100644 --- a/src/froidure-pin-max-plus-mat.cpp +++ b/src/froidure-pin-max-plus-mat.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-min-plus-mat.cpp b/src/froidure-pin-min-plus-mat.cpp index 70fd8cf26..3ca156aae 100644 --- a/src/froidure-pin-min-plus-mat.cpp +++ b/src/froidure-pin-min-plus-mat.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-pbr.cpp b/src/froidure-pin-pbr.cpp index 71f0ad8d2..6439523e4 100644 --- a/src/froidure-pin-pbr.cpp +++ b/src/froidure-pin-pbr.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-pperm.cpp b/src/froidure-pin-pperm.cpp index 3e8390dc5..8817be96a 100644 --- a/src/froidure-pin-pperm.cpp +++ b/src/froidure-pin-pperm.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin-transf.cpp b/src/froidure-pin-transf.cpp index 7293385c5..c5f65b84a 100644 --- a/src/froidure-pin-transf.cpp +++ b/src/froidure-pin-transf.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/froidure-pin.hpp b/src/froidure-pin.hpp index d77c1bcec..e73add7f2 100644 --- a/src/froidure-pin.hpp +++ b/src/froidure-pin.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/pkg.hpp b/src/pkg.hpp index ae469533f..5a2998666 100644 --- a/src/pkg.hpp +++ b/src/pkg.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2016-2022 James D. Mitchell +// Copyright (C) 2016-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/semigroups-debug.hpp b/src/semigroups-debug.hpp index 9fb89deca..aec2217ba 100644 --- a/src/semigroups-debug.hpp +++ b/src/semigroups-debug.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2017 James D. Mitchell +// Copyright (C) 2017-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/to_cpp.hpp b/src/to_cpp.hpp index 55bfac79b..38cda3309 100644 --- a/src/to_cpp.hpp +++ b/src/to_cpp.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2020-2022 James D. Mitchell +// Copyright (C) 2020-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/to_gap.cpp b/src/to_gap.cpp index 62bfe89be..1737c74cd 100644 --- a/src/to_gap.cpp +++ b/src/to_gap.cpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2021 James D. Mitchell +// Copyright (C) 2021-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/to_gap.hpp b/src/to_gap.hpp index 6206b5910..acfa56f07 100644 --- a/src/to_gap.hpp +++ b/src/to_gap.hpp @@ -1,6 +1,6 @@ // // Semigroups package for GAP -// Copyright (C) 2020-2022 James D. Mitchell +// Copyright (C) 2020-2025 James D. Mitchell // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/tst/github_actions/examples.g b/tst/github_actions/examples.g new file mode 100644 index 000000000..7f2d5ba66 --- /dev/null +++ b/tst/github_actions/examples.g @@ -0,0 +1,7 @@ +LoadPackage("semigroups", false);; +if SEMIGROUPS.TestManualExamples() then + QUIT_GAP(0); +else + QUIT_GAP(1); +fi; +FORCE_QUIT_GAP(1); diff --git a/tst/github_actions/extreme.g b/tst/github_actions/extreme.g new file mode 100644 index 000000000..b2ea88290 --- /dev/null +++ b/tst/github_actions/extreme.g @@ -0,0 +1,7 @@ +LoadPackage("semigroups", false);; +if SemigroupsTestExtreme(rec(earlyStop := false)) then + QUIT_GAP(0); +else + QUIT_GAP(1); +fi; +FORCE_QUIT_GAP(1); diff --git a/tst/github_actions/install.g b/tst/github_actions/install.g new file mode 100644 index 000000000..7456be72d --- /dev/null +++ b/tst/github_actions/install.g @@ -0,0 +1,7 @@ +LoadPackage("semigroups", false);; +if SemigroupsTestInstall() then + QUIT_GAP(0); +else + QUIT_GAP(1); +fi; +FORCE_QUIT_GAP(1); diff --git a/tst/github_actions/standard.g b/tst/github_actions/standard.g new file mode 100644 index 000000000..ab13b5d1d --- /dev/null +++ b/tst/github_actions/standard.g @@ -0,0 +1,7 @@ +LoadPackage("semigroups", false);; +if SemigroupsTestStandard(rec(earlyStop := false)) then + QUIT_GAP(0); +else + QUIT_GAP(1); +fi; +FORCE_QUIT_GAP(1);