single metafile #76
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |
- uses: ./copy-root-aws-credentials | |
- name: Attempt to build a new derivation with Nix | |
run: | | |
nix-build -E '(import <nixpkgs> {}).writeText "build-example" (builtins.toString builtins.currentTime)' | |
- name: Attempt to fetch an existing cache entry | |
run: | | |
nix-build -E '(import <nixpkgs> {}).runCommand "fetch-example" {} "echo Example > $out"' | |
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 }} | |
- uses: ./copy-root-aws-credentials | |
- name: Attempt to build a new derivation with Nix | |
run: | | |
nix-build -E '(import <nixpkgs> {}).writeText "build-example" (builtins.toString builtins.currentTime)' | |
- name: Attempt to fetch an existing cache entry | |
run: | | |
nix-build -E '(import <nixpkgs> {}).runCommand "fetch-example" {} "echo Example > $out"' |