stages:
  - build
  - test

build-rust:
  needs: []
  tags: [ irdest-nix ]
  stage: build
  script:
    - nix-build nix -A irdest-rust

build-website:
  needs: []
  tags: [ irdest-nix ]
  stage: build
  script:
    - nix-build nix -A irdest-website
  artifacts:
    paths:
      - result/*

unittests-pipeline:
  needs: []
  tags: [ irdest-nix ]
  stage: build
  script:
    - nix-build nix/ci/rust.nix -A pipeline
    - cp result rust-gitlab-ci.yml
  artifacts:
    paths:
      - rust-gitlab-ci.yml

unittests:
  needs: [ unittests-pipeline ]
  stage: test
  trigger:
    include:
      - artifact: rust-gitlab-ci.yml
        job: unittests-pipeline
    strategy: depend
