Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 39 additions & 34 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,56 @@
name: CI

# Trigger the workflow on push or pull request
on:
workflow_dispatch:
pull_request:
push:
branches: [master, main]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
# The CI test job
test:
name: GAP ${{ matrix.gap-branch }}
runs-on: ubuntu-latest
# Don't run this twice on PRs for branches pushed to the same repository
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
name: GAP ${{ matrix.gap-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
gap-branch:
- master
- stable-4.14
- stable-4.13
os: [ubuntu]
gap-version: [devel, latest, minimal]
include:
- os: windows
gap-version: devel

steps:
- uses: actions/checkout@v4
- uses: gap-actions/setup-gap@v2
- uses: actions/checkout@v6
- uses: gap-actions/setup-cygwin@v2
if: ${{ runner.os == 'Windows' }}
- uses: gap-actions/setup-gap@v3
with:
GAPBRANCH: ${{ matrix.gap-branch }}
GAP_PKGS_TO_CLONE: "datastructures ChrisJefferson/QuickCheck peal/BacktrackKit"
GAP_PKGS_TO_BUILD: "io profiling datastructures json digraphs orb grape"
- uses: gap-actions/run-pkg-tests@v2
- uses: gap-actions/process-coverage@v2
- uses: codecov/codecov-action@v5
gap-version: ${{ matrix.gap-version }}
- uses: gap-actions/install-pkg@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

# The documentation job
manual:
name: Build manuals
runs-on: ubuntu-latest
# Don't run this twice on PRs for branches pushed to the same repository
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

steps:
- uses: actions/checkout@v4
- uses: gap-actions/setup-gap@v2
packages: |
ChrisJefferson/QuickCheck@devel
peal/BacktrackKit@devel
- uses: gap-actions/build-pkg@v3
with:
extra-pkgs: quickcheck
- uses: gap-actions/run-pkg-tests@v4
with:
GAP_PKGS_TO_BUILD: ''
- uses: gap-actions/build-pkg-docs@v1
coverage: ${{ runner.os != 'Windows' }}
- uses: gap-actions/run-pkg-tests@v4
with:
use-latex: 'true'
mode: onlyneeded
coverage: false
- uses: gap-actions/process-coverage@v3
if: ${{ runner.os != 'Windows' }}
- uses: codecov/codecov-action@v6
if: ${{ runner.os != 'Windows' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: gap-coverage.json
44 changes: 44 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docs

on:
workflow_dispatch:
push:
branches: [master, main]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
manual:
name: Build manuals
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: gap-actions/setup-gap@v3
with:
gap-version: devel
- uses: gap-actions/install-pkg@v1
with:
packages: peal/BacktrackKit@devel
- uses: gap-actions/build-pkg@v3
with:
coverage: false
- name: Build BacktrackKit manual for cross-references
env:
NOPDF: '1'
run: |
cd "$GAPROOT/pkg/backtrackkit"
gap --quitonbreak makedoc.g
- uses: gap-actions/build-pkg-docs@v2
with:
use-latex: true
- uses: actions/upload-artifact@v7
with:
archive: false
path: doc/manual.pdf
if-no-files-found: error
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
workflow_dispatch:
inputs:
dry-run:
description: Create release artifacts without publishing
type: boolean
default: false
force:
description: Allow replacing a release or using a different release date
type: boolean
default: false

permissions:
contents: write

concurrency:
group: release
cancel-in-progress: false

jobs:
release:
name: Release the GAP package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: gap-actions/setup-gap@v3
with:
gap-version: devel
- uses: gap-actions/install-pkg@v1
with:
packages: peal/BacktrackKit@devel
- uses: gap-actions/build-pkg@v3
with:
coverage: false
- name: Build BacktrackKit manual for cross-references
env:
NOPDF: '1'
run: |
cd "$GAPROOT/pkg/backtrackkit"
gap --quitonbreak makedoc.g
- uses: gap-actions/build-pkg-docs@v2
with:
use-latex: true
- name: Fix documentation links for distribution
run: bash .release
- uses: gap-actions/release-pkg@v1
with:
dry-run: ${{ inputs.dry-run }}
force: ${{ inputs.force }}
- uses: gap-actions/update-gh-pages@v1
if: ${{ !inputs.dry-run }}
with:
version: ${{ env.TAG }}
clean: false
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,16 @@ This package is intended for learning and exploring the graph backtracking algor
This package is a work in progress, both in terms of code and documentation.

If you have any issues or questions about this package, please post an issue at https://github.com/peal/GraphBacktracking/issues

## CI and releases

CI tests the development, latest, and oldest supported GAP versions on Linux,
plus development GAP on Windows, with both normal and `OnlyNeeded` loading.
The Docs workflow builds the manual and uploads its PDF.

To release, update the version and date in `PackageInfo.g`, push to `master`,
then run **Actions → Release** on `master` with **dry-run** selected first.
Inspect the generated archives and manuals, then rerun without dry-run to
publish the GitHub release and update the package website. Existing website
customisations are preserved. Use **force** only when intentionally replacing
an existing release or bypassing the release-date check.
Loading