Skip to content

Commit

Permalink
fix: nix flake build freezes in github action, so try to extend build…
Browse files Browse the repository at this point in the history
… space of vm
  • Loading branch information
piotr-semenov committed May 10, 2024
1 parent 288f6c1 commit 8d20a35
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
paths-ignore: [ "*.md" ]

jobs:
Build-VSIX:
Compile-All:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
Expand All @@ -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
Expand Down
12 changes: 8 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? (import <nixpkgs>) {} }:
pkgs.mkShell {
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [
Expand Down

0 comments on commit 8d20a35

Please sign in to comment.