Skip to content

Allow customizing the nix.conf through action inputs (#6) #82

Allow customizing the nix.conf through action inputs (#6)

Allow customizing the nix.conf through action inputs (#6) #82

Workflow file for this run

name: Test the GitHub action of this repository
on: [push]
jobs:
test-build-and-cache-by-root:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, mac-m1]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- # For an external repo wishing to use this action, the uses field needs to be:
# uses: kadena-io/setup-nix-with-cache/by-root@{The version you want to use}
uses: ./by-root
with:
cache_url: s3://nodemon-nix-cache?region=us-east-1
signing_private_key: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
additional_experimental_features: recursive-nix
- uses: ./copy-root-aws-credentials
- name: Attempt to build a new derivation with Nix
run: |
nix-build .github/workflows/test.nix -A alwaysNewDerivation
- name: Attempt to fetch an existing cache entry
run: |
nix-build .github/workflows/test.nix -A constantDerivation
- name: Test the recursive-nix additional_experimental_features flag
run: |
nix-build .github/workflows/test.nix -A recursiveNixDerivation
test-build-and-cache-by-runner:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, mac-m1]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- uses: ./by-runner
with:
cache_url: s3://nodemon-nix-cache?region=us-east-1
signing_private_key: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
additional_experimental_features: recursive-nix
- uses: ./copy-root-aws-credentials
- name: Attempt to build a new derivation with Nix
run: |
nix-build .github/workflows/test.nix -A alwaysNewDerivation
- name: Attempt to fetch an existing cache entry
run: |
nix-build .github/workflows/test.nix -A constantDerivation
- name: Test the recursive-nix additional_experimental_features flag
run: |
nix-build .github/workflows/test.nix -A recursiveNixDerivation