Skip to content

Commit 9566089

Browse files
committed
Deduplication
1 parent dc1bdd8 commit 9566089

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/release.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,48 @@ env:
2020
TZ: Asia/Singapore
2121

2222
jobs:
23+
tool-output:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
debian_10_tools: ${{ steps.gen_output.outputs.debian_10_tools }}
27+
debian_11_tools: ${{ steps.gen_output.outputs.debian_11_tools }}
28+
debian_12_tools: ${{ steps.gen_output.outputs.debian_12_tools }}
29+
steps:
30+
- name: Generate output
31+
id: gen_output
32+
run: |
33+
version="${{ matrix.version }}"
34+
for deb in debian_10_tools debian_11_tools debian_12_tools ; do
35+
echo ${deb}="groff-base libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf" >> "$GITHUB_OUTPUT"
36+
done
37+
2338
build-linux:
2439
name: Build linux binaries
2540
runs-on: ubuntu-latest
41+
needs: ["tool-output"]
2642
env:
2743
TARBALL_EXT: tar.xz
2844
ARCH: 64
2945
strategy:
3046
fail-fast: false
3147
matrix:
32-
platform: [ { image: "debian:12"
48+
platform: [ { image: "debian:10"
3349
, installCmd: "apt-get update && apt-get install -y"
34-
, toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
50+
, toolRequirements: ${{ needs.tool-output.outputs.debian_10_tools }}
3551
, DISTRO: "Debian"
3652
, ARTIFACT: "x86_64-linux-deb10"
3753
, ADD_CABAL_ARGS: "--enable-split-sections"
3854
},
3955
{ image: "debian:11"
4056
, installCmd: "apt-get update && apt-get install -y"
41-
, toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
57+
, toolRequirements: ${{ needs.tool-output.outputs.debian_11_tools }}
4258
, DISTRO: "Debian"
4359
, ARTIFACT: "x86_64-linux-deb11"
4460
, ADD_CABAL_ARGS: "--enable-split-sections"
4561
},
4662
{ image: "debian:12"
4763
, installCmd: "apt-get update && apt-get install -y"
48-
, toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
64+
, toolRequirements: ${{ needs.tool-output.outputs.debian_12_tools }}
4965
, DISTRO: "Debian"
5066
, ARTIFACT: "x86_64-linux-deb12"
5167
, ADD_CABAL_ARGS: "--enable-split-sections"
@@ -423,23 +439,23 @@ jobs:
423439
strategy:
424440
fail-fast: false
425441
matrix:
426-
platform: [ { image: "debian:12"
442+
platform: [ { image: "debian:10"
427443
, installCmd: "apt-get update && apt-get install -y"
428-
, toolRequirements: "groff-base libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
444+
, toolRequirements: ${{ needs.tool-output.outputs.debian_10_tools }}
429445
, DISTRO: "Debian"
430446
, ARTIFACT: "x86_64-linux-deb10"
431447
, ADD_CABAL_ARGS: "--enable-split-sections"
432448
},
433449
{ image: "debian:11"
434450
, installCmd: "apt-get update && apt-get install -y"
435-
, toolRequirements: "groff-base libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
451+
, toolRequirements: ${{ needs.tool-output.outputs.debian_11_tools }}
436452
, DISTRO: "Debian"
437453
, ARTIFACT: "x86_64-linux-deb11"
438454
, ADD_CABAL_ARGS: "--enable-split-sections"
439455
},
440456
{ image: "debian:12"
441457
, installCmd: "apt-get update && apt-get install -y"
442-
, toolRequirements: "groff-base libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
458+
, toolRequirements: ${{ needs.tool-output.outputs.debian_12_tools }}
443459
, DISTRO: "Debian"
444460
, ARTIFACT: "x86_64-linux-deb12"
445461
, ADD_CABAL_ARGS: "--enable-split-sections"

0 commit comments

Comments
 (0)