File tree 1 file changed +53
-1
lines changed 1 file changed +53
-1
lines changed Original file line number Diff line number Diff line change 1
- name : Validate
1
+ name : Validate Docker
2
2
3
3
on :
4
4
pull_request :
5
5
branches :
6
6
- master
7
+ paths :
8
+ - ' **/Dockerfile'
9
+ - ' .github/workflows/**'
7
10
8
11
jobs :
9
12
build-smoke-test :
47
50
-
uses :
hadolint/[email protected]
48
51
with :
49
52
recursive : true
53
+
54
+ emulated-architecture-tests :
55
+ timeout-minutes : 60
56
+ runs-on : ubuntu-latest
57
+ name : ${{ matrix.arch }}-${{ matrix.ghc }}-${{ matrix.deb }}
58
+ strategy :
59
+ fail-fast : false
60
+ matrix :
61
+ ghc : ['8.10.7', '9.0.2', '9.2.1']
62
+ deb : ['buster']
63
+ arch : ['aarch64']
64
+ include :
65
+ - ghc : ' 8.10.7'
66
+ ghc_minor : ' 8.10'
67
+ - ghc : ' 9.0.2'
68
+ ghc_minor : ' 9.0'
69
+ - ghc : ' 9.2.1'
70
+ ghc_minor : ' 9.2'
71
+ - arch : aarch64
72
+ docker_platform : arm64
73
+ steps :
74
+ - uses : actions/checkout@v2
75
+ - name : docker build [ ${{ matrix.arch }} ${{ matrix.ghc }}]
76
+ uses : uraimo/run-on-arch-action@e9117b926d001f8683802c315b5a134f8c5da3d3
77
+ with :
78
+ arch : ${{ matrix.arch }}
79
+ distro : ${{ matrix.deb }}
80
+ githubToken : ${{ github.token }}
81
+ install : |
82
+ apt-get update
83
+ apt-get install -y curl
84
+ curl -fsSL https://get.docker.com | sh
85
+ run : |
86
+ docker build --pull \
87
+ --platform "linux/${{ matrix.docker_platform }}" \
88
+ -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
89
+ ${{ matrix.ghc_minor }}/${{ matrix.deb }}
90
+ echo 'testing..'
91
+ docker run \
92
+ --platform "linux/${{ matrix.docker_platform }}" \
93
+ -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
94
+ bash -c "cabal update && cabal install --lib hashable"
95
+ docker run \
96
+ --platform "linux/${{ matrix.docker_platform }}" \
97
+ -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
98
+ bash -c "echo | ghci"
99
+
100
+ # Running the official tests does not work as we need to hardcode the plaform due to the emulated nature.
101
+ # This solution is fairly hacky, but gets us most of benefit of the official tests.
You can’t perform that action at this time.
0 commit comments