Skip to content

Compile Puzzles

Actions
Compile every target directory into proper .alghive files and test them
v1.0.1
Latest
Star (0)

BeeToFlow

Overview

BeeToFlow is a Dockerized Python utility that is aim to compile a set of opened puzzle folders into .alghive files. This tool exists as a convenient way to use the Hivecraft tool to compile the puzzles. Includes this tool in your GitHub actions workflow to automatically compile your opened puzzles into .alghive files.

Usage

Add the following to your GitHub actions workflow:

- name: Use Compile Puzzles Action
  uses: AlgoHive-Coding-Puzzles/BeeToFlow@v1.0.0
  with:
    target-directories: "B1, B2"

Example of a GitHub Actions workflow file that uses the BeeToFlow action to compile puzzles:

name: Compile Puzzles
on: [push]
jobs:
  compile:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v3

      - name: Use Compile Puzzles Action
        uses: AlgoHive-Coding-Puzzles/BeeToFlow@v1.0.0
        with:
          target-directories: "Catalog1, Catalog2"

      - name: Upload Compiled Files as Artifactories
        uses: actions/upload-artifact@v2
        with:
          name: compiled-puzzles
          path: |
            out/Catalog1.tar
            out/Catalog2.tar
          retention-days: 7

Parameters

Parameter Description
target-directories A comma-separated list of directories to compile. Each directory should contain a set of opened puzzles.
output-directory The directory where the compiled .alghive files will be saved. Default is out.
hivecraft-version The version of Hivecraft to use. Default is latest.

Behavior

  • The action will compile the puzzles in the specified directories and save the .alghive files in the out directory.
  • If the target-directories parameter is not provided, the action will compile all opened puzzle folders in the repository.
  • The action will automatically create the out directory if it does not exist.
  • The action will use the specified version of Hivecraft to compile the puzzles. If no version is specified, it will use the latest version.
  • The action will create a tar file for each directory containing the compiled .alghive files.
  • If the action fails, it will return an error message indicating the reason for the failure.

Future Improvements

  • Add support for only testing and not compiling the puzzles.
    • It will allow users to test their commited puzzles in "draft" period and only compile them when they are ready.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Compile Puzzles is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Compile every target directory into proper .alghive files and test them
v1.0.1
Latest

Compile Puzzles is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.