on: [push, pull_request]

name: Build NixOS

jobs:
  build:
    name: Build on NixOS
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Set up Nix using channel 'nixpkgs-unstable'
        uses: cachix/install-nix-action@v13
        with:
          nix_path: nixpkgs=channel:nixpkgs-unstable
      - name: Build using Nix
        run: |
          nix-build --pure && ./result/bin/c2ffi --help && echo OK
