zuul-jobs/roles/ensure-cabal/tasks/main.yaml
Tristan Cacqueray d92b39cae2 cabal-test: add initial haskell job
This change adds a new job to test cabal based haskell project.

Change-Id: Idb24eb5f8f9bd1409bae07bf4da415f1d05568e4
2020-04-24 13:12:13 +00:00

21 lines
409 B
YAML

- name: Check cabal version
command: cabal --version
failed_when: false
register: _cabal_version
- name: Install cabal
package:
name: cabal-install
state: present
become: yes
when: "_cabal_version.rc != 0"
- name: Check package
stat:
path: "~/.cabal/packages"
register: _cabal_packages
- name: Update package list
command: cabal update
when: not _cabal_packages.stat.exists