Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/mhs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: mhs-ci

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build-mhs-os-string:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
# windows doesn't quite work yet
os: [ubuntu-latest, macOS-15-intel, macOS-latest]
mhs: [0.15.0.0]

steps:

- name: checkout mhs repo
uses: actions/checkout@v4
with:
repository: augustss/MicroHs
ref: v${{ matrix.mhs }}
path: mhs

- name: make and install mhs
if: runner.os == 'Windows'
run: |
cd mhs
nmake /F Makefile.windows

- name: make and install mhs
if: runner.os != 'Windows'
run: |
cd mhs
make minstall

- name: install packages
run: |
cd mhs
export PATH="$HOME/.mcabal/bin:$PATH"
make -f Makefile.packages
shell: bash

- name: checkout os-string repo
uses: actions/checkout@v4
with:
path: os-string

- name: compile and install os-string package
run: |
export PATH="$HOME/.mcabal/bin:$PATH"
cd os-string
mcabal -r install

- name: cleanup
run: |
rm -rf "$HOME/.mcabal"

80 changes: 2 additions & 78 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-13, windows-latest]
ghc: ['9.4', '9.6', '9.8', '9.10', '9.12']
include:
- os: ubuntu-latest
ghc: '8.10'
- os: ubuntu-latest
ghc: '9.0'
- os: ubuntu-latest
ghc: '9.2'
os: [ubuntu-latest, macOS-15-intel, macOS-latest, windows-latest]
ghc: ['9.6', '9.8', '9.10', '9.12', '9.14']
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -58,75 +51,6 @@ jobs:
with:
args: sh -c "cabal update && cabal test"

# We use github.com/haskell self-hosted runners for ARM testing.
# If they become unavailable in future, put ['armv7', 'aarch64']
# back to emulation jobs above.
arm:
runs-on: [self-hosted, Linux, ARM64]
strategy:
fail-fast: true
matrix:
arch: [arm32v7, arm64v8]
steps:
- uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
name: Cleanup
with:
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"

- name: Checkout code
uses: actions/checkout@v4

- if: matrix.arch == 'arm32v7'
uses: docker://hasufell/arm32v7-ubuntu-haskell:focal
name: Run build (arm32v7 linux)
with:
args: sh -c "cabal update && ghcup install ghc --isolate=/usr --force 9.2.2 && cabal test -w ghc-9.2.2"

- if: matrix.arch == 'arm64v8'
uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
name: Run build (arm64v8 linux)
with:
args: sh -c "cabal update && ghcup install ghc --isolate=/usr --force 9.2.2 && cabal test -w ghc-9.2.2"

darwin_arm:
runs-on: ${{ matrix.os }}
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
strategy:
fail-fast: false
matrix:
include:
- os: [self-hosted, macOS, ARM64]
ghc: 8.10.7
- os: [self-hosted, macOS, ARM64]
ghc: 9.2.8
- os: [self-hosted, macOS, ARM64]
ghc: 9.4.7
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install prerequisites
run: |
bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake
echo PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" >> "$GITHUB_ENV"
echo CC="$HOME/.brew/opt/llvm@13/bin/clang" >> "$GITHUB_ENV"
echo CXX="$HOME/.brew/opt/llvm@13/bin/clang++" >> "$GITHUB_ENV"
echo LD=ld >> "$GITHUB_ENV"
echo AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" >> "$GITHUB_ENV"
echo RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" >> "$GITHUB_ENV"

- uses: haskell/ghcup-setup@v1
with:
ghc: ${{ matrix.ghc }}
cabal: latest

- name: Run build
run: |
cabal update
cabal test

freebsd:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
Loading