Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci/cachix): add cachix as garnix fallback #36

Merged
merged 13 commits into from
Jan 24, 2025
Merged

Conversation

kaeeraa
Copy link
Member

@kaeeraa kaeeraa commented Jan 24, 2025

New GitHub Actions Workflow (cachix.yml):

A new GitHub Actions workflow has been introduced to automate the build process and caching mechanism using Cachix. This workflow is triggered when the Garnix check Evaluate flake.nix fails, acting as a fallback to ensure a smooth build process. When triggered, it automatically builds the project with nix-build and pushes the build outputs to Cachix, enabling caching to speed up future builds and avoid redundant processing.

This improvement significantly reduces the overhead of rebuilding unchanged components and optimizes the overall CI/CD pipeline by utilizing caching as a strategy for efficient build management.

Key Highlights:

  • Automatic Trigger: The workflow is activated when the Garnix check Evaluate flake.nix fails, indicating the need for a rebuild and cache.
  • Nix Build: The process utilizes nix-build to perform the actual build.
  • Caching with Cachix: Once the build is completed, Cachix is used to store the build outputs in a binary cache for faster future builds.

Changes

Implement Cachix Workflow

The main addition in this PR is the implementation of the Cachix workflow in the GitHub Actions configuration:

  • Fallback Mechanism: The workflow is designed as a fallback in case the Garnix check fails.
  • Build Automation: The nix-build command is used to automatically rebuild the project, ensuring that the latest changes are applied.
  • Cachix Caching: The built outputs are pushed to the Cachix cache, which significantly improves build times by caching previously built artifacts.

This mechanism ensures that failed builds don't require manual intervention and that caching provides an efficient solution to repetitive build processes.


Update Nix Documentation

nix/README.md:

  • Cachix Integration: The documentation now includes information about Cachix as a fallback binary caching solution alongside Garnix CI. This addition clarifies how developers can leverage Cachix to improve the efficiency of their Nix-based build systems.
  • Improved Instructions for NixOS: The instructions on setting up FreesmLauncher on NixOS have been updated to reflect the new changes in caching mechanisms. These updates ensure that users can easily implement Cachix alongside Garnix CI, streamlining the setup process.

This update provides more comprehensive guidance for developers using NixOS, helping them take full advantage of both binary caching systems.


Refactor of Documentation:

README.md:

  • Cosmetic Updates: The README.md file has undergone minor cosmetic changes, including the addition of blank lines to improve the document's readability. These small improvements make the structure of the file cleaner and easier to navigate, especially in the sections related to language selection.
  • Clearer Sectioning: These minor refinements help users locate the information they need more quickly and efficiently, enhancing the overall user experience when reading the documentation.

PR Description:

  1. New GitHub Actions Workflow (cachix.yml): A new workflow has been introduced to automate builds and caching using Cachix. The workflow is triggered when the Evaluate flake.nix check fails, acting as a fallback mechanism to rebuild the project and push the build outputs to Cachix for efficient caching. This improves the CI/CD pipeline by reducing unnecessary rebuilds and speeding up the build process.

  2. Update Nix Documentation:

    • nix/README.md: Added details on using Cachix as a fallback for binary caching alongside Garnix CI. Updated instructions for setting up FreesmLauncher on NixOS, making the setup process clearer and more efficient.
  3. Refactor of Documentation:

    • README.md: Cosmetic changes were made, particularly around the language selection section, to improve readability and structure. These minor updates enhance the visual flow of the documentation and make it easier to read.

This PR brings improvements to the build process through Cachix integration, alongside refinements in the documentation to make setup and configuration clearer for users.

Note

I can't test it, because this:
image

@kaeeraa kaeeraa added [0] : 3-rd Party Libs and other stuff [2] : Feature A new functionality for Freesm Launcher. [2] : Documentation Updates or additions to documentation. [3] : Priority: Medium Medium-priority task. [4] : Complexity: Medium A moderately challenging task. [5] : Status: Ready for Review [6] : Platform: Linux Tasks related to Linux platform. [6] : Platform: macOS Tasks related to macOS platform. [8] : User: Developers Tasks aimed at developers. [8] : User: End-Users Tasks aimed at end-users. labels Jan 24, 2025
@kaeeraa kaeeraa self-assigned this Jan 24, 2025
@kaeeraa kaeeraa marked this pull request as ready for review January 24, 2025 11:17
@kaeeraa kaeeraa enabled auto-merge (squash) January 24, 2025 11:17
@s0me1newithhand7s
Copy link
Member

skip all test; merge

@s0me1newithhand7s s0me1newithhand7s self-requested a review January 24, 2025 11:25
.github/workflows/cachix.yml Outdated Show resolved Hide resolved
@kaeeraa kaeeraa merged commit 8db501b into develop Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[0] : 3-rd Party Libs and other stuff [2] : Documentation Updates or additions to documentation. [2] : Feature A new functionality for Freesm Launcher. [3] : Priority: Medium Medium-priority task. [4] : Complexity: Medium A moderately challenging task. [6] : Platform: Linux Tasks related to Linux platform. [6] : Platform: macOS Tasks related to macOS platform. [8] : User: Developers Tasks aimed at developers. [8] : User: End-Users Tasks aimed at end-users.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants