Testing the Agent

  1. Add this ci.nix to a repository in your agent’s account.

    ci.nix
    builtins.mapAttrs (k: _v:
      let
        url = "https://github.com/NixOS/nixpkgs/archive/2255f292063ccbe184ff8f9b35ce475c04d5ae69.tar.gz";
        pkgs = import (builtins.fetchTarball url) { system = k; };
      in
      pkgs.recurseIntoAttrs {
        # These two attributes will appear in your job for each platform.
        hello = pkgs.hello;
        cow-hello = pkgs.runCommand "cow-hello" {
          buildInputs = [ pkgs.hello pkgs.cowsay ];
        } ''
          hello | cowsay > $out
        '';
      }
    ) {
      x86_64-linux = {};
      # Uncomment to test build on macOS too
      # x86_64-darwin = {};
    }
  2. Adapt the attribute set of platforms near the bottom. You can find the agent platforms in the Agents tab in the dashboard.

  3. Browse to the project in the dashboard or click the Details link in the GitHub commit status.

    If nothing happened, make sure your repository is installed via the "Add GitHub repositories, organizations" button in the dashboard and push a new commit to trigger Hercules CI.

    Evaluation is currently only performed on x86_64-linux agents. Inspect the agent log if necessary with journalctl -u hercules-ci-agent.

    Build logs are available in the dashboard when done. However some configuration-related errors are reported to journalctl -u hercules-ci-agent.service, or on macOS: /var/log/hercules-ci-agent.log.

    Contact us at [email protected] for any questions or feedback.