Skip to content

Commit bad8e50

Browse files
committed
Add self-hosted Actions.
1 parent a367a83 commit bad8e50

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
ci:
8+
if: github.repository == 'haskell/docker-haskell'
89
timeout-minutes: 30
910
runs-on: ubuntu-18.04
1011
strategy:
@@ -30,3 +31,36 @@ jobs:
3031
path: official-images
3132
- name: run official-images tests
3233
run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}
34+
35+
ci-self-hosted:
36+
if: github.repository == 'psftw/docker-haskell-private'
37+
timeout-minutes: 20
38+
runs-on: self-hosted
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
ghc: [8.6.5, 8.8.1, 8.8.2]
43+
include:
44+
- ghc: 8.6.5
45+
ghc_minor: 8.6
46+
- ghc: 8.8.1
47+
ghc_minor: 8.8
48+
- ghc: 8.8.2
49+
ghc_minor: 8.8
50+
steps:
51+
- uses: actions/checkout@v2
52+
- name: docker build [${{ matrix.ghc }}]
53+
run: docker build --pull --build-arg GHC=${{ matrix.ghc }} -t haskell:${{ matrix.ghc }} ${{ matrix.ghc_minor }}
54+
- name: check for cabal-cache
55+
run: |
56+
docker volume inspect cabal-cache-${{ matrix.ghc }} &> /dev/null || \
57+
docker run -t --rm -v cabal-cache-${{ matrix.ghc }}:/root/.cabal haskell:${{ matrix.ghc }} cabal new-update
58+
- name: cabal new-install
59+
run: docker run -t --rm -v cabal-cache-${{ matrix.ghc }}:/root/.cabal haskell:${{ matrix.ghc }} cabal new-install --lib primitive
60+
- name: wipe stack cache
61+
run: docker volume rm stack-test-${{ matrix.ghc }}
62+
continue-on-error: true
63+
- name: stack new
64+
run: docker run -t --rm -v stack-test-${{ matrix.ghc }}:/stack -w /stack haskell:${{ matrix.ghc }} stack --resolver ghc-${{ matrix.ghc }} new testproject --bare
65+
- name: stack run
66+
run: docker run -t --rm -v stack-test-${{ matrix.ghc }}:/stack -w /stack haskell:${{ matrix.ghc }} stack run

0 commit comments

Comments
 (0)