From 9fe8e55d7c683fc95b44cec7fdc83a5820ae4d8e Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Fri, 10 May 2024 18:32:10 +0100 Subject: [PATCH] Make names consistent --- .github/actions/test_with_valgrind/action.yml | 120 +++++++++--------- .github/workflows/codespell.yml | 6 +- .github/workflows/config_options.yml | 42 +++--- .github/workflows/lint.yml | 23 ++-- .github/workflows/manual.yml | 16 +-- .github/workflows/os.yml | 52 ++++---- .github/workflows/ubuntu.yml | 36 +++--- .github/workflows/valgrind.yml | 30 ++--- 8 files changed, 162 insertions(+), 163 deletions(-) diff --git a/.github/actions/test_with_valgrind/action.yml b/.github/actions/test_with_valgrind/action.yml index c3a3ac1e9..f15544ea1 100644 --- a/.github/actions/test_with_valgrind/action.yml +++ b/.github/actions/test_with_valgrind/action.yml @@ -1,88 +1,88 @@ -name: 'Run package tests' -description: 'Run package tests' +name: Run package tests +description: Run package tests inputs: NO_COVERAGE: - description: 'set to a non-empty string to suppress gathering coverage' + description: set to a non-empty string to suppress gathering coverage required: false type: string - default: '' + default: "" GAP_TESTFILE: - description: 'Name of the GAP file to be read for executing the package tests (overrides TestFile in PackageInfo.g)' + description: Name of the GAP file to be read for executing the package tests (overrides TestFile in PackageInfo.g) required: false type: string - default: '' + default: "" only-needed: - description: 'If set to true then only needed dependencies of the package being tested are loaded' + 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' + description: Commands to be prepended to gap required: false type: string - default: '' - + default: "" + env: CHERE_INVOKING: 1 runs: - using: "composite" + using: composite steps: - - name: "Run tests" - run: | - set -ex + - name: Run tests + run: | + set -ex - GAPROOT=${GAPROOT-$HOME/gap} + 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/ + # 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" + # 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 + 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 + # 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 < __TEST_RUNNNER__.g <> $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" + - 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" + GAP_PKGS_TO_CLONE: NautyTracesInterface digraphs/graphviz + GAP_PKGS_TO_BUILD: io orb datastructures grape NautyTracesInterface GAPBRANCH: stable-4.13 - - name: "Build Digraphs" + - name: Build Digraphs . . . uses: gap-actions/build-pkg@v1 with: CONFIGFLAGS: ${{ matrix.bliss }} ${{ matrix.planarity }} - - name: "Run Digraphs package's tst/teststandard.g" + - 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" + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -84,17 +84,17 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Output g++ version + - name: Output g++ version . . . run: g++ --version - - name: "Install GAP and clone/compile necessary packages" + - 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" + GAP_PKGS_TO_CLONE: NautyTracesInterface digraphs/graphviz + GAP_PKGS_TO_BUILD: io orb datastructures grape NautyTracesInterface GAPBRANCH: stable-4.13 - - name: "Build Digraphs" + - 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" + - name: Run Digraphs package's tst/teststandard.g . . . uses: gap-actions/run-pkg-tests@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bc660dc44..4c3121a91 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: "Lint" +name: Lint on: workflow_dispatch: pull_request: @@ -8,11 +8,11 @@ on: - stable-*.* schedule: # Every day at 3:30 AM UTC - - cron: '30 3 * * *' + - cron: 30 3 * * * jobs: lint: - name: "${{ matrix.linter }}" + name: ${{ matrix.linter }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -21,12 +21,11 @@ jobs: - gaplint - cpplint steps: - - name: "Check out the repository" - uses: actions/checkout@v4 - - name: "Set up Python" - uses: actions/setup-python@v5 - - name: "Install ${{ matrix.linter }} with pip" - run: pip install ${{ matrix.linter }} - - name: "Run ${{ matrix.linter }} on the Digraphs package" - run: bash etc/${{ matrix.linter }}.sh - + - name: Check out the repository . . . + uses: actions/checkout@v4 + - name: Set up Python . . . + uses: actions/setup-python@v5 + - name: Install ${{ matrix.linter }} with pip . . . + run: pip install ${{ matrix.linter }} + - name: Run ${{ matrix.linter }} on the Digraphs package . . . + run: bash etc/${{ matrix.linter }}.sh diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 4f4b44917..19690801a 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -1,4 +1,4 @@ -name: "Manual" +name: Manual on: workflow_dispatch: pull_request: @@ -8,15 +8,15 @@ on: - stable-*.* schedule: # Every day at 3:20 AM UTC - - cron: '20 3 * * *' + - cron: "20 3 * * *" jobs: manual: - name: "compile and upload manual" + name: compile and upload manual runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: "Install TeX Live" + - name: Install TeX Live . . . run: | packages=( texlive-latex-base @@ -30,14 +30,14 @@ jobs: sudo apt-get install "${packages[@]}" - uses: gap-actions/setup-gap@v2 env: - GAP_BOOTSTRAP: "minimal" + GAP_BOOTSTRAP: minimal with: - GAP_PKGS_TO_BUILD: '' + GAP_PKGS_TO_BUILD: "" - uses: gap-actions/build-pkg-docs@v1 - - name: "Upload compiled manuals" + - name: Upload compiled manuals . . . uses: actions/upload-artifact@v4 with: - name: "Digraphs manual" + name: Digraphs manual retention-days: 7 path: | doc/manual.pdf diff --git a/.github/workflows/os.yml b/.github/workflows/os.yml index 73f83a369..7a19903e8 100644 --- a/.github/workflows/os.yml +++ b/.github/workflows/os.yml @@ -1,4 +1,4 @@ -name: "OS" +name: OS on: workflow_dispatch: pull_request: @@ -8,7 +8,7 @@ on: - stable-*.* schedule: # Every day at 3:30 AM UTC - - cron: "30 3 * * *" + - cron: 30 3 * * * env: DIGRAPHS_LIB: digraphs-lib-0.6 @@ -16,66 +16,66 @@ env: jobs: test-unix: - name: "${{ matrix.os }}${{ matrix.ABI }} / GAP stable-4.13" - runs-on: "${{ matrix.os }}-latest" + name: ${{ matrix.os }}${{ matrix.ABI }} / GAP stable-4.13 + runs-on: ${{ matrix.os }}-latest strategy: fail-fast: false matrix: include: - os: ubuntu ABI: 32 - pkgs-to-clone: "digraphs/graphviz" - pkgs-to-build: "io orb datastructures grape" + pkgs-to-clone: digraphs/graphviz + pkgs-to-build: io orb datastructures grape - os: macos ABI: "" - pkgs-to-clone: "NautyTracesInterface digraphs/graphviz" - pkgs-to-build: "io orb datastructures grape NautyTracesInterface" + pkgs-to-clone: NautyTracesInterface digraphs/graphviz + pkgs-to-build: io orb datastructures grape NautyTracesInterface steps: - uses: actions/checkout@v4 - - name: Output g++ version + - name: Output g++ version . . . run: g++ --version - - name: "Install macOS dependencies" + - name: Install macOS dependencies . . . if: ${{ runner.os == 'macOS' }} run: brew install automake - - name: "Install GAP and clone/compile necessary packages" + - name: Install GAP and clone/compile necessary packages . . . uses: gap-actions/setup-gap@v2 with: - GAP_PKGS_TO_CLONE: "${{ matrix.pkgs-to-clone }}" + GAP_PKGS_TO_CLONE: ${{ matrix.pkgs-to-clone }} GAP_PKGS_TO_BUILD: ${{ matrix.pkgs-to-build }} GAPBRANCH: stable-4.13 ABI: ${{ matrix.ABI }} - - name: "Build Digraphs" + - name: Build Digraphs . . . uses: gap-actions/build-pkg@v1 with: ABI: ${{ matrix.ABI }} - - name: "Install digraphs-lib" + - name: Install digraphs-lib . . . run: | curl --retry 5 -L -O "https://digraphs.github.io/Digraphs/${{ env.DIGRAPHS_LIB }}.tar.gz" tar xf "${{ env.DIGRAPHS_LIB }}.tar.gz" - - name: "Run DigraphsTestInstall" + - name: Run DigraphsTestInstall . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/install.g" - - name: "Run DigraphsTestStandard" + GAP_TESTFILE: tst/github_actions/install.g + - name: Run DigraphsTestStandard . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/standard.g" - - name: "Run DigraphsTestManualExamples" + GAP_TESTFILE: tst/github_actions/standard.g + - name: Run DigraphsTestManualExamples . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/examples.g" - - name: "Run DigraphsTestExtreme" + GAP_TESTFILE: tst/github_actions/examples.g + - name: Run DigraphsTestExtreme . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/extreme.g" + GAP_TESTFILE: tst/github_actions/extreme.g test-cygwin: - name: "cygwin / GAP stable-4.13" + name: cygwin / GAP stable-4.13 runs-on: windows-latest env: CHERE_INVOKING: 1 @@ -84,11 +84,11 @@ jobs: - uses: gap-actions/setup-cygwin@v1 - uses: gap-actions/setup-gap@cygwin-v2 with: - GAP_PKGS_TO_CLONE: "NautyTracesInterface digraphs/graphviz" - GAP_PKGS_TO_BUILD: "io orb datastructures grape NautyTracesInterface" + GAP_PKGS_TO_CLONE: NautyTracesInterface digraphs/graphviz + GAP_PKGS_TO_BUILD: io orb datastructures grape NautyTracesInterface GAPBRANCH: stable-4.13 - uses: gap-actions/build-pkg@cygwin-v1 - - name: "Install digraphs-lib" + - name: Install digraphs-lib . . . run: | curl --retry 5 -L -O "https://digraphs.github.io/Digraphs/${{ env.DIGRAPHS_LIB }}.tar.gz" tar xf "${{ env.DIGRAPHS_LIB }}.tar.gz" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 635d30655..7083cb5dc 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,4 +1,4 @@ -name: "Ubuntu" +name: Ubuntu on: workflow_dispatch: pull_request: @@ -8,7 +8,7 @@ on: - stable-*.* schedule: # Every day at 3:30 AM UTC - - cron: "30 3 * * *" + - cron: 30 3 * * * env: DIGRAPHS_LIB: digraphs-lib-0.6 @@ -16,7 +16,7 @@ env: jobs: test-unix: - name: "Ubuntu / GAP ${{ matrix.gap-branch }} / ${{ matrix.only-needed && 'only-needed' || 'needed+suggested' }}" + name: Ubuntu / GAP ${{ matrix.gap-branch }} / ${{ matrix.only-needed && 'only-needed' || 'needed+suggested' }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -31,7 +31,7 @@ jobs: - false include: - only-needed: true - pkgs-to-clone: "digraphs/graphviz" + pkgs-to-clone: digraphs/graphviz pkgs-to-build: io orb datastructures - only-needed: false pkgs-to-clone: NautyTracesInterface digraphs/graphviz @@ -39,41 +39,41 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Output g++ version + - name: Output g++ version . . . run: g++ --version - - name: "Install GAP and clone/compile necessary packages" + - name: Install GAP and clone/compile necessary packages . . . uses: gap-actions/setup-gap@v2 with: - GAP_PKGS_TO_CLONE: "${{ matrix.pkgs-to-clone }}" - GAP_PKGS_TO_BUILD: "${{ matrix.pkgs-to-build }}" + GAP_PKGS_TO_CLONE: ${{ matrix.pkgs-to-clone }} + GAP_PKGS_TO_BUILD: ${{ matrix.pkgs-to-build }} GAPBRANCH: ${{ matrix.gap-branch }} - - name: "Build Digraphs" + - name: Build Digraphs . . . uses: gap-actions/build-pkg@v1 - - name: "Install digraphs-lib" + - name: Install digraphs-lib . . . run: | curl --retry 5 -L -O "https://digraphs.github.io/Digraphs/${{ env.DIGRAPHS_LIB }}.tar.gz" tar xf "${{ env.DIGRAPHS_LIB }}.tar.gz" - - name: "Run DigraphsTestInstall" + - name: Run DigraphsTestInstall . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/install.g" + GAP_TESTFILE: tst/github_actions/install.g only-needed: ${{ matrix.only-needed }} - - name: "Run DigraphsTestStandard" + - name: Run DigraphsTestStandard . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/standard.g" + GAP_TESTFILE: tst/github_actions/standard.g only-needed: ${{ matrix.only-needed }} - - name: "Run DigraphsTestManualExamples" + - name: Run DigraphsTestManualExamples . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/examples.g" + GAP_TESTFILE: tst/github_actions/examples.g only-needed: ${{ matrix.only-needed }} - - name: "Run DigraphsTestExtreme" + - name: Run DigraphsTestExtreme . . . uses: gap-actions/run-pkg-tests@v2 with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/extreme.g" + GAP_TESTFILE: tst/github_actions/extreme.g only-needed: ${{ matrix.only-needed }} diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index 93f53884e..0fa0315e3 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -1,4 +1,4 @@ -name: "Valgrind" +name: Valgrind on: workflow_dispatch: release: @@ -10,34 +10,34 @@ env: jobs: test-valgrind: - name: "Ubuntu / GAP stable-4.13 / valgrind" - runs-on: "ubuntu-latest" + name: Ubuntu / GAP stable-4.13 / valgrind + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Output g++ version + - name: Output g++ version . . . run: g++ --version - - name: "Install Valgrind" + - name: Install Valgrind . . . run: sudo apt-get install valgrind - - name: "Install GAP and clone/compile necessary packages" + - 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" - CONFIGFLAGS: "--enable-valgrind" - - name: "Build Digraphs" + GAP_PKGS_TO_CLONE: NautyTracesInterface digraphs/graphviz + GAP_PKGS_TO_BUILD: io orb datastructures grape NautyTracesInterface + GAPBRANCH: stable-4.13 + CONFIGFLAGS: --enable-valgrind + - name: Build Digraphs . . . uses: gap-actions/build-pkg@v1 - - name: "Run DigraphsTestInstall" + - name: Run DigraphsTestInstall . . . # TODO: Replace below with gap-actions/run-pkg-tests@v2 if the functionality gets added uses: ./.github/actions/test_with_valgrind with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/install.g" + GAP_TESTFILE: tst/github_actions/install.g pre-gap: ${{ env.VALGRIND }} - - name: "Run DigraphsTestStandard" + - name: Run DigraphsTestStandard . . . # TODO: Replace below with gap-actions/run-pkg-tests@v2 if the functionality gets added uses: ./.github/actions/test_with_valgrind with: NO_COVERAGE: true - GAP_TESTFILE: "tst/github_actions/standard.g" + GAP_TESTFILE: tst/github_actions/standard.g pre-gap: ${{ env.VALGRIND }}