From b31c5b65d572e7607cdb2a9b3e5aa3d014ae75e1 Mon Sep 17 00:00:00 2001 From: Piotr Semenov Date: Thu, 9 May 2024 23:17:04 +0400 Subject: [PATCH] fix: nix flake build freezes in github action, so try magic nix cache + switch to nixos-stable --- .github/workflows/build-artifacts.yml | 4 +++- Vagrantfile | 7 ++++--- flake.lock | 2 +- flake.nix | 2 +- shell.nix | 1 - 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index f2a33a0..03b05fd 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -10,7 +10,7 @@ on: paths-ignore: [ "*.md" ] jobs: - Build-VSIX: + Compile-All: runs-on: macos-12 steps: - uses: actions/checkout@v4 @@ -23,6 +23,8 @@ jobs: restore-keys: | ${{ runner.os }}-vagrant- + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Show Vagrant version run: vagrant --version diff --git a/Vagrantfile b/Vagrantfile index 17c8546..96b84af 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -16,9 +16,10 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", privileged: false, inline: <<-'SHELL' cd /vagrant/ - echo "statix check &&\ - nix flake check --impure &&\ - cp \$(nix build --impure --no-link --print-out-paths)/parigp* ./syntaxes/" |\ + nix --version + df -h + echo "nix flake check --impure && \ + cp \$(nix build --impure --no-link --print-out-paths)/parigp* ./syntaxes/" | \ nix-shell --run bash SHELL end diff --git a/flake.lock b/flake.lock index a5964e1..c1db0ae 100644 --- a/flake.lock +++ b/flake.lock @@ -11,7 +11,7 @@ }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixos-stable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 9c5fcff..3a772b2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "Builds TextMate grammar for latest version of PARI/GP"; - inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-stable"; outputs = { self, nixpkgs }: let diff --git a/shell.nix b/shell.nix index 4e43f44..dcca511 100644 --- a/shell.nix +++ b/shell.nix @@ -4,6 +4,5 @@ pkgs.mkShell { nativeBuildInputs = with pkgs; [ git nix - statix ]; }