Skip to content

Commit

Permalink
Use ghcup action
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Dec 26, 2024
1 parent 65b0f8f commit a004a0c
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
ghc: ['8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8']
cabal: ['3.8.1.0']
include:
- os: macos-12
- os: macos-13
ghc: '9.4'
cabal: '3.8.1.0'
- os: macos-12
- os: macos-13
ghc: '9.6'
cabal: '3.8.1.0'
- os: windows-latest
Expand All @@ -32,11 +32,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: haskell/ghcup-setup@v1

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get -y update
sudo apt-get -y install libtinfo5 libtinfo6 libncurses5 libncurses6
sudo apt-get -y install libtinfo6 libncurses6
- name: Install ghc/cabal
run: |
Expand Down Expand Up @@ -70,18 +72,22 @@ jobs:
i386:
runs-on: ubuntu-latest
env:
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
container:
image: i386/ubuntu:bionic
image: i386/debian:bookworm
steps:
- name: Install
run: |
apt-get update -y
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev git
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libtinfo-dev git
- uses: haskell/ghcup-setup@v1
- uses: actions/checkout@v1
- name: Test
run: |
. ~/.ghcup/env
ghcup install ghc --set recommended
ghcup install cabal --set latest
cabal update
cabal test
cabal bench
Expand Down Expand Up @@ -134,6 +140,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: haskell/ghcup-setup@v1

- name: Run build
run: |
bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake
Expand All @@ -144,7 +152,9 @@ jobs:
export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar"
export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib"
. .github/scripts/env.sh
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_GHC_VERSION=${{ matrix.ghc }} BOOTSTRAP_HASKELL_ADJUST_BASHRC=yes sh
ghcup install ghc --set ${{ matrix.ghc }}
ghcup install cabal --set latest
cabal update
cabal test
cabal bench
env:
Expand All @@ -164,10 +174,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: haskell/ghcup-setup@v1

- name: Run build
run: |
pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14
sudo pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14
. .github/scripts/env.sh
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_GHC_VERSION=${{ matrix.ghc }} BOOTSTRAP_HASKELL_ADJUST_BASHRC=yes sh
ghcup install ghc --set ${{ matrix.ghc }}
ghcup install cabal --set recommended
cabal update
cabal test
cabal bench

0 comments on commit a004a0c

Please sign in to comment.