Merge remote-tracking branch 'origin/pr/30'
This commit is contained in:
commit
86da8c3dfe
63
.github/workflows/bindists.yaml
vendored
63
.github/workflows/bindists.yaml
vendored
@ -1,4 +1,7 @@
|
|||||||
name: Bindist installation
|
name: Bindist installation
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@ -11,6 +14,12 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
default: ghcup-0.0.7.yaml
|
default: ghcup-0.0.7.yaml
|
||||||
type: string
|
type: string
|
||||||
|
env:
|
||||||
|
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
|
||||||
|
BOOTSTRAP_HASKELL_MINIMAL: 1
|
||||||
|
BOOTSTRAP_HASKELL_ADJUST_BASHRC: 1
|
||||||
|
GHC_VERSION: ${{ github.event.inputs.ghcVersion }}
|
||||||
|
METADATA_FILE: ${{ github.event.inputs.metadataFile }}
|
||||||
jobs:
|
jobs:
|
||||||
bindist-install:
|
bindist-install:
|
||||||
name: linux-${{ matrix.image }}
|
name: linux-${{ matrix.image }}
|
||||||
@ -39,39 +48,21 @@ jobs:
|
|||||||
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
|
||||||
- image: archlinux:latest
|
- image: archlinux:latest
|
||||||
installCmd: pacman -Syu --noconfirm
|
installCmd: pacman -Syu --noconfirm
|
||||||
toolRequirements: gcc gmp libffi make ncurses perl tar xz
|
toolRequirements: which gcc gmp libffi make ncurses perl tar xz
|
||||||
- image: fedora:latest
|
- image: fedora:latest
|
||||||
installCmd: dnf install -y
|
installCmd: dnf install -y
|
||||||
toolRequirements: gcc g++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl
|
toolRequirements: which gcc g++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.image }}
|
image: ${{ matrix.image }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }}
|
${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }}
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install ghcup
|
- name: Install ghcup and bindist for GHC ${{ github.event.inputs.ghcVersion }}
|
||||||
run: |
|
run: .github/workflows/install-bindist.sh
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
bindist-install-non-linux:
|
||||||
echo ~/.ghcup/bin >> $GITHUB_PATH
|
|
||||||
~/.ghcup/bin/ghcup --version
|
|
||||||
env:
|
|
||||||
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
|
|
||||||
BOOTSTRAP_HASKELL_MINIMAL: 1
|
|
||||||
- name: Print tool requirements
|
|
||||||
run: ghcup tool-requirements
|
|
||||||
- name: Install GHC ${{ github.event.inputs.ghcVersion }}
|
|
||||||
run: |
|
|
||||||
ghcup -v --url-source=file:${{ github.event.inputs.metadataFile }} \
|
|
||||||
install ghc --set ${{ github.event.inputs.ghcVersion }}
|
|
||||||
- name: GHC sanity check
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
ghc --version
|
|
||||||
echo 'main = print $ 1 + 1' > main.hs
|
|
||||||
ghc main.hs
|
|
||||||
[[ $(./main) -eq 2 ]]
|
|
||||||
bindist-install-macos:
|
|
||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -79,27 +70,9 @@ jobs:
|
|||||||
os:
|
os:
|
||||||
- macos-11
|
- macos-11
|
||||||
- macos-12
|
- macos-12
|
||||||
|
- windows-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install ghcup
|
- name: Install ghcup and bindist for GHC ${{ github.event.inputs.ghcVersion }}
|
||||||
run: |
|
run: .github/workflows/install-bindist.sh
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
|
||||||
echo ~/.ghcup/bin >> $GITHUB_PATH
|
|
||||||
~/.ghcup/bin/ghcup --version
|
|
||||||
env:
|
|
||||||
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
|
|
||||||
BOOTSTRAP_HASKELL_MINIMAL: 1
|
|
||||||
- name: Print tool requirements
|
|
||||||
run: ghcup tool-requirements
|
|
||||||
- name: Install GHC ${{ github.event.inputs.ghcVersion }}
|
|
||||||
run: |
|
|
||||||
ghcup -v --url-source=file:${{ github.event.inputs.metadataFile }} \
|
|
||||||
install ghc --set ${{ github.event.inputs.ghcVersion }}
|
|
||||||
- name: GHC sanity check
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
ghc --version
|
|
||||||
echo 'main = print $ 1 + 1' > main.hs
|
|
||||||
ghc main.hs
|
|
||||||
[[ $(./main) -eq 2 ]]
|
|
||||||
|
18
.github/workflows/install-bindist.sh
vendored
Executable file
18
.github/workflows/install-bindist.sh
vendored
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
export GHCUP_INSTALL_BASE_PREFIX=$RUNNER_TEMP/foobarbaz
|
||||||
|
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
||||||
|
|
||||||
|
source $GHCUP_INSTALL_BASE_PREFIX/.ghcup/env || source ~/.bashrc
|
||||||
|
|
||||||
|
ghcup --version
|
||||||
|
which ghcup | grep foobarbaz
|
||||||
|
|
||||||
|
ghcup -v --url-source=file:$METADATA_FILE install ghc --set $GHC_VERSION
|
||||||
|
|
||||||
|
ghc --version
|
||||||
|
echo 'main = print $ 1 + 1' > main.hs
|
||||||
|
ghc main.hs
|
||||||
|
[[ $(./main) -eq 2 ]]
|
Loading…
Reference in New Issue
Block a user