Skip to content
/ umpire Public

βš–οΈ Turn testing into your winning edge!

License

Notifications You must be signed in to change notification settings

udontur/umpire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9182545Β Β·Β Β· Aug 17, 2025

History

124 Commits
Jun 26, 2025
Jun 26, 2025
Aug 17, 2025
Aug 2, 2025
Jul 27, 2025
Jun 23, 2025
Jun 25, 2025
May 2, 2025
Jul 27, 2025
Jul 27, 2025
Jun 25, 2025
Aug 2, 2025

Repository files navigation


Umpire

βš–οΈ Turn testing into your winning edge!

Version Number GitHub Actions Status Static Badge

⭐️ About

Say goodbye to annoying manual test runs during an intense programming contest!

Umpire is a blazingly fast command-line helper that compiles your code, executes it, and automatically validates against all test cases.

With just one short command, you can get quick, clear, and easy-to-read results at a glance. It lets you focus on solving problems rather than wasting time juggling with annoying copy-pastes and loads of commands.

Umpire turns testing into your winning edge!

Demo Video

πŸ“₯ Installation (Linux and MacOS)

Umpire is available for both Linux and MacOS.

Note

To avoid large package size, please install the compilers that you use:

gcc # C++, installed by default
python3  # Python
go  # Golang
zulu  # Java
rustc  # Rust

❄️ Nix (Linux and MacOS)

Click here to see the installation guide
Umpire is available via Nix flakes. Please enable Nix flakes for your system (here is the doc that explains how to enable it: NixOS Wiki).

  1. Add the url to your flake.nix input:
inputs = {
   umpire.url = "github:udontur/umpire";
   # ...

};
  1. Add the package in environment.systemPackages:
environment.systemPackages = with pkgs; [
   inputs.umpire.packages."${system}".default
   # ...

];
  1. Rebuild your configuration with Nix flakes enabled.
sudo nixos-rebuild switch --flake /PATH/TO/CONFIG#WORKSTATION_NAME

πŸ”΅ Arch Linux (AUR)

Use an AUR helper of your choice to get Umpire (like yay or paru):

yay -S umpire

🐧 Other Linux Distros

Run the following command in your terminal:

git clone https://github.com/udontur/umpire &∓& cd umpire &∓& sudo chmod +x asset/install.sh &∓& asset/install.sh

See the detailed explaination.

πŸ–₯️ Usage

The usage guide is also available via the following command: um --help

πŸ“ Folder Structure

Organize your code directory as follows:

task-a # The folder that stores everything
└─ main.cpp  # File name must be "main"
 Β  └─ testcase ase  # Exact name
 Β Β    β”œβ”€ ABC.in  ABC.in  # Same input / output name: ABC
 Β Β    β”œβ”€ ABC.out ABC.out  # Same input / output name: ABC
Click here for more details
task-a is the directory that contains the code file and test case folder.

The code file should be named as main.XXX where XXX is the file extension (.cpp for C++).

The test cases should be located in the testcase folder (must be the exact name).

Each test case in the folder must be in the format of ABC.in and ABC.out where ABC is the input / output file name.

🧠 Running Umpire

Run umpire in the current directory:

um

Or specify a directory:

um task-a

Note

For Java programmers, make sure the class name is main.

βš™οΈ Options for Umpire

1. Execution time limit

Set the execution time limit in seconds (accepts integers and decimal numbers):

um -t 3.5 # 3.5 seconds time limit

Tip

Omit for a 1 second time limit

um # no flags

2. Program inputs and outputs

See your program's outputs and the corresponding inputs by toggling the following flag:

um --output

πŸ’‘ Example

Run the code located in the task-a folder with a 2 second time limit:

um task-a -t 2