Skip to content

Merge pull request #670 from hasktorch/fix/macos #2969

Merge pull request #670 from hasktorch/fix/macos

Merge pull request #670 from hasktorch/fix/macos #2969

Workflow file for this run

name: nix-linux
on: [push, pull_request]
env:
NIX_OPTIONS: -L -j 1 --impure
jobs:
# tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - 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
# - uses: cachix/install-nix-action@v10
# - run: nix-env -iA cachix -f https://cachix.org/api/v1/install
# - run: cachix use hasktorch
# - run: cachix use iohk
# - run: |
# nix-build -j 2 -A haskellPackages.libtorch-ffi.checks.spec
# nix-build -j 2 -A haskellPackages.hasktorch.checks.spec
# nix-build -j 2 -A haskellPackages.examples.checks.spec
build-cache:
if: github.repository == 'hasktorch/hasktorch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: free disk space
run: |
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
cat /proc/cpuinfo
cat /proc/meminfo
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v12
with:
name: hasktorch
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: |
ps -aux
free
export NIX_BUILD_CORES=1
nix build '.#codegen:test:doctests' $NIX_OPTIONS
nix build '.#checks.x86_64-linux.codegen:test:spec' $NIX_OPTIONS
nix build '.#hasktorch-cpu:test:doctests' $NIX_OPTIONS
nix build '.#checks.x86_64-linux.hasktorch-cpu:test:spec' $NIX_OPTIONS
nix build '.#hasktorch-gradually-typed-cpu:test:doctests' $NIX_OPTIONS
nix build '.#checks.x86_64-linux.hasktorch-gradually-typed-cpu:test:spec' $NIX_OPTIONS
nix build '.#libtorch-ffi-cpu:test:spec' $NIX_OPTIONS
nix build '.#checks.x86_64-linux.libtorch-ffi-cpu:test:spec' $NIX_OPTIONS
- run: |
ps -aux
free
export NIX_BUILD_CORES=1
nix build '.#bounding-box-cpu:exe:bounding-box' $NIX_OPTIONS
nix build '.#codegen:exe:codegen-exe' $NIX_OPTIONS
nix build '.#dataloader-cifar10-cpu:exe:dataloader-cifar10' $NIX_OPTIONS
nix build '.#examples-cpu:exe:alexNet' $NIX_OPTIONS
nix build '.#examples-cpu:exe:autograd' $NIX_OPTIONS
nix build '.#examples-cpu:exe:distill' $NIX_OPTIONS
nix build '.#examples-cpu:exe:gaussian-process' $NIX_OPTIONS
nix build '.#examples-cpu:exe:gd-field' $NIX_OPTIONS
nix build '.#examples-cpu:exe:image-processing' $NIX_OPTIONS
nix build '.#examples-cpu:exe:iris-classification' $NIX_OPTIONS
nix build '.#examples-cpu:exe:load-torchscript' $NIX_OPTIONS
nix build '.#examples-cpu:exe:matrix-factorization' $NIX_OPTIONS
nix build '.#examples-cpu:exe:minimal-text-example' $NIX_OPTIONS
nix build '.#examples-cpu:exe:mnist-mixed-precision' $NIX_OPTIONS
nix build '.#examples-cpu:exe:mnist-mlp' $NIX_OPTIONS
nix build '.#examples-cpu:exe:optimizers' $NIX_OPTIONS
nix build '.#examples-cpu:exe:optimizers-cpp' $NIX_OPTIONS
nix build '.#examples-cpu:exe:optimizers-cpp-typed' $NIX_OPTIONS
nix build '.#examples-cpu:exe:regression' $NIX_OPTIONS
nix build '.#examples-cpu:exe:regularization' $NIX_OPTIONS
nix build '.#examples-cpu:exe:rnn' $NIX_OPTIONS
nix build '.#examples-cpu:exe:serialization' $NIX_OPTIONS
nix build '.#examples-cpu:exe:static-mnist-cnn' $NIX_OPTIONS
nix build '.#examples-cpu:exe:static-mnist-mlp' $NIX_OPTIONS
nix build '.#examples-cpu:exe:static-xor-mlp' $NIX_OPTIONS
nix build '.#examples-cpu:exe:typed-transformer' $NIX_OPTIONS
nix build '.#examples-cpu:exe:vae' $NIX_OPTIONS
nix build '.#examples-cpu:exe:xor-mlp' $NIX_OPTIONS
nix build '.#hasktorch-gradually-typed-cpu:exe:linear-regression' $NIX_OPTIONS
nix build '.#hasktorch-gradually-typed-cpu:exe:neural-interpreter' $NIX_OPTIONS
nix build '.#hasktorch-gradually-typed-cpu:exe:two-layer-network' $NIX_OPTIONS
nix build '.#untyped-nlp-cpu:exe:untyped-nlp' $NIX_OPTIONS
nix build .#lib.x86_64-linux.cpu.pkgs.haskell-language-server $NIX_OPTIONS