Skip to content

Commit 019f87c

Browse files
committed
Deduplication
1 parent dc1bdd8 commit 019f87c

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/release.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,45 @@ 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+
for deb in debian_10_tools debian_11_tools debian_12_tools ; do 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" ; done
34+
2335
build-linux:
2436
name: Build linux binaries
2537
runs-on: ubuntu-latest
38+
needs: ["tool-output"]
2639
env:
2740
TARBALL_EXT: tar.xz
2841
ARCH: 64
2942
strategy:
3043
fail-fast: false
3144
matrix:
32-
platform: [ { image: "debian:12"
45+
platform: [ { image: "debian:10"
3346
, 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"
47+
, toolRequirements: "${{ needs.tool-output.outputs.debian_10_tools }}"
3548
, DISTRO: "Debian"
3649
, ARTIFACT: "x86_64-linux-deb10"
3750
, ADD_CABAL_ARGS: "--enable-split-sections"
3851
},
3952
{ image: "debian:11"
4053
, 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"
54+
, toolRequirements: "${{ needs.tool-output.outputs.debian_11_tools }}"
4255
, DISTRO: "Debian"
4356
, ARTIFACT: "x86_64-linux-deb11"
4457
, ADD_CABAL_ARGS: "--enable-split-sections"
4558
},
4659
{ image: "debian:12"
4760
, 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"
61+
, toolRequirements: "${{ needs.tool-output.outputs.debian_12_tools }}"
4962
, DISTRO: "Debian"
5063
, ARTIFACT: "x86_64-linux-deb12"
5164
, ADD_CABAL_ARGS: "--enable-split-sections"
@@ -423,23 +436,23 @@ jobs:
423436
strategy:
424437
fail-fast: false
425438
matrix:
426-
platform: [ { image: "debian:12"
439+
platform: [ { image: "debian:10"
427440
, 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"
441+
, toolRequirements: "${{ needs.tool-output.outputs.debian_10_tools }}"
429442
, DISTRO: "Debian"
430443
, ARTIFACT: "x86_64-linux-deb10"
431444
, ADD_CABAL_ARGS: "--enable-split-sections"
432445
},
433446
{ image: "debian:11"
434447
, 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"
448+
, toolRequirements: "${{ needs.tool-output.outputs.debian_11_tools }}"
436449
, DISTRO: "Debian"
437450
, ARTIFACT: "x86_64-linux-deb11"
438451
, ADD_CABAL_ARGS: "--enable-split-sections"
439452
},
440453
{ image: "debian:12"
441454
, 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"
455+
, toolRequirements: "${{ needs.tool-output.outputs.debian_12_tools }}"
443456
, DISTRO: "Debian"
444457
, ARTIFACT: "x86_64-linux-deb12"
445458
, ADD_CABAL_ARGS: "--enable-split-sections"

0 commit comments

Comments
 (0)