### Installing Pre-commit Hooks with Earthly (Bash) Source: https://github.com/expressvpn/lightway-core/blob/main/README.adoc This command uses Earthly to install the pre-commit hooks, which enforce code standards for the project. Pre-commit ensures that code adheres to defined quality and style guidelines before commits are made. ```bash earthly +install-precommit ``` -------------------------------- ### Installing Ceedling Gem (Ruby/Bash) Source: https://github.com/expressvpn/lightway-core/blob/main/README.adoc This command installs a specific version of the Ceedling gem (v0.31.1), a build automation system for C projects. It's crucial to install this exact version as newer versions (v1.0.0+) introduce breaking changes. ```bash gem install ceedling -v 0.31.1 ``` -------------------------------- ### Running Header Generation Tests (Bash) Source: https://github.com/expressvpn/lightway-core/blob/main/python/README.md This snippet outlines the steps to run tests for the header generation process. It involves setting up a Python virtual environment, installing 'textx', running 'make_header.py' to generate a test public header, and then using 'diff' to compare it against a fixture, expecting no output if the test passes. ```bash python3 -m venv venv source venv/bin/activate pip install textx python make_header.py /dev/null test/test.h > public_test.h diff --ignore-blank-lines public_test.h test/fixture_public_test.h # Expect no output ``` -------------------------------- ### Generating Public Header Files (Bash) Source: https://github.com/expressvpn/lightway-core/blob/main/python/README.md This snippet provides a sequence of bash commands to set up a Python virtual environment, install 'textx', run a script to generate public header files, and then move the generated 'he.h' file to the '../public/' directory. This process is used for regenerating the public API documentation. ```bash python3 -m venv venv source venv/bin/activate pip install textx ./make_public_header.sh # Inspect generated he.h mv he.h ../public/he.h ``` -------------------------------- ### Building and Running All Tests with Earthly (Bash) Source: https://github.com/expressvpn/lightway-core/blob/main/README.adoc This Earthly command builds the static library for Linux and executes all associated tests within a containerized environment. It provides a simple and consistent way to verify the project's integrity. ```bash earthly +all ``` -------------------------------- ### Building Ceedling Release Library for Platform (Bash) Source: https://github.com/expressvpn/lightway-core/blob/main/README.adoc This command instructs Ceedling to build the release library for the specified platform ('linux', 'macos', or 'windows'). This generates the optimized, production-ready version of the Lightway Core library. ```bash ceedling release project:$PLATFORM ``` -------------------------------- ### Running Ceedling Tests for Specific Platform (Bash) Source: https://github.com/expressvpn/lightway-core/blob/main/README.adoc This command uses Ceedling to build and run tests for the specified platform, where $PLATFORM can be 'linux', 'macos', or 'windows'. It's used to verify the project's functionality on different operating systems. ```bash ceedling test project:$PLATFORM ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.