2022-08-09 18:13:54 +00:00
|
|
|
name: Bindist installation
|
2022-08-10 17:47:40 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
2022-08-09 18:13:54 +00:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2022-09-15 14:25:22 +00:00
|
|
|
tool:
|
|
|
|
description: Tool
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
version:
|
|
|
|
description: Version
|
2022-08-09 18:13:54 +00:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
metadataFile:
|
|
|
|
description: Metadata file
|
|
|
|
required: true
|
2023-11-12 07:46:09 +00:00
|
|
|
default: ghcup-0.0.8.yaml
|
2022-08-09 18:13:54 +00:00
|
|
|
type: string
|
2023-10-01 07:39:32 +00:00
|
|
|
channel:
|
|
|
|
description: Distribution channel (main|prerelease|nightly)
|
|
|
|
required: true
|
|
|
|
default: Main
|
|
|
|
type: string
|
2022-08-11 01:27:55 +00:00
|
|
|
env:
|
|
|
|
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
|
|
|
|
BOOTSTRAP_HASKELL_MINIMAL: 1
|
|
|
|
BOOTSTRAP_HASKELL_ADJUST_BASHRC: 1
|
2022-09-15 14:25:22 +00:00
|
|
|
TOOL: ${{ github.event.inputs.tool }}
|
|
|
|
VERSION: ${{ github.event.inputs.version }}
|
2022-08-11 01:27:55 +00:00
|
|
|
METADATA_FILE: ${{ github.event.inputs.metadataFile }}
|
2023-10-01 07:39:32 +00:00
|
|
|
CHANNEL: ${{ github.event.inputs.channel }}
|
2022-08-09 18:13:54 +00:00
|
|
|
jobs:
|
|
|
|
bindist-install:
|
|
|
|
name: linux-${{ matrix.image }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- image: alpine:latest
|
|
|
|
installCmd: apk update && apk add
|
|
|
|
toolRequirements: binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz
|
|
|
|
- image: debian:10
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
2023-02-17 15:45:19 +00:00
|
|
|
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev
|
2022-08-09 18:13:54 +00:00
|
|
|
- image: debian:11
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
2023-02-17 15:45:19 +00:00
|
|
|
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev
|
2024-03-01 16:04:08 +00:00
|
|
|
- image: debian:12
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
|
|
|
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev
|
2023-11-12 07:46:09 +00:00
|
|
|
- image: debian:unstable
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
|
|
|
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 libnuma-dev
|
2022-09-16 09:14:11 +00:00
|
|
|
- image: ubuntu:18.04
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
2022-09-16 09:16:51 +00:00
|
|
|
toolRequirements: build-essential curl libffi-dev libffi6 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
2022-08-09 18:13:54 +00:00
|
|
|
- image: ubuntu:20.04
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
|
|
|
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
|
|
|
- image: ubuntu:22.04
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
|
|
|
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
|
|
|
- image: archlinux:latest
|
|
|
|
installCmd: pacman -Syu --noconfirm
|
2022-08-11 01:27:55 +00:00
|
|
|
toolRequirements: which gcc gmp libffi make ncurses perl tar xz
|
2023-01-01 08:05:29 +00:00
|
|
|
- image: fedora:27
|
|
|
|
installCmd: dnf install -y
|
|
|
|
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl
|
2023-11-27 12:39:36 +00:00
|
|
|
- image: fedora:37
|
2022-08-09 18:13:54 +00:00
|
|
|
installCmd: dnf install -y
|
2022-08-11 01:27:55 +00:00
|
|
|
toolRequirements: which gcc g++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl
|
2023-02-11 04:30:56 +00:00
|
|
|
- image: rockylinux:8
|
2023-02-11 04:27:48 +00:00
|
|
|
installCmd: dnf install -y
|
|
|
|
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl
|
2023-02-17 15:45:19 +00:00
|
|
|
- image: rockylinux:9
|
|
|
|
installCmd: dnf install -y --allowerasing
|
|
|
|
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses xz perl
|
2022-10-08 13:37:57 +00:00
|
|
|
- image: linuxmintd/mint19.3-amd64
|
|
|
|
installCmd: apt-get update && apt-get install -y
|
|
|
|
toolRequirements: build-essential curl libffi-dev libffi6 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
2024-03-01 16:04:08 +00:00
|
|
|
- image: linuxmintd/mint20.3-amd64
|
2022-10-08 13:37:57 +00:00
|
|
|
installCmd: apt-get update && apt-get install -y
|
2023-02-17 15:45:19 +00:00
|
|
|
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
2024-03-01 16:04:08 +00:00
|
|
|
- image: linuxmintd/mint21.3-amd64
|
2023-02-17 15:45:19 +00:00
|
|
|
installCmd: apt-get update && apt-get install -y
|
2022-10-08 13:37:57 +00:00
|
|
|
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
2022-08-09 18:13:54 +00:00
|
|
|
container:
|
|
|
|
image: ${{ matrix.image }}
|
|
|
|
steps:
|
|
|
|
- name: Install requirements
|
2022-08-10 17:47:40 +00:00
|
|
|
shell: sh
|
2022-08-09 18:13:54 +00:00
|
|
|
run: |
|
|
|
|
${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }}
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
- name: Install ghcup and bindist
|
|
|
|
run: .github/workflows/install-bindist.sh
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
bindist-install-mac-win:
|
|
|
|
name: Build non-linux
|
2022-08-09 18:13:54 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-02-11 04:43:22 +00:00
|
|
|
include:
|
|
|
|
- os: [self-hosted, macOS, ARM64]
|
|
|
|
- os: macos-11
|
|
|
|
- os: macos-12
|
|
|
|
- os: windows-latest
|
2022-08-09 18:13:54 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-12-17 14:07:34 +00:00
|
|
|
|
|
|
|
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
|
|
name: Install ghcup and bindist
|
2023-02-11 04:43:22 +00:00
|
|
|
run: .github/workflows/install-bindist.sh
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
bindist-install-arm:
|
|
|
|
name: Build ARM binary
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2024-03-13 13:02:45 +00:00
|
|
|
- os: [self-hosted, Linux, ARM64, maerwald]
|
2023-02-11 04:43:22 +00:00
|
|
|
ARCH: ARM
|
2024-03-13 13:02:45 +00:00
|
|
|
- os: [self-hosted, Linux, ARM64, maerwald]
|
2023-02-11 04:43:22 +00:00
|
|
|
ARCH: ARM64
|
2022-12-17 14:07:34 +00:00
|
|
|
steps:
|
2023-02-11 04:43:22 +00:00
|
|
|
- uses: docker://arm64v8/ubuntu:focal
|
|
|
|
name: Cleanup (aarch64 linux)
|
2022-12-17 14:07:34 +00:00
|
|
|
with:
|
2023-02-11 04:43:22 +00:00
|
|
|
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
- name: git config
|
2022-12-17 14:07:34 +00:00
|
|
|
run: |
|
2023-02-11 04:43:22 +00:00
|
|
|
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
|
|
|
|
shell: bash
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
- if: matrix.ARCH == 'ARM'
|
|
|
|
uses: docker://hasufell/arm32v7-ubuntu-haskell:focal
|
|
|
|
name: Run build (armv7 linux)
|
|
|
|
with:
|
|
|
|
args: sh -c '.github/workflows/install-bindist.sh'
|
2022-12-17 14:07:34 +00:00
|
|
|
|
2023-02-11 04:43:22 +00:00
|
|
|
- if: matrix.ARCH == 'ARM64'
|
|
|
|
uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
|
|
|
|
name: Run build (aarch64 linux)
|
|
|
|
with:
|
|
|
|
args: sh -c '.github/workflows/install-bindist.sh'
|
2023-08-26 06:03:29 +00:00
|
|
|
|
2024-02-03 09:03:45 +00:00
|
|
|
bindist-install-freebsd:
|
|
|
|
name: Install FreeBSD binary
|
|
|
|
runs-on: [self-hosted, FreeBSD, X64]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Run build
|
|
|
|
run: .github/workflows/install-bindist.sh
|
|
|
|
|
2023-10-01 07:39:32 +00:00
|
|
|
validate:
|
|
|
|
name: ghcup-gen check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GHC: 9.2.8
|
|
|
|
CABAL: 3.10.1.0
|
|
|
|
steps:
|
|
|
|
- name: create ~/.local/bin
|
|
|
|
run: mkdir -p "$HOME/.local/bin"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Add ~/.local/bin to PATH
|
|
|
|
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: install yamllint
|
|
|
|
run: pip install yamllint
|
|
|
|
|
|
|
|
- name: Update cabal cache
|
|
|
|
run: cabal update
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Install requirements
|
|
|
|
shell: sh
|
|
|
|
run: |
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
export TZ=Asia/Singapore
|
|
|
|
sudo apt-get update && sudo apt-get install -y curl bash git gnupg libarchive-dev
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Cache Cabal
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: cache-cabal
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cabal/store
|
|
|
|
~/.cabal/packages
|
|
|
|
key: v2-${{ runner.os }}-${{ env.GHC }}-${{ env.CABAL }}-build-${{ hashFiles('cabal.project') }}
|
|
|
|
restore-keys: |
|
|
|
|
v2-${{ runner.os }}-${{ env.GHC }}-${{ env.CABAL }}-build-${{ hashFiles('cabal.project') }}
|
|
|
|
v2-${{ runner.os }}-${{ env.GHC }}-${{ env.CABAL }}-build-
|
|
|
|
v2-${{ runner.os }}-${{ env.GHC }}
|
|
|
|
|
|
|
|
- name: Install ghcup-gen
|
|
|
|
run: |
|
|
|
|
ghcup run --cabal 3.10.1.0 --ghc 9.2.8 --install -- cabal install --installdir="$HOME/.local/bin" --overwrite-policy=always --install-method=copy ghcup-gen
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Check yaml
|
|
|
|
run: |
|
|
|
|
ghcup-gen -- check -f ${{ env.METADATA_FILE }} --channel ${{ env.CHANNEL }}
|
|
|
|
yamllint ${{ env.METADATA_FILE }}
|
|
|
|
python3 -c "import yaml ; stream = open('${{ env.METADATA_FILE }}', 'r') ; yaml.safe_load(stream)"
|
|
|
|
shell: bash
|
|
|
|
|
2023-08-26 06:03:29 +00:00
|
|
|
signature-test:
|
|
|
|
name: Test signatures
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install requirements
|
|
|
|
shell: sh
|
|
|
|
run: |
|
|
|
|
sudo apt-get update && sudo apt-get install -y curl bash git gnupg
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Test signatures
|
|
|
|
run: .github/workflows/test-sigs.sh
|