fuel.nix icon indicating copy to clipboard operation
fuel.nix copied to clipboard

Create a github action that uses `fuel.nix` to install forc

Open sdankel opened this issue 2 years ago • 2 comments

This would give us an idea of whether fuel.nix could be a viable replacement for fuelup in CI, in terms of latency to install forc.

sdankel avatar May 30 '23 23:05 sdankel

Just for reference, today downstream users should already be able to use tools from fuel.nix in CI actions with something like this:

jobs:
  my-build-job:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: cachix/install-nix-action@v20
        with:
          nix_path: nixpkgs=channel:nixos-unstable
          extra_nix_config: |
            extra-substituters = https://fuellabs.cachix.org
            extra-trusted-public-keys = fuellabs.cachix.org-1:3gOmll82VDbT7EggylzOVJ6dr0jgPVU/KMN6+Kf8qx8=
      - run: nix shell github:fuellabs/fuel.nix#forc-0-39-0
      # Following steps now have `forc` version `0.39.0` available.
      - run: forc build

But yes, it would be great to test latency, and perhaps provide some wrapper action that takes care of the cachix installation with the necessary binary cache etc.

mitchmindtree avatar May 31 '23 00:05 mitchmindtree

Another thought w.r.t. latency:

If it turns out that relying directly on the fuellabs cache does take too long, I'd imagine there's some way to provide a docker image that provides forc pre-fetched? I don't have enough docker experience to be sure :sweat_smile:

mitchmindtree avatar May 31 '23 02:05 mitchmindtree