From f14460a9055cba24a35540d590debba59357524a 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 to extend build space of vm --- .github/workflows/build-artifacts.yml | 8 +++++--- .github/workflows/pre-commit.yml | 6 ++++-- Vagrantfile | 12 ++++++++---- shell.nix | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index f2a33a0..a60d168 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 @@ -27,9 +27,11 @@ jobs: run: vagrant --version - name: Run vagrant up & provision - run: vagrant up --provision + run: | + vagrant plugin install vagrant-disksize + vagrant up --provision env: - VER: 23.11 + VER: 23.05 - name: Get Coverage Badge SVG run: make -B $(pwd)/images/coverage-badge.svg diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c0b3215..bb18e87 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,8 +10,10 @@ jobs: Run-Hooks: runs-on: macos-12 steps: - - name: Install pre-commit, jsonlint, and yamllint - run: brew install pre-commit jsonlint yamllint + - name: Install preliminaries + run: | + brew install pre-commit jsonlint yamllint + vagrant plugin install vagrant-disksize - name: Checkout uses: actions/checkout@v4 diff --git a/Vagrantfile b/Vagrantfile index 17c8546..207c8c8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,18 +7,22 @@ Vagrant.configure("2") do |config| config.vm.box = "nixbox/nixos" config.vm.box_version = ver.to_s + config.disksize.size = '8GB' + config.vm.provider "virtualbox" do |vb| vb.gui = false - vb.memory = "4096" + vb.memory = "8192" end config.vm.synced_folder ".", "/vagrant" 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 "statix check && \ + nix flake check --impure && \ + cp \$(nix build --impure --no-link --print-out-paths)/parigp* ./syntaxes/" | \ nix-shell --run bash SHELL end diff --git a/shell.nix b/shell.nix index 4e43f44..5dd0527 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ pkgs ? import {} }: +{ pkgs ? (import ) {} }: pkgs.mkShell { NIX_CONFIG = "experimental-features = nix-command flakes"; nativeBuildInputs = with pkgs; [