Skip to content

Commit

Permalink
Add magic cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Jun 24, 2024
1 parent 02ec2b7 commit dcb4aad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: DeterminateSystems/nix-installer-action@v12
with:
extra_nix_config:
extra-conf:
accept-flake-config = true
- uses: DeterminateSystems/magic-nix-cache-action@v7
# https://input-output-hk.github.io/haskell.nix/tutorials/getting-started.html
# with:
# extra_nix_config: |
Expand All @@ -45,17 +46,14 @@ jobs:
# dist-newstyle
# key: ${{ runner.os }}-${{ matrix.devShell }}-${{ hashFiles('*.cabal') }}
# restore-keys: ${{ runner.os }}-${{ matrix.devShell }}-
- name: Uninstall GHCup
run: ghcup nuke
if: ${{ runner.os == 'Linux' }}
# - name: Install packages / Print versions
# run: |
# ./bin/${{ matrix.devShell }} -c ghc --version
# ./bin/${{ matrix.devShell }} -c cabal --version
- run: nix build
- name: Compile code
run: nix build
timeout-minutes: 10
- run: nix run .#test
timeout-minutes: 5
# - run: nix run .#test
# timeout-minutes: 5
# - name: Update package index
# run: ./bin/${{ matrix.devShell }} -c cabal update
Expand Down
9 changes: 6 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@
};
flake = pkgs.hapistrano.flake { };
in
flake // {
flake // rec {
apps.test = {
type = "app";
program = "${flake.packages."hapistrano:test:test"}/bin/test";
program = "${packages.test}/bin/test";
};
packages = {
default = flake.packages."hapistrano:exe:hap";
test = flake.packages."hapistrano:test:test";
};
packages.default = flake.packages."hapistrano:exe:hap";
});
}

Expand Down

0 comments on commit dcb4aad

Please sign in to comment.