Skip to content

Add ghc of nixpkgs to haskell-nix #685

Add ghc of nixpkgs to haskell-nix

Add ghc of nixpkgs to haskell-nix #685

Workflow file for this run

name: cabal-macos
on: [push, pull_request]
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Setup repo
run: |
git submodule init && git submodule update
- name: Setup tool-chains
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install libomp || true
pip3 install pyyaml || true
#brew install ghc@9.02 || true
#brew install cabal-install || true
brew tap hasktorch/libtorch-prebuild https://github.com/hasktorch/homebrew-libtorch-prebuild || true
brew install libtorch-prebuild@1.11 || true
brew tap hasktorch/tokenizers https://github.com/hasktorch/tokenizers || true
brew install libtokenizers || true
#pushd deps/ ; ./get-deps.sh -a cpu -c ;popd
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
ghcup install ghc 9.2.4
ghcup set ghc 9.2.4
ghcup install cabal
- name: Cache .cabal
uses: actions/cache@v2
with:
path: |
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-cabal-ghc924-${{ hashFiles('**/fallible.cabal') }}
restore-keys: |
${{ runner.os }}-cabal-ghc902-
- name: Build
run: |
#. setenv
./setup-cabal.sh
cabal v2-update
cabal v2-install hspec-discover
cabal v2-build --jobs=2 all
- name: Test
run: |
#. setenv
cabal v2-test --jobs=2 all
cabal v2-exec codegen-exe
cabal exec xor-mlp