From 19fe1561b21628db873b88f78ade9750480089eb Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Thu, 9 May 2024 12:15:39 +0100 Subject: [PATCH] ci: checkout from main branch --- .github/workflows/gap.yml | 133 ++++++++++++++++++++++++++++++++++++++ PackageInfo.g | 4 +- gap/display.gi | 10 +-- 3 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/gap.yml diff --git a/.github/workflows/gap.yml b/.github/workflows/gap.yml new file mode 100644 index 000000000..9ec6f1a19 --- /dev/null +++ b/.github/workflows/gap.yml @@ -0,0 +1,133 @@ +name: "GAP" +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + - stable-*.* + schedule: + # Every day at 3:30 AM UTC + - cron: '30 3 * * *' + +env: + DIGRAPHS_LIB: digraphs-lib-0.6 + +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 + ABI: [''] + pkgs-to-clone: + - NautyTracesInterface + + include: + - gap-branch: master + os: macos + pkgs-to-clone: "NautyTracesInterface" + - gap-branch: master + os: ubuntu + ABI: 32 + + steps: + - uses: actions/checkout@v4 + - name: "Install dependencies" + if: ${{ runner.os == 'macOS' }} + run: brew install automake + - name: "Install GAP and clone/compile necessary packages" + uses: gap-actions/setup-gap@v2 + with: + GAP_PKGS_TO_CLONE: "${{ matrix.pkgs-to-clone }} digraphs/graphviz" + GAP_PKGS_TO_BUILD: "io orb profiling grape NautyTracesInterface datastructures" + GAPBRANCH: ${{ matrix.gap-branch }} + ABI: ${{ matrix.ABI }} + - name: "Build Digraphs" + uses: gap-actions/build-pkg@v1 + with: + ABI: ${{ matrix.ABI }} + - 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" + uses: gap-actions/run-pkg-tests@v2 + with: + GAP_TESTFILE: "tst/github_actions/install.g" + - name: "Run DigraphsTestStandard" + uses: gap-actions/run-pkg-tests@v2 + with: + GAP_TESTFILE: "tst/github_actions/standard.g" + - name: "Run DigraphsTestManualExamples" + uses: gap-actions/run-pkg-tests@v2 + with: + GAP_TESTFILE: "tst/github_actions/examples.g" + - name: "Run DigraphsTestExtreme" + uses: gap-actions/run-pkg-tests@v2 + with: + GAP_TESTFILE: "tst/github_actions/extreme.g" + - uses: gap-actions/process-coverage@v2 + - uses: codecov/codecov-action@v3 + + test-cygwin: + name: "cygwin / GAP master" + runs-on: windows-2019 + env: + CHERE_INVOKING: 1 + steps: + - uses: actions/checkout@v4 + - uses: gap-actions/setup-cygwin@v1 + - uses: gap-actions/setup-gap@cygwin-v2 + with: + GAP_PKGS_TO_BUILD: "io orb profiling grape datastructures" + GAP_PKGS_TO_CLONE: "digraphs/graphviz" + - uses: gap-actions/build-pkg@cygwin-v1 + - 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" + - uses: gap-actions/run-pkg-tests@cygwin-v2 + - uses: gap-actions/process-coverage@cygwin-v2 + - uses: codecov/codecov-action@v3 + + with-external-planarity-bliss: + runs-on: "ubuntu-latest" + env: + GAPBRANCH: "stable-4.12" + ABI: 64 + PKG_CONFIG_PATH: "/home/runner/micromamba/envs/digraphs/lib/pkgconfig:/home/runner/micromamba/envs/digraphs/share/pkgconfig/" + LD_LIBRARY_PATH: "/home/runner/micromamba/envs/digraphs/lib" + CFLAGS: "-I/home/runner/micromamba/envs/digraphs/include" + LDFLAGS: "-L/home/runner/micromamba/envs/digraphs/lib" + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v4 + - name: "Install micromamba environment from environment.yml . . ." + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment.yml + cache-environment: true + - name: "Activate \"digraphs\" environment . . ." + run: micromamba activate digraphs + - name: "Install GAP and clone/compile necessary packages" + uses: gap-actions/setup-gap@v2 + with: + GAP_PKGS_TO_BUILD: "io orb profiling grape datastructures" + GAP_PKGS_TO_CLONE: "digraphs/graphviz" + - name: "Build Digraphs" + uses: gap-actions/build-pkg@v1 + with: + CONFIGFLAGS: --with-external-planarity --with-external-bliss + - name: "Run Digraphs package's tst/teststandard.g" + uses: gap-actions/run-pkg-tests@v2 diff --git a/PackageInfo.g b/PackageInfo.g index dbbf820ec..cb4de63c8 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -10,7 +10,7 @@ ## <#GAPDoc Label="PKGVERSIONDATA"> ## -## +## ## ## ## @@ -388,7 +388,7 @@ PackageDoc := rec( ), Dependencies := rec( - GAP := ">=4.10.0", + GAP := ">=4.11.0", NeededOtherPackages := [["io", ">=4.5.1"], ["orb", ">=4.8.2"], ["graphviz", ">=0.0.0"], diff --git a/gap/display.gi b/gap/display.gi index 890d29ab5..fe7acd3eb 100644 --- a/gap/display.gi +++ b/gap/display.gi @@ -104,7 +104,7 @@ function(D, colors) Length(out[i]), Length(colors[i])); fi; - Perform(colors[i], GV_ErrorIfNotValidColor); + Perform(colors[i], ErrorIfNotValidColor); od; end); @@ -118,7 +118,7 @@ function(D, gv, colors) out := OutNeighbours(D); for n in DigraphVertices(D) do for i in [1 .. Length(out[n])] do - if IsGVDigraph(gv) or n > out[n][i] then + if IsGraphvizDigraph(gv) or n > out[n][i] then e := GraphvizAddEdge(gv, n, out[n][i]); GraphvizSetAttr(e, "color", colors[n][i]); fi; @@ -255,8 +255,8 @@ function(D, gv, hi_verts, hi, lo) ErrorNoReturn("the 2nd argument (list) must consist of vertices ", "of the 1st argument (a digraph)"); fi; - GV_ErrorIfNotValidColor(hi); - GV_ErrorIfNotValidColor(lo); + ErrorIfNotValidColor(hi); + ErrorIfNotValidColor(lo); GraphvizSetAttr(gv, "shape", "circle"); @@ -275,7 +275,7 @@ function(D, gv, hi_verts, hi, lo) for i in DigraphVertices(D) do for j in out[i] do - if IsGVDigraph(gv) or i > j then + if IsGraphvizDigraph(gv) or i > j then edge := GraphvizAddEdge(gv, nodes[i], nodes[j]); if i in hi_verts and j in hi_verts then color := hi;