-
Notifications
You must be signed in to change notification settings - Fork 37
139 lines (133 loc) · 4.42 KB
/
debian.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Validate Debian
on:
pull_request:
branches:
- master
paths:
- '**/bullseye/Dockerfile'
- '**/buster/Dockerfile'
- '**/slim-bullseye/Dockerfile'
- '**/slim-buster/Dockerfile'
- '.github/workflows/debian.yml'
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build-smoke-test:
timeout-minutes: 30
runs-on: ubuntu-latest
name: ${{ matrix.ghc }}-${{ matrix.deb }}
strategy:
fail-fast: false
matrix:
ghc: ['9.10.1', '9.8.2', '9.6.6', '9.4.8', '9.2.8', '9.0.2' ]
deb: ['buster', 'slim-buster']
include:
- ghc: '9.10.1'
ghc_minor: '9.10'
deb: 'slim-bullseye'
- ghc: '9.10.1'
ghc_minor: '9.10'
deb: 'bullseye'
- ghc: '9.10.1'
ghc_minor: '9.10'
- ghc: '9.8.2'
ghc_minor: '9.8'
- ghc: '9.6.6'
ghc_minor: '9.6'
deb: 'slim-bullseye'
- ghc: '9.6.6'
ghc_minor: '9.6'
deb: 'bullseye'
- ghc: '9.6.6'
ghc_minor: '9.6'
- ghc: '9.4.8'
ghc_minor: '9.4'
- ghc: '9.2.8'
ghc_minor: '9.2'
- ghc: '9.0.2'
ghc_minor: '9.0'
steps:
- uses: actions/checkout@v4
- name: build + smoke test [${{ matrix.ghc }}]
uses: nick-invision/[email protected]
with:
timeout_minutes: 8
max_attempts: 3
command: |
docker build --pull \
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
${{ matrix.ghc_minor }}/${{ matrix.deb }}
- uses: actions/checkout@v4
with:
repository: docker-library/official-images
path: official-images
- name: run official-images tests
run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }}
emulated-architecture-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
name: ${{ matrix.arch }}-${{ matrix.ghc }}-${{ matrix.deb }}
strategy:
fail-fast: false
matrix:
ghc: ['9.0.2', '9.2.8', '9.4.8', '9.6.6', '9.8.2', '9.10.1']
# uraimo/run-on-arch-action does not support debian slim variants
deb: ['buster']
arch: ['aarch64']
include:
# bullseye (debian 11)
- ghc: '9.10.1'
ghc_minor: '9.10'
deb: 'bullseye'
arch: 'aarch64'
docker_platform: arm64
- ghc: '9.6.6'
ghc_minor: '9.6'
deb: 'bullseye'
arch: 'aarch64'
docker_platform: arm64
# buster (debian 10)
- ghc: '9.10.1'
ghc_minor: '9.10'
- ghc: '9.8.2'
ghc_minor: '9.8'
- ghc: '9.6.6'
ghc_minor: '9.6'
- ghc: '9.4.8'
ghc_minor: '9.4'
- ghc: '9.2.8'
ghc_minor: '9.2'
- ghc: '9.0.2'
ghc_minor: '9.0'
- arch: aarch64
docker_platform: arm64
steps:
- uses: actions/checkout@v4
- name: docker build [ ${{ matrix.arch }} ${{ matrix.ghc }}]
uses: uraimo/[email protected]
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.deb }}
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y curl
curl -fsSL https://get.docker.com | sh
run: |
docker build --pull --progress=plain \
--platform "linux/${{ matrix.docker_platform }}" \
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
${{ matrix.ghc_minor }}/${{ matrix.deb }}
echo 'testing..'
docker run \
--platform "linux/${{ matrix.docker_platform }}" \
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
bash -c "cabal update && cabal install --lib primitive"
docker run \
--platform "linux/${{ matrix.docker_platform }}" \
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
bash -c "echo | ghci"
# Running the official tests does not work as we need to hardcode the plaform due to the emulated nature.
# This solution is fairly hacky, but gets us most of benefit of the official tests.