Bindist installation #184
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bindist installation | |
defaults: | |
run: | |
shell: bash | |
on: | |
workflow_dispatch: | |
inputs: | |
tool: | |
description: Tool | |
required: true | |
type: string | |
version: | |
description: Version | |
required: true | |
type: string | |
metadataFile: | |
description: Metadata file | |
required: true | |
default: ghcup-0.0.7.yaml | |
type: string | |
env: | |
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1 | |
BOOTSTRAP_HASKELL_MINIMAL: 1 | |
BOOTSTRAP_HASKELL_ADJUST_BASHRC: 1 | |
TOOL: ${{ github.event.inputs.tool }} | |
VERSION: ${{ github.event.inputs.version }} | |
METADATA_FILE: ${{ github.event.inputs.metadataFile }} | |
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 | |
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev | |
- image: debian:11 | |
installCmd: apt-get update && apt-get install -y | |
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev | |
- image: ubuntu:18.04 | |
installCmd: apt-get update && apt-get install -y | |
toolRequirements: build-essential curl libffi-dev libffi6 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 | |
- 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 | |
toolRequirements: which gcc gmp libffi make ncurses perl tar xz | |
- image: fedora:27 | |
installCmd: dnf install -y | |
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl | |
- image: fedora:36 | |
installCmd: dnf install -y | |
toolRequirements: which gcc g++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl | |
- image: rockylinux:8 | |
installCmd: dnf install -y | |
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl | |
- image: rockylinux:9 | |
installCmd: dnf install -y --allowerasing | |
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses xz perl | |
- 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 | |
- image: linuxmintd/mint20.2-amd64 | |
installCmd: apt-get update && apt-get install -y | |
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 | |
- image: linuxmintd/mint21.1-amd64 | |
installCmd: apt-get update && apt-get install -y | |
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- name: Install requirements | |
shell: sh | |
run: | | |
${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }} | |
- uses: actions/checkout@v3 | |
- name: Install ghcup and bindist | |
run: .github/workflows/install-bindist.sh | |
bindist-install-mac-win: | |
name: Build non-linux | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: [self-hosted, macOS, ARM64] | |
- os: macos-11 | |
- os: macos-12 | |
- os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- if: ${{ github.event_name == 'workflow_dispatch' }} | |
name: Install ghcup and bindist | |
run: .github/workflows/install-bindist.sh | |
bindist-install-arm: | |
name: Build ARM binary | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: [self-hosted, Linux, ARM64] | |
ARCH: ARM | |
- os: [self-hosted, Linux, ARM64] | |
ARCH: ARM64 | |
steps: | |
- uses: docker://arm64v8/ubuntu:focal | |
name: Cleanup (aarch64 linux) | |
with: | |
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +" | |
- name: git config | |
run: | | |
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*" | |
shell: bash | |
- uses: actions/checkout@v3 | |
- 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' | |
- 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' | |
signature-test: | |
name: Test signatures | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install requirements | |
shell: sh | |
run: | | |
apt-get update && apt-get install -y curl bash git build-essential libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 | |
- uses: actions/checkout@v3 | |
- name: Test signatures | |
run: .github/workflows/test-sigs.sh |