Skip to content

Commit

Permalink
Improve Github CI config file
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Jul 20, 2021
1 parent fa3c0b0 commit 43892d6
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/packcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
${{ matrix.command }}
${{ matrix.runner }}
${{ matrix.ghc_version }}
${{ matrix.stack_resolver }}
env:
# ------------------------------------------------------------------------
# Common options
Expand All @@ -45,6 +46,12 @@ jobs:
# DISABLE_SDIST_GIT_CHECK: "y"
# DISABLE_DIST_CHECKS: "y"

# ------------------------------------------------------------------------
# Selecting tool versions
# ------------------------------------------------------------------------
GHCVER: ${{ matrix.ghc_version }}
RESOLVER: ${{ matrix.stack_resolver }}

# ------------------------------------------------------------------------
# stack options
# ------------------------------------------------------------------------
Expand All @@ -53,7 +60,6 @@ jobs:
# version.
#STACKVER: "1.6.5"
#STACK_UPGRADE: "y"
#RESOLVER: "lts-12"

# ------------------------------------------------------------------------
# cabal options
Expand Down Expand Up @@ -114,12 +120,7 @@ jobs:
include:
# Additional ci matrix elements
# - name: ci
# ghc_version: 8.8.3
# command: stack
# runner: ubuntu-latest

# - name: ci
# ghc_version: 8.4.4
# stack_resolver: lts-18.2
# command: stack
# runner: ubuntu-latest

Expand All @@ -128,7 +129,7 @@ jobs:
# command: cabal-v2
# runner: macos-latest

- name: hlint
- name: ci
command: hlint
runner: ubuntu-latest
pack_options: >-
Expand All @@ -142,8 +143,9 @@ jobs:
if: ${{ matrix.name != 'hlint' }}
with:
ghc-version: ${{ matrix.ghc_version }}
# We need not put this in the matrix. This will be fixed in most cases.
cabal-version: 3.2
enable-stack: true
stack-version: 'latest'
cabal-version: 'latest'

- uses: actions/cache@v2
name: Cache common directories
Expand All @@ -153,19 +155,7 @@ jobs:
~/.ghc
~/.local
~/.stack
key: ${{ matrix.ghc_version }}-${{ matrix.runner }}

- name: Run installer
if: ${{ matrix.installer != '' }}
run: ${{ matrix.installer }}

- name: Setup stack
if: ${{ matrix.command == 'stack' }}
run: |
# required for packcheck
sudo apt-get install -y curl
# required for outbound https for stack and for stack setup
sudo apt-get install -y netbase xz-utils make
key: ${{ matrix.ghc_version }}-${{ matrix.stack_resolver }}-${{ matrix.runner }}

- name: Download packcheck
run: |
Expand Down

0 comments on commit 43892d6

Please sign in to comment.