Compare commits
1 Commits
flakes-git
...
single-ins
Author | SHA1 | Date | |
---|---|---|---|
9d89bbc364 |
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
@ -1,13 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
|
|
||||||
- package-ecosystem: github-actions
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: daily
|
|
||||||
time: '00:00'
|
|
||||||
timezone: UTC
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
commit-message:
|
|
||||||
prefix: "chore"
|
|
||||||
include: "scope"
|
|
70
.github/workflows/test.yml
vendored
70
.github/workflows/test.yml
vendored
@ -2,9 +2,6 @@ name: "install-nix-action test"
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
simple-build:
|
simple-build:
|
||||||
strategy:
|
strategy:
|
||||||
@ -12,73 +9,17 @@ jobs:
|
|||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2
|
||||||
- run: yarn install --frozen-lockfile
|
- run: yarn install --frozen-lockfile
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-20.03
|
|
||||||
- run: nix-env -iA cachix -f https://cachix.org/api/v1/install
|
- run: nix-env -iA cachix -f https://cachix.org/api/v1/install
|
||||||
- run: cat /etc/nix/nix.conf
|
- run: cat /etc/nix/nix.conf
|
||||||
# cachix should be available and be able to configure a cache
|
# cachix should be available and be able to configure a cache
|
||||||
- run: cachix use cachix
|
- run: cachix use cachix
|
||||||
- run: nix-build test.nix
|
- run: nix-build test.nix
|
||||||
|
no-channel:
|
||||||
custom-nix-path:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.4
|
|
||||||
- run: yarn install --frozen-lockfile
|
|
||||||
- run: yarn build
|
|
||||||
- name: Install Nix
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-20.03
|
|
||||||
- run: test $NIX_PATH == "nixpkgs=channel:nixos-20.03"
|
|
||||||
- run: nix-build test.nix
|
|
||||||
|
|
||||||
extra-nix-config:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.4
|
|
||||||
- run: yarn install --frozen-lockfile
|
|
||||||
- run: yarn build
|
|
||||||
- name: Install Nix
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-20.03
|
|
||||||
extra_nix_config: |
|
|
||||||
sandbox = relaxed
|
|
||||||
- run: cat /etc/nix/nix.conf
|
|
||||||
- run: nix-build test.nix --arg noChroot true
|
|
||||||
|
|
||||||
flakes:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.4
|
|
||||||
- run: yarn install --frozen-lockfile
|
|
||||||
- run: yarn build
|
|
||||||
- name: Install Nix
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
|
||||||
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
|
||||||
extra_nix_config: |
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: nix flake show github:NixOS/nixpkgs
|
|
||||||
|
|
||||||
installer-options:
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
@ -90,7 +31,6 @@ jobs:
|
|||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-21.05
|
skip_adding_nixpkgs_channel: true
|
||||||
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
- run: nix-build test.nix && exit 1 || echo "OK"
|
||||||
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
- run: NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/tarball/ab5863afada3c1b50fc43bf774b75ea71b287cde nix-build test.nix
|
||||||
- run: nix-build test.nix
|
|
109
README.md
109
README.md
@ -4,21 +4,6 @@
|
|||||||
|
|
||||||
Installs [Nix](https://nixos.org/nix/) on GitHub Actions for the supported platforms: Linux and macOS.
|
Installs [Nix](https://nixos.org/nix/) on GitHub Actions for the supported platforms: Linux and macOS.
|
||||||
|
|
||||||
By default it has no nixpkgs configured, you have to set `nix_path`
|
|
||||||
by [picking a channel](https://status.nixos.org/)
|
|
||||||
or [pin nixpkgs yourself](https://nix.dev/reference/pinning-nixpkgs.html)
|
|
||||||
(see also [pinning tutorial](https://nix.dev/tutorials/towards-reproducibility-pinning-nixpkgs.html)).
|
|
||||||
|
|
||||||
# Features
|
|
||||||
|
|
||||||
- Quick installation (~4s on Linux, ~20s on macOS)
|
|
||||||
- Multi-User installation (with sandboxing enabled only on Linux)
|
|
||||||
- [Self-hosted github runner](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) support
|
|
||||||
- Allows specifying Nix installation URL via `install_url`
|
|
||||||
- Allows specifying extra Nix configration options via `extra_nix_config`
|
|
||||||
- Allows specifying `$NIX_PATH` and channels via `nix_path`
|
|
||||||
- Share `/nix/store` between builds using [cachix-action](https://github.com/cachix/cachix-action) for simple binary cache setup to speed up your builds and share binaries with your team
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Create `.github/workflows/test.yml` in your repo with the following contents:
|
Create `.github/workflows/test.yml` in your repo with the following contents:
|
||||||
@ -32,102 +17,20 @@ jobs:
|
|||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2
|
||||||
- uses: cachix/install-nix-action@v13
|
- uses: cachix/install-nix-action@v8
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
- run: nix-build
|
- run: nix-build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Usage with Flakes
|
See [action.yml](action.yml) for all options.
|
||||||
|
|
||||||
```yaml
|
See also [cachix-action](https://github.com/cachix/cachix-action) for
|
||||||
name: "Test"
|
simple binary cache setup to speed up your builds and share binaries
|
||||||
on:
|
with developers.
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
jobs:
|
|
||||||
tests:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.4
|
|
||||||
- uses: cachix/install-nix-action@v13
|
|
||||||
with:
|
|
||||||
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
|
||||||
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
|
||||||
extra_nix_config: |
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: nix build
|
|
||||||
- run: nix flake check
|
|
||||||
```
|
|
||||||
|
|
||||||
To install Nix from any commit, go to [the corresponding installer_test action](https://github.com/NixOS/nix/runs/2219534360) and click on "Run cachix/install-nix-action@XX" step and expand the first line.
|
|
||||||
|
|
||||||
## Inputs (specify using `with:`)
|
|
||||||
|
|
||||||
- `install_url`: specify URL to install Nix from (useful for testing non-stable releases or pinning Nix for example https://releases.nixos.org/nix/nix-2.3.7/install)
|
|
||||||
|
|
||||||
- `nix_path`: set `NIX_PATH` environment variable, for example `nixpkgs=channel:nixos-unstable`
|
|
||||||
|
|
||||||
- `extra_nix_config`: append to `/etc/nix/nix.conf`
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## FAQ
|
|
||||||
|
|
||||||
### How do I print nixpkgs version I have configured?
|
|
||||||
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Print nixpkgs version
|
|
||||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
|
||||||
```
|
|
||||||
|
|
||||||
### How can I run NixOS tests?
|
|
||||||
|
|
||||||
With the following inputs:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: cachix/install-nix-action@vXX
|
|
||||||
with:
|
|
||||||
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
|
|
||||||
```
|
|
||||||
|
|
||||||
[Note that there's no hardware acceleration on GitHub Actions.](https://github.com/actions/virtual-environments/issues/183#issuecomment-610723516).
|
|
||||||
|
|
||||||
### How can I install packages via nix-env from the specified `nix_path`?
|
|
||||||
|
|
||||||
```
|
|
||||||
nix-env -i mypackage -f '<nixpkgs>'
|
|
||||||
```
|
|
||||||
|
|
||||||
### How do I add a binary cache?
|
|
||||||
|
|
||||||
If the binary cache you want to add is hosted on [Cachix](https://cachix.org/) and you are
|
|
||||||
using [cachix-action](https://github.com/cachix/cachix-action), you
|
|
||||||
should use their `extraPullNames` input like this:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: cachix/cachix-action@vXX
|
|
||||||
with:
|
|
||||||
name: mycache
|
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
||||||
extraPullNames: nix-community
|
|
||||||
```
|
|
||||||
|
|
||||||
Otherwise, you can add any binary cache to nix.conf using
|
|
||||||
install-nix-action's own `extra_nix_config` input:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: cachix/install-nix-action@vXX
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
|
||||||
substituters = https://hydra.iohk.io https://cache.nixos.org/
|
|
||||||
```
|
|
||||||
|
|
||||||
## Hacking
|
## Hacking
|
||||||
|
|
||||||
Install the dependencies
|
Install the dependencies
|
||||||
|
10
action.yml
10
action.yml
@ -3,13 +3,9 @@ description: 'Installs Nix on GitHub Actions for the supported platforms: Linux
|
|||||||
author: 'Domen Kožar'
|
author: 'Domen Kožar'
|
||||||
inputs:
|
inputs:
|
||||||
install_url:
|
install_url:
|
||||||
description: 'Installation URL that will contain a script to install Nix.'
|
description: 'Installation URL that will contain a script to install Nix'
|
||||||
install_options:
|
skip_adding_nixpkgs_channel:
|
||||||
description: 'Additional installer flags passed to the installer script.'
|
description: 'Skip adding nixpkgs-unstable channel'
|
||||||
nix_path:
|
|
||||||
description: 'Set NIX_PATH environment variable.'
|
|
||||||
extra_nix_config:
|
|
||||||
description: 'gets appended to `/etc/nix/nix.conf` if passed.'
|
|
||||||
branding:
|
branding:
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
icon: 'sun'
|
icon: 'sun'
|
||||||
|
102
lib/create-darwin-volume.sh
Executable file
102
lib/create-darwin-volume.sh
Executable file
@ -0,0 +1,102 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
root_disks() {
|
||||||
|
diskutil list -plist /
|
||||||
|
}
|
||||||
|
|
||||||
|
apfs_volumes_for() {
|
||||||
|
disk=$1
|
||||||
|
diskutil apfs list -plist "$disk"
|
||||||
|
}
|
||||||
|
|
||||||
|
disk_identifier() {
|
||||||
|
xpath "/plist/dict/key[text()='WholeDisks']/following-sibling::array[1]/string/text()" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_get() {
|
||||||
|
key=$1 i=$2
|
||||||
|
xpath "/plist/dict/array/dict/key[text()='Volumes']/following-sibling::array/dict[$i]/key[text()='$key']/following-sibling::string[1]/text()" 2> /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
find_nix_volume() {
|
||||||
|
disk=$1
|
||||||
|
i=1
|
||||||
|
volumes=$(apfs_volumes_for "$disk")
|
||||||
|
while true; do
|
||||||
|
name=$(echo "$volumes" | volume_get "Name" "$i")
|
||||||
|
if [ -z "$name" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
case "$name" in
|
||||||
|
[Nn]ix*)
|
||||||
|
echo "$name"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
test_fstab() {
|
||||||
|
grep -q "/nix" /etc/fstab 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
test_synthetic_conf() {
|
||||||
|
grep -q "^nix" /etc/synthetic.conf 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
test_nix() {
|
||||||
|
test -d "/nix"
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
(
|
||||||
|
echo ""
|
||||||
|
echo " ------------------------------------------------------------------ "
|
||||||
|
echo " | This installer will create a volume for the nix store and |"
|
||||||
|
echo " | configure it to mount at /nix. Follow these steps to uninstall. |"
|
||||||
|
echo " ------------------------------------------------------------------ "
|
||||||
|
echo ""
|
||||||
|
echo " 1. Remove the entry from fstab using 'sudo vifs'"
|
||||||
|
echo " 2. Destroy the data volume using 'diskutil apfs deleteVolume'"
|
||||||
|
echo " 3. Delete /etc/synthetic.conf"
|
||||||
|
echo ""
|
||||||
|
) >&2
|
||||||
|
|
||||||
|
if [ -L "/nix" ]; then
|
||||||
|
echo "error: /nix is a symlink, please remove it or edit synthetic.conf (requires reboot)" >&2
|
||||||
|
echo " /nix -> $(readlink "/nix")" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! test_synthetic_conf; then
|
||||||
|
echo "Configuring /etc/synthetic.conf..." >&2
|
||||||
|
echo nix | sudo tee /etc/synthetic.conf
|
||||||
|
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -B
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! test_nix; then
|
||||||
|
echo "Creating mountpoint for /nix..." >&2
|
||||||
|
sudo mkdir /nix
|
||||||
|
fi
|
||||||
|
|
||||||
|
disk=$(root_disks | disk_identifier)
|
||||||
|
volume=$(find_nix_volume "$disk")
|
||||||
|
if [ -z "$volume" ]; then
|
||||||
|
echo "Creating a Nix Store volume..." >&2
|
||||||
|
sudo diskutil apfs addVolume "$disk" APFS 'Nix Store' -mountpoint /nix
|
||||||
|
volume="Nix Store"
|
||||||
|
else
|
||||||
|
echo "Using existing '$volume' volume" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! test_fstab; then
|
||||||
|
echo "Configuring /etc/fstab..." >&2
|
||||||
|
label=$(echo "$volume" | sed 's/ /\\040/g')
|
||||||
|
printf "\$a\nLABEL=%s /nix apfs rw\n.\nwq\n" "$label" | EDITOR=ed sudo vifs
|
||||||
|
sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
@ -1,43 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if type -p nix &>/dev/null ; then
|
|
||||||
echo "Aborting: Nix is already installed at $(type -p nix)"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure Nix
|
|
||||||
add_config() {
|
|
||||||
echo "$1" | tee -a /tmp/nix.conf >/dev/null
|
|
||||||
}
|
|
||||||
# Set jobs to number of cores
|
# Set jobs to number of cores
|
||||||
add_config "max-jobs = auto"
|
sudo sh -c 'echo max-jobs = auto >> /tmp/nix.conf'
|
||||||
# Allow binary caches for user
|
# Allow binary caches for runner user
|
||||||
add_config "trusted-users = root $USER"
|
sudo sh -c 'echo trusted-users = root runner >> /tmp/nix.conf'
|
||||||
# Append extra nix configuration if provided
|
|
||||||
if [[ $INPUT_EXTRA_NIX_CONFIG != "" ]]; then
|
if [[ $INPUT_SKIP_ADDING_NIXPKGS_CHANNEL = "true" ]]; then
|
||||||
add_config "$INPUT_EXTRA_NIX_CONFIG"
|
extra_cmd=--no-channel-add
|
||||||
|
else
|
||||||
|
extra_cmd=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Nix installer flags
|
sh <(curl -L ${INPUT_INSTALL_URL:-https://nixos.org/nix/install}) \
|
||||||
installer_options=(
|
--nix-extra-conf-file /tmp/nix.conf --darwin-use-unencrypted-nix-store-volume $extra_cmd
|
||||||
--daemon
|
|
||||||
--daemon-user-count 4
|
|
||||||
--no-channel-add
|
|
||||||
--darwin-use-unencrypted-nix-store-volume
|
|
||||||
--nix-extra-conf-file /tmp/nix.conf
|
|
||||||
)
|
|
||||||
if [[ $INPUT_INSTALL_OPTIONS != "" ]]; then
|
|
||||||
IFS=' ' read -r -a extra_installer_options <<< $INPUT_INSTALL_OPTIONS
|
|
||||||
installer_options=("${extra_installer_options[@]}" "${installer_options[@]}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "installer options: ${installer_options[@]}"
|
|
||||||
# On self-hosted runners we don't need to install more than once
|
|
||||||
if [[ ! -d /nix/store ]]
|
|
||||||
then
|
|
||||||
sh <(curl --retry 5 --retry-connrefused -L "${INPUT_INSTALL_URL:-https://nixos.org/nix/install}") "${installer_options[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $OSTYPE =~ darwin ]]; then
|
if [[ $OSTYPE =~ darwin ]]; then
|
||||||
# Disable spotlight indexing of /nix to speed up performance
|
# Disable spotlight indexing of /nix to speed up performance
|
||||||
@ -45,15 +21,14 @@ if [[ $OSTYPE =~ darwin ]]; then
|
|||||||
|
|
||||||
# macOS needs certificates hints
|
# macOS needs certificates hints
|
||||||
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
|
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
|
||||||
echo "NIX_SSL_CERT_FILE=$cert_file" >> "$GITHUB_ENV"
|
echo "::set-env name=NIX_SSL_CERT_FILE::$cert_file"
|
||||||
export NIX_SSL_CERT_FILE=$cert_file
|
export NIX_SSL_CERT_FILE=$cert_file
|
||||||
sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file"
|
sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set paths
|
# Set paths
|
||||||
echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH"
|
echo "::add-path::/nix/var/nix/profiles/per-user/runner/profile/bin"
|
||||||
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
|
echo "::add-path::/nix/var/nix/profiles/default/bin"
|
||||||
|
if [[ $INPUT_SKIP_ADDING_NIXPKGS_CHANNEL != "true" ]]; then
|
||||||
if [[ $INPUT_NIX_PATH != "" ]]; then
|
echo "::set-env name=NIX_PATH::/nix/var/nix/profiles/per-user/root/channels"
|
||||||
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"
|
|
||||||
fi
|
fi
|
@ -20,7 +20,7 @@
|
|||||||
"author": "Domen Kožar",
|
"author": "Domen Kožar",
|
||||||
"license": "ASL2",
|
"license": "ASL2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.1.0",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
"@actions/tool-cache": "^1.1.2"
|
"@actions/tool-cache": "^1.1.2"
|
||||||
},
|
},
|
||||||
|
5
test.nix
5
test.nix
@ -2,15 +2,12 @@
|
|||||||
{ size ? 1 # MB
|
{ size ? 1 # MB
|
||||||
, num ? 10 # count
|
, num ? 10 # count
|
||||||
, currentTime ? builtins.currentTime
|
, currentTime ? builtins.currentTime
|
||||||
, noChroot ? false
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with import <nixpkgs> {};
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
let
|
let
|
||||||
drv = i: runCommand "${toString currentTime}-${toString i}" {
|
drv = i: runCommand "${toString currentTime}-${toString i}" {} ''
|
||||||
__noChroot = noChroot;
|
|
||||||
} ''
|
|
||||||
dd if=/dev/zero of=$out bs=${toString size}MB count=1
|
dd if=/dev/zero of=$out bs=${toString size}MB count=1
|
||||||
'';
|
'';
|
||||||
in writeText "empty-${toString num}-${toString size}MB" ''
|
in writeText "empty-${toString num}-${toString size}MB" ''
|
||||||
|
89
yarn.lock
89
yarn.lock
@ -2,10 +2,10 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@actions/core@^1.1.0", "@actions/core@^1.2.6":
|
"@actions/core@^1.1.0":
|
||||||
version "1.2.6"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.6.tgz#a78d49f41a4def18e88ce47c2cac615d5694bf09"
|
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.1.1.tgz#e08f3dbfe04721bb3d040f8fca2d6d7e1817b2e1"
|
||||||
integrity sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==
|
integrity sha512-O5G6EmlzTVsng7VSpNtszIoQq6kOgMGNTFB/hmwKNNA4V71JyxImCIrL27vVHCt2Cb3ImkaCr6o27C2MV9Ylwg==
|
||||||
|
|
||||||
"@actions/exec@^1.0.1":
|
"@actions/exec@^1.0.1":
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
@ -803,6 +803,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
|
|||||||
dependencies:
|
dependencies:
|
||||||
delayed-stream "~1.0.0"
|
delayed-stream "~1.0.0"
|
||||||
|
|
||||||
|
commander@~2.20.0:
|
||||||
|
version "2.20.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.1.tgz#3863ce3ca92d0831dcf2a102f5fb4b5926afd0f9"
|
||||||
|
integrity sha512-cCuLsMhJeWQ/ZpsFTbE765kvVfoeSddc4nU3up4fV+fDBcfUXnbITJ+JzhkdjzOqhURjZgujxaioam4RM9yGUg==
|
||||||
|
|
||||||
component-emitter@^1.2.1:
|
component-emitter@^1.2.1:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
|
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
|
||||||
@ -1313,14 +1318,13 @@ growly@^1.3.0:
|
|||||||
integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=
|
integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=
|
||||||
|
|
||||||
handlebars@^4.1.2:
|
handlebars@^4.1.2:
|
||||||
version "4.7.7"
|
version "4.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
|
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.0.tgz#22e1a897c5d83023d39801f35f6b65cf97ed8b25"
|
||||||
integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
|
integrity sha512-xkRtOt3/3DzTKMOt3xahj2M/EqNhY988T+imYSlMgs5fVhLN2fmKVVj0LtEGmb+3UUYV5Qmm1052Mm3dIQxOvw==
|
||||||
dependencies:
|
dependencies:
|
||||||
minimist "^1.2.5"
|
|
||||||
neo-async "^2.6.0"
|
neo-async "^2.6.0"
|
||||||
|
optimist "^0.6.1"
|
||||||
source-map "^0.6.1"
|
source-map "^0.6.1"
|
||||||
wordwrap "^1.0.0"
|
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
uglify-js "^3.1.4"
|
uglify-js "^3.1.4"
|
||||||
|
|
||||||
@ -1391,9 +1395,9 @@ has@^1.0.1, has@^1.0.3:
|
|||||||
function-bind "^1.1.1"
|
function-bind "^1.1.1"
|
||||||
|
|
||||||
hosted-git-info@^2.1.4:
|
hosted-git-info@^2.1.4:
|
||||||
version "2.8.9"
|
version "2.8.4"
|
||||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
|
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546"
|
||||||
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==
|
integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ==
|
||||||
|
|
||||||
html-encoding-sniffer@^1.0.2:
|
html-encoding-sniffer@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
@ -1452,9 +1456,9 @@ inherits@2, inherits@~2.0.3:
|
|||||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
|
|
||||||
ini@~1.3.0:
|
ini@~1.3.0:
|
||||||
version "1.3.8"
|
version "1.3.5"
|
||||||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
||||||
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
|
||||||
|
|
||||||
invariant@^2.2.4:
|
invariant@^2.2.4:
|
||||||
version "2.2.4"
|
version "2.2.4"
|
||||||
@ -2221,9 +2225,9 @@ lodash.sortby@^4.7.0:
|
|||||||
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
|
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
|
||||||
|
|
||||||
lodash@^4.17.11, lodash@^4.17.13:
|
lodash@^4.17.11, lodash@^4.17.13:
|
||||||
version "4.17.21"
|
version "4.17.15"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
|
||||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
|
||||||
|
|
||||||
loose-envify@^1.0.0:
|
loose-envify@^1.0.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
@ -2312,10 +2316,15 @@ minimist@0.0.8:
|
|||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
|
||||||
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
|
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
|
||||||
|
|
||||||
minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5:
|
minimist@^1.1.1, minimist@^1.2.0:
|
||||||
version "1.2.5"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
|
||||||
|
|
||||||
|
minimist@~0.0.1:
|
||||||
|
version "0.0.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
|
||||||
|
integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
|
||||||
|
|
||||||
minipass@^2.6.0, minipass@^2.8.6:
|
minipass@^2.6.0, minipass@^2.8.6:
|
||||||
version "2.8.6"
|
version "2.8.6"
|
||||||
@ -2402,9 +2411,9 @@ needle@^2.2.1:
|
|||||||
sax "^1.2.4"
|
sax "^1.2.4"
|
||||||
|
|
||||||
neo-async@^2.6.0:
|
neo-async@^2.6.0:
|
||||||
version "2.6.2"
|
version "2.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
|
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
|
||||||
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
|
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
|
||||||
|
|
||||||
nice-try@^1.0.4:
|
nice-try@^1.0.4:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
@ -2571,6 +2580,14 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
|
optimist@^0.6.1:
|
||||||
|
version "0.6.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
|
||||||
|
integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY=
|
||||||
|
dependencies:
|
||||||
|
minimist "~0.0.1"
|
||||||
|
wordwrap "~0.0.2"
|
||||||
|
|
||||||
optionator@^0.8.1:
|
optionator@^0.8.1:
|
||||||
version "0.8.2"
|
version "0.8.2"
|
||||||
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
|
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
|
||||||
@ -3442,9 +3459,12 @@ typescript@^3.5.1:
|
|||||||
integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==
|
integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==
|
||||||
|
|
||||||
uglify-js@^3.1.4:
|
uglify-js@^3.1.4:
|
||||||
version "3.13.5"
|
version "3.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
|
||||||
integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==
|
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==
|
||||||
|
dependencies:
|
||||||
|
commander "~2.20.0"
|
||||||
|
source-map "~0.6.1"
|
||||||
|
|
||||||
underscore@1.8.3:
|
underscore@1.8.3:
|
||||||
version "1.8.3"
|
version "1.8.3"
|
||||||
@ -3589,7 +3609,12 @@ wide-align@^1.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
string-width "^1.0.2 || 2"
|
string-width "^1.0.2 || 2"
|
||||||
|
|
||||||
wordwrap@^1.0.0, wordwrap@~1.0.0:
|
wordwrap@~0.0.2:
|
||||||
|
version "0.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
|
||||||
|
integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
|
||||||
|
|
||||||
|
wordwrap@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||||
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
|
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
|
||||||
@ -3630,9 +3655,9 @@ xml-name-validator@^3.0.0:
|
|||||||
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
|
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
|
||||||
|
|
||||||
y18n@^4.0.0:
|
y18n@^4.0.0:
|
||||||
version "4.0.1"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
|
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
|
||||||
integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
|
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
|
||||||
|
|
||||||
yallist@^3.0.0, yallist@^3.0.3:
|
yallist@^3.0.0, yallist@^3.0.3:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
Reference in New Issue
Block a user