2019-10-02 14:06:28 +00:00
|
|
|
name: "install-nix-action test"
|
2019-09-29 19:52:02 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
2020-09-21 14:41:22 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2020-05-28 14:25:05 +00:00
|
|
|
|
2024-05-15 09:28:22 +00:00
|
|
|
env:
|
2024-12-31 09:11:14 +00:00
|
|
|
nixpkgs_channel: nixpkgs=channel:nixos-24.11
|
2024-05-15 10:54:08 +00:00
|
|
|
oldest_supported_installer: nix-2.8.0
|
2024-05-15 09:28:22 +00:00
|
|
|
|
2019-09-29 19:52:02 +00:00
|
|
|
jobs:
|
2020-05-27 11:17:01 +00:00
|
|
|
simple-build:
|
2019-09-29 19:52:02 +00:00
|
|
|
strategy:
|
2024-05-15 09:23:14 +00:00
|
|
|
fail-fast: false
|
2019-09-29 19:52:02 +00:00
|
|
|
matrix:
|
2024-05-15 09:23:14 +00:00
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- macos-13
|
2019-09-29 19:52:02 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-09-05 00:11:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2019-09-29 19:52:02 +00:00
|
|
|
- name: Install Nix
|
|
|
|
uses: ./
|
2020-09-21 11:51:23 +00:00
|
|
|
with:
|
2024-05-15 09:28:22 +00:00
|
|
|
nix_path: ${{ env.nixpkgs_channel }}
|
2020-05-27 11:17:01 +00:00
|
|
|
- run: nix-env -iA cachix -f https://cachix.org/api/v1/install
|
2019-11-19 11:03:06 +00:00
|
|
|
- run: cat /etc/nix/nix.conf
|
|
|
|
# cachix should be available and be able to configure a cache
|
2019-11-19 11:35:01 +00:00
|
|
|
- run: cachix use cachix
|
2020-05-12 10:42:14 +00:00
|
|
|
- run: nix-build test.nix
|
2024-05-15 09:23:14 +00:00
|
|
|
|
2020-05-28 14:25:05 +00:00
|
|
|
custom-nix-path:
|
|
|
|
strategy:
|
2024-05-15 09:23:14 +00:00
|
|
|
fail-fast: false
|
2020-05-28 14:25:05 +00:00
|
|
|
matrix:
|
2024-05-15 09:23:14 +00:00
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- macos-13
|
2020-05-28 14:25:05 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-09-05 00:11:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-05-28 14:25:05 +00:00
|
|
|
- name: Install Nix
|
|
|
|
uses: ./
|
|
|
|
with:
|
2024-05-15 09:28:22 +00:00
|
|
|
nix_path: ${{ env.nixpkgs_channel }}
|
|
|
|
- run: test $NIX_PATH == '${{ env.nixpkgs_channel }}'
|
2020-05-28 14:25:05 +00:00
|
|
|
- run: nix-build test.nix
|
2020-08-25 16:13:35 +00:00
|
|
|
|
|
|
|
extra-nix-config:
|
|
|
|
strategy:
|
2024-05-15 09:23:14 +00:00
|
|
|
fail-fast: false
|
2020-08-25 16:13:35 +00:00
|
|
|
matrix:
|
2024-05-15 09:23:14 +00:00
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- macos-13
|
2020-08-25 16:13:35 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-09-05 00:11:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-08-25 16:13:35 +00:00
|
|
|
- name: Install Nix
|
|
|
|
uses: ./
|
2022-03-30 15:17:54 +00:00
|
|
|
with:
|
2024-05-15 09:28:22 +00:00
|
|
|
nix_path: ${{ env.nixpkgs_channel }}
|
2020-08-25 16:13:35 +00:00
|
|
|
extra_nix_config: |
|
2020-08-25 16:20:10 +00:00
|
|
|
sandbox = relaxed
|
2020-08-25 16:13:35 +00:00
|
|
|
- run: cat /etc/nix/nix.conf
|
|
|
|
- run: nix-build test.nix --arg noChroot true
|
2020-11-04 11:19:16 +00:00
|
|
|
|
|
|
|
flakes:
|
|
|
|
strategy:
|
2024-05-15 09:23:14 +00:00
|
|
|
fail-fast: false
|
2020-11-04 11:19:16 +00:00
|
|
|
matrix:
|
2024-05-15 09:23:14 +00:00
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- macos-13
|
2020-11-04 11:19:16 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-09-05 00:11:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-04 11:19:16 +00:00
|
|
|
- name: Install Nix
|
|
|
|
uses: ./
|
|
|
|
- run: nix flake show github:NixOS/nixpkgs
|
2021-02-21 14:00:04 +00:00
|
|
|
|
2024-12-31 08:55:55 +00:00
|
|
|
latest-installer:
|
2021-02-21 14:00:04 +00:00
|
|
|
strategy:
|
2024-05-15 09:23:14 +00:00
|
|
|
fail-fast: false
|
2021-02-21 14:00:04 +00:00
|
|
|
matrix:
|
2024-12-31 08:55:55 +00:00
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
system: x86_64-linux
|
|
|
|
- os: macos-latest
|
|
|
|
system: aarch64-darwin
|
|
|
|
- os: macos-13
|
|
|
|
system: x86_64-darwin
|
2021-02-21 14:00:04 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-09-05 00:11:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-12-31 08:55:55 +00:00
|
|
|
- name: Run NAR server
|
|
|
|
run: |
|
|
|
|
curl --location https://github.com/cachix/nar-toolbox/releases/download/v0.1.0/nar-toolbox-${{ matrix.system }} -O
|
|
|
|
chmod +x ./nar-toolbox-${{ matrix.system }}
|
|
|
|
./nar-toolbox-${{ matrix.system }} serve https://cache.nixos.org &
|
2021-02-21 14:00:04 +00:00
|
|
|
- name: Install Nix
|
|
|
|
uses: ./
|
2022-03-30 15:17:54 +00:00
|
|
|
with:
|
2024-05-15 09:28:22 +00:00
|
|
|
nix_path: ${{ env.nixpkgs_channel }}
|
2024-12-31 08:55:55 +00:00
|
|
|
install_url: https://hydra.nixos.org/job/nix/master/installerScript/latest-finished/download/1/install
|
|
|
|
install_options: "--tarball-url-prefix http://localhost:8080"
|
2021-02-21 14:00:04 +00:00
|
|
|
- run: nix-build test.nix
|
2021-11-05 21:28:02 +00:00
|
|
|
|
|
|
|
oldest-supported-installer:
|
|
|
|
strategy:
|
2024-05-15 09:23:14 +00:00
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- macos-13
|
2021-11-05 21:28:02 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-09-05 00:11:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-11-05 21:28:02 +00:00
|
|
|
- name: Install Nix
|
|
|
|
uses: ./
|
|
|
|
with:
|
2024-05-15 09:28:22 +00:00
|
|
|
nix_path: ${{ env.nixpkgs_channel }}
|
2024-05-15 10:54:08 +00:00
|
|
|
install_url: https://releases.nixos.org/nix/${{ env.oldest_supported_installer }}/install
|
2021-11-05 21:28:02 +00:00
|
|
|
- run: nix-build test.nix
|
2021-11-15 14:09:45 +00:00
|
|
|
|
2022-03-30 15:17:54 +00:00
|
|
|
act-support:
|
2021-11-15 14:09:45 +00:00
|
|
|
strategy:
|
2024-05-15 09:23:14 +00:00
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2021-11-15 14:09:45 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-09-05 00:11:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-10-12 13:05:04 +00:00
|
|
|
- run: curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
|
2024-12-31 09:00:44 +00:00
|
|
|
- run: docker pull ghcr.io/catthehacker/ubuntu:js-24.04
|
|
|
|
- run: |
|
|
|
|
./bin/act push \
|
|
|
|
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-24.04 \
|
|
|
|
-j simple-build \
|
|
|
|
--matrix os:ubuntu-latest
|