Skip to content

Commit

Permalink
ci: move checking of external planarity to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Sep 12, 2023
1 parent c96540a commit 8263c60
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 37 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/gap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,35 @@ jobs:
- 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@v3
- 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"
- 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
9 changes: 0 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,3 @@ jobs:
steps:
- script: ci/azure-gap.sh
displayName: 'Running the Digraphs package for GAP tests in docker container. . .'
- job: external_planarity_bliss
variables:
SUITE: conda
ABI: 64
GAP_VERSION: 4.11.0
PACKAGES: required
steps:
- script: ci/azure-gap.sh
displayName: 'Running the Digraphs package for GAP tests in docker container. . .'
37 changes: 9 additions & 28 deletions ci/docker-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ bold() {
# Check required environment variables are set
################################################################################

if [[ -z "${SUITE}" ]] ; then
if [[ -z "${SUITE}" ]] ; then
bold "Error, environment variable SUITE is undefined"
exit 1
fi

if [[ -z "${GAP_HOME}" ]] ; then
if [[ -z "${GAP_HOME}" ]] ; then
bold "Error, environment variable GAP_HOME is undefined"
exit 1
fi

if [[ -z "${GAP_VERSION}" ]] ; then
if [[ -z "${GAP_VERSION}" ]] ; then
bold "Error, environment variable GAP_VERSION is undefined"
exit 1
fi

if [[ -z "${DIGRAPHS_LIB}" ]] ; then
if [[ -z "${DIGRAPHS_LIB}" ]] ; then
bold "Error, environment variable GAP_VERSION is undefined"
exit 1
fi

if [[ -z "${PACKAGES}" ]] ; then
if [[ -z "${PACKAGES}" ]] ; then
bold "Error, environment variable GAP_VERSION is undefined"
exit 1
fi
Expand All @@ -44,7 +44,7 @@ if [ "$SUITE" == "coverage" ] && [ -z "${THRESHOLD}" ] ; then
exit 1
fi

if [ "$SUITE" != "test" ] && [ "$SUITE" != "coverage" ] && [ "$SUITE" != "conda" ] ; then
if [ "$SUITE" != "test" ] && [ "$SUITE" != "coverage" ] ; then
bold "Error, unrecognised suite: $SUITE"
exit 1
fi
Expand All @@ -62,14 +62,14 @@ GAPSH="$GAP_HOME/bin/gap.sh"
DIG_DIR="$GAP_HOME/pkg/digraphs"

################################################################################
# Install system dependencies
# Install system dependencies
################################################################################

bold "Installing dependencies (apt-get). . ."
sudo apt-get --yes update
sudo apt-get install libtool curl git xdg-utils --yes

if [ "$GAP_VERSION" == "master" ]; then
if [ "$GAP_VERSION" == "master" ]; then
# Stops the documentation from failing to compile because enumitem.sty isn't
# available
sudo apt-get remove texlive-latex-base --yes
Expand All @@ -79,25 +79,6 @@ if [ "$SUITE" == "coverage" ]; then
sudo apt-get install python3 --yes
fi

if [ "$SUITE" == "conda" ]; then
bold "Installing dependencies (conda). . ."
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
chmod +x miniconda.sh;
./miniconda.sh -b;
export PATH=/home/gap/miniconda3/bin:$PATH;
conda update --yes conda;
conda install -c conda-forge --yes mamba;
mamba install -c conda-forge --yes bliss;
mamba install -c conda-forge --yes planarity;
export PKG_CONFIG_PATH="/home/gap/miniconda3/lib/pkgconfig:/home/gap/miniconda3/share/pkgconfig"
export LD_LIBRARY_PATH="/home/gap/miniconda3/lib"
export CFLAGS="-I/home/gap/miniconda3/include"
export LDFLAGS="-L/home/gap/miniconda3/lib"
EXTREME=no
EXTRA_PKG_FLAGS="--with-external-planarity --with-external-bliss --without-intrinsics"
SUITE="test"
fi

bold "Fixing permissions . . . "
sudo chown -R gap: $GAP_HOME/pkg/digraphs

Expand Down Expand Up @@ -147,7 +128,7 @@ for PKG in "${PKGS[@]}"; do
else
VERSION=`grep "\"$PKG\"" $GAP_HOME/pkg/digraphs/PackageInfo.g | awk -F'"' '{print $4}' | cut -c3-`
fi

if [ -z $VERSION ]; then
bold "Could not determine the version number of the package $PKG!! Aborting..."
exit 1
Expand Down
8 changes: 8 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: digraphs

channels:
- conda-forge

dependencies:
- bliss
- planarity

0 comments on commit 8263c60

Please sign in to comment.