MyNixOS website logo
Description

Automated Local Cabal Package Testing and Uploading.

This executable aims to automate several typical steps when uploading a new package version to hackage.

Steps currently include:

  • Compilation and running tests using multiple compiler versions.

  • Checking that the changelog mentions the latest version.

  • Checking that the upper bounds of dependencies are up-to-date by making use of stackage snapshots.

  • [git] Pushing and tagging the version to the commit.

  • Uploading of both the package itself and the documentation.

The program is configurable using a per-project .yaml file.

See the README.

iridium

Build Status Hackage

Introduction

iridium is a fancy wrapper around cabal upload. It aims to automate several typical steps when releasing a new package version to hackage.

Iridium does all testing locally, in contrast to e.g. github's travis. This makes it easier to keep your published history free of commits that fail any tests (without squashing or separate branches).

Steps currently include:

  • Compilation and running tests using multiple compiler versions. (the different compilers must already be installed.)

  • Checking that the changelog mentions the latest version.

  • Checking that the upper bounds of dependencies are up-to-date by making use of stackage snapshots.

  • Uploading of both the package itself and the documentation.

The output on errors is certainly not optimal; for example the stackage upper bound checking will print a typical, hard-to-consume cabal error message. iridium's focus is on notifying if something is wrong.

Usage

Install iridium, run iridium in the directory containing the cabal package. It won't do anything without confirmation.

$ iridium
Checking compilation with different compiler versions
  Checking with compiler ghc-7.8.4:                                   clear.
Checking upper bounds using stackage:                                 clear.
Checking documentation:                                               clear.
Checking basic compilation:                                           clear.
Checking that all dependencies have a lower bound:                    clear.
Checking that all dependencies have an upper bound:                   clear.
Checking package validity:                                            clear.
Testing the source distribution package:                              clear.
Testing if the changelog mentions the latest version:                 clear.
Comparing local version to hackage version:                           clear.
[git]
  Testing for uncommitted changes:                                    clear.
Summary:
  Package:                iridium
  Version:                0.1.5.1
  Warning count:          0
  Error   count:          0
  Not -Wall clean:        []
  [git]
    Branch:               master
  Actions:                Tag the current commit with "0.1.5.1"
                          Push current branch and tag to upstream repo
                          Upload package
                          Upload documentation
> Continue [y]es [n]o? > y
Performing upload..
Building source dist for iridium-0.1.2.0...
Preprocessing library iridium-0.1.2.0...
Preprocessing executable 'iridium' for iridium-0.1.2.0...
Source tarball created: dist/iridium-0.1.2.0.tar.gz
Hackage password:
Uploading dist/iridium-0.1.2.0.tar.gz...
Ok
Upload successful.
Performing doc upload..
[.. some haddock spam ..]
Documentation tarball created: dist/iridium-0.1.2.0-docs.tar.gz
Hackage password:
Uploading documentation dist/iridium-0.1.2.0-docs.tar.gz...
Ok
Documentation upload successful.
$

Configuration

An iridium.yaml file will be created on first invocation.

Tests

TestDescription
hlintforM_ hs-source-dirs $ \dir -> (\dir -> call "hlint " ++ dir)
testsuitesrun cabal test when compiling.
upper-bounds-stackageCheck that upper bounds are up-to-date by using a stackage cabal.config. This is not the best way, because not all packages are on stackage, but it is better than nothing.
lower-bounds-existCheck that all dependencies have a lower bound.
upper-bounds-existCheck that all dependencies have an upper bound. (You do want to conform with the PVP, right?)
documentationCheck that haddocks can be created without problems (calling cabal haddock).
changelogCheck if the changelog mentions (contains) the latest version.
package-sdistCheck that all necessary stuff is contained in the source distribution by installing the packaged package.
compiler-versionsCompile and run tests for several compiler versions (other than the default compiler on $PATH).
Metadata

Version

0.1.5.8

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows