saurabhnanda/odd-jobs

Setup CI using Github Actions for odd-job (job-queue)

Closed this issue · 4 comments

Setup CI using Github Actions for odd-job (job-queue)

Hi, I'm giving it an initial try (not promising that it'll work as I'm still learning Haskell and I've just dabbled with GitHub Actions). I'm having issues building the project after pulling it but I can't find any build-specific instructions in the repo. Could you point me towards the solution? I believe we need a build for both stack and cabal, right? Any specific versions required?

When I just run stack build I get the following error:

--  While building package postgresql-libpq-0.9.4.2 using:
      /tmp/stack-a4eef2818c051a25/postgresql-libpq-0.9.4.2/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/pkgdb --libdir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/lib --bindir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/bin --datadir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/share --libexecdir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/libexec --sysconfdir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/etc --docdir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/doc/postgresql-libpq-0.9.4.2 --htmldir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/doc/postgresql-libpq-0.9.4.2 --haddockdir=/home/mjarosie/.stack/snapshots/x86_64-linux-tinfo6/38300df40c895b0b4e92f190d7a1a2d656581001220f26660b8b81df2b6e39c0/8.8.3/doc/postgresql-libpq-0.9.4.2 --dependency=Cabal=Cabal-3.0.1.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.0 --dependency=unix=unix-2.7.2.2 -f-use-pkg-config --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1
Progress 53/130
$ stack --version
Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0

I think you need to install the libpq-dev native C libraries for the Haskell package to compile.

I'm giving it an initial try (not promising that it'll work as I'm still learning Haskell and I've just dabbled with GitHub Actions)

That's the spirit of Hacktoberfest 👍

I'm having issues building the project after pulling it but I can't find any build-specific instructions in the repo.

Yes - they are missing. I just presumed that people would add this as a dependency to their cabal files and be done with it. You may add build instructions to the README if you wish (as part of your PR).

I believe we need a build for both stack and cabal, right? Any specific versions required?

I'm not sure if from a CI perspective, stack or cabal would be any different. The easiest would be to ensure that stack build works (it using cabal, as a library, internally). Once we have a test suite again, the Github Actions config can be evolved to also run the test suite.

Once we have a test suite again, the Github Actions config can be evolved to also run the test suite.

Ah alright that explains why I couldn't run stack build --test. Thanks I'll be taking a look now!