Split gradually-typed-package into gradually-typed-examples with test… #3033
Workflow file for this run
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: stack-linux | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: free disk space | |
run: | | |
sudo swapoff -a | |
sudo rm -f /swapfile | |
sudo apt -y purge ghc* cabal-install* php* || true | |
sudo apt autoremove -y || true | |
sudo apt autoclean -y || true | |
docker rmi $(docker image ls -aq) | |
df -h | |
- name: Setup packages | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/sbt.list | |
sudo apt update -qq | |
sudo apt -y --allow-downgrades --allow-remove-essential --allow-change-held-packages install cmake curl wget unzip git libtinfo-dev python3 python3-yaml | |
## Stack is preinstalled on the GHA runners | |
# (wget -qO- https://get.haskellstack.org/ | sh) || true | |
- name: Cache .stack | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: "\ | |
${{ runner.os }}-stack\ | |
-${{ hashFiles('**/stack.yaml.lock') }}\ | |
-${{ hashFiles('**/package.yaml') }}\ | |
" | |
restore-keys: | | |
${{ runner.os }}-stack- | |
- name: Build | |
run: | | |
# export PATH=/opt/ghc/bin:$PATH | |
source setenv | |
pushd deps/ ; ./get-deps.sh -a cpu -c; popd | |
stack build \ | |
libtorch-ffi \ | |
libtorch-ffi-helper \ | |
hasktorch \ | |
codegen \ | |
examples \ | |
bounding-box \ | |
dataloader-cifar10 \ | |
untyped-nlp | |
- name: Test | |
run: | | |
# export PATH=/opt/ghc/bin:$PATH | |
source setenv | |
stack test codegen | |
stack test libtorch-ffi | |
stack test hasktorch | |
stack exec codegen-exe | |
stack exec xor-mlp | |
# - name: Build tutorial | |
# run: | | |
# stack build tintin | |
# pushd hasktorch | |
# stack exec tintin -- run | |
# popd | |
# mkdir -p public/tutorial | |
# cp -r hasktorch/.stack-work/tintin/rendered/* public/tutorial | |
# - name: Deploy tutorial | |
# if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
# uses: peaceiris/actions-gh-pages@v3 | |
# with: | |
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
# external_repository: hasktorch/hasktorch.github.io | |
# publish_branch: tutorial | |
# publish_dir: ./public |