Separated nix logic
This commit is contained in:
parent
1e4b4c2653
commit
2c487e81cb
2 changed files with 26 additions and 37 deletions
40
.github/workflows/integrate.yaml
vendored
40
.github/workflows/integrate.yaml
vendored
|
|
@ -17,56 +17,22 @@ on:
|
|||
jobs:
|
||||
check-formatting:
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./prepare-nix.yml
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: cachix/install-nix-action@v16
|
||||
name: Set up Nix and IOHK caches
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
|
||||
experimental-features = nix-command flakes
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
name: mlabs
|
||||
authToken: ${{ secrets.CACHIX_KEY }}
|
||||
|
||||
- run: ./.github/format.sh
|
||||
name: Run fourmolu
|
||||
|
||||
run-linter:
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./prepare-nix.yml
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: cachix/install-nix-action@v16
|
||||
name: Set up Nix and IOHK caches
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- run: nix run nixpkgs#hlint -- $(git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.hs')
|
||||
name: Run hlint
|
||||
|
||||
check-build:
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./prepare-nix.yml
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: cachix/install-nix-action@v16
|
||||
name: Set up Nix and IOHK caches
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
|
||||
experimental-features = nix-command flakes
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
name: mlabs
|
||||
authToken: ${{ secrets.CACHIX_KEY }}
|
||||
- name: Add cabal folder to cache
|
||||
id: cabal
|
||||
uses: actions/cache@v2.1.4
|
||||
|
|
|
|||
23
.github/workflows/prepare-nix.yml
vendored
Normal file
23
.github/workflows/prepare-nix.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
CACHIX_KEY:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
prepare_nix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: cachix/install-nix-action@v16
|
||||
name: Set up Nix and IOHK caches
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
|
||||
experimental-features = nix-command flakes
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
name: mlabs
|
||||
authToken: ${{ secrets.CACHIX_KEY }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue