Skip to content

Humblr

Humblr #35

Workflow file for this run

name: "Humblr"
on:
schedule:
- cron: "0 2 * * *"
pull_request:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = ${{ vars.CACHE_TRUSTED_PUBLIC_KEYS }}
substituters = ${{ vars.CACHE_SUBSTITUTERS }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: dandart
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build
run: |
nix-build
deploy-ghc94:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = ${{ vars.CACHE_TRUSTED_PUBLIC_KEYS }}
substituters = ${{ vars.CACHE_SUBSTITUTERS }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: dandart
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Push dependencies to Cachix (GHC 9.4)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc94 --add-root result/shell --indirect) | cachix push dandart
- name: Push dependencies to private cache (GHC 9.4)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc94 --add-root result/shell --indirect) | xargs nix-copy-closure --gzip -s --include-outputs ${{ vars.CACHE_USER }}@${{ vars.CACHE_SERVER }}
deploy-ghc92:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = ${{ vars.CACHE_TRUSTED_PUBLIC_KEYS }}
substituters = ${{ vars.CACHE_SUBSTITUTERS }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: dandart
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Push dependencies to Cachix (GHC 9.2)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc92 --add-root result/shell --indirect) | cachix push dandart
- name: Push dependencies to private cache (GHC 9.2)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc92 --add-root result/shell --indirect) | xargs nix-copy-closure --gzip -s --include-outputs ${{ vars.CACHE_USER }}@${{ vars.CACHE_SERVER }}
deploy-ghc90:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = ${{ vars.CACHE_TRUSTED_PUBLIC_KEYS }}
substituters = ${{ vars.CACHE_SUBSTITUTERS }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: dandart
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Push dependencies to Cachix (GHC 9.0)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc90 --add-root result/shell --indirect) | cachix push dandart
- name: Push dependencies to private cache (GHC 9.0)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc90 --add-root result/shell --indirect) | xargs nix-copy-closure --gzip -s --include-outputs ${{ vars.CACHE_USER }}@${{ vars.CACHE_SERVER }}
deploy-ghc810:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = ${{ vars.CACHE_TRUSTED_PUBLIC_KEYS }}
substituters = ${{ vars.CACHE_SUBSTITUTERS }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: dandart
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Push dependencies to Cachix (GHC 8.10)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc810 --add-root result/shell --indirect) | cachix push dandart
- name: Push dependencies to private cache (GHC 8.10)
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --argstr compiler ghc810 --add-root result/shell --indirect) | xargs nix-copy-closure --gzip -s --include-outputs ${{ vars.CACHE_USER }}@${{ vars.CACHE_SERVER }}