Skip to content

(Optional) Nix dev env, Linux, main #2671

(Optional) Nix dev env, Linux, main

(Optional) Nix dev env, Linux, main #2671

name: "(Optional) Nix dev env, Linux, main"
# When to trigger builds
on:
# On Git changes in PR
pull_request:
# On Git changes of the master
push:
branches:
- master
schedule:
# Every day at 03:45
- cron: "45 03 * * *"
env:
###
### NOTE: Table example of the provided build configuration keys
### Infrastructure uses `build.sh` API, which uses `default.nix` API, which exposes the almost literal Nixpkgs Haskell Lib API wich was abstracted for use outside of Nix language.
###
### Documentation of this settings is mosly in `default.nix`, since most settings it Nixpkgs related
### and the other part of keys explained in `build.sh`, since those address external procedures aound the builds.
### Additional documentation is in Nixpkgs Haskell.lib: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix
###
rev: "c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad"
cachixAccount: "hnix"
CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }}
allowInconsistentDependencies: "false"
doJailbreak: "false"
doCheck: "false"
sdistTarball: "false"
buildFromSdist: "false"
buildStrictly: "false"
failOnAllWarnings: "false"
enableDeadCodeElimination: "false"
disableOptimization: "true"
linkWithGold: "true"
enableLibraryProfiling: "false"
enableExecutableProfiling: "false"
doTracing: "false"
enableDWARFDebugging: "false"
doStrip: "false"
enableSharedLibraries: "true"
enableStaticLibraries: "false"
enableSharedExecutables: "false"
justStaticExecutables: "false"
enableSeparateBinOutput: "false"
checkUnusedPackages: "false"
doHaddock: "false"
doHyperlinkSource: "false"
doCoverage: "false"
doBenchmark: "false"
generateOptparseApplicativeCompletions: "false"
executableNamesToShellComplete: '[ "hnix" ]'
jobs:
# 2020-12-29: NOTE: Make builds strict again!
build10:
name: "Nixpkgs GHC 8.8"
runs-on: ubuntu-latest
# 2020-08-01: NOTE: Due to Nixpkgs brittleness to not block project development Nixpkgs made optional, see commit message for more info
continue-on-error: true
steps:
- name: "Git checkout"
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Install Nix"
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: "Install Cachix"
uses: cachix/cachix-action@v14
with:
name: ${{ env.cachixAccount }}
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: "Determined Nix-build"
env:
compiler: "ghc884"
run: ./build.sh
build20:
name: "Nixpkgs GHC (8.10), strict quality build, SDist, Optimizations, Benchmark, Haddock, Completions"
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: "Git checkout"
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Install Nix"
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: "Install Cachix"
uses: cachix/cachix-action@v14
with:
name: ${{ env.cachixAccount }}
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: "Determined Nix-build"
env:
compiler: "ghc8107"
buildFromSdist: "true"
buildStrictly: "true"
linkWithGold: "true"
doHaddock: "true"
doHyperlinkSource: "true"
disableOptimization: "false"
enableDeadCodeElimination: "true"
doBenchmark: "true"
generateOptparseApplicativeCompletions: "true"
run: ./build.sh
build40:
name: "Nix-shell & supplied locall project Hoogle DB"
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: "Git checkout"
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Install Nix"
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: "Install Cachix"
uses: cachix/cachix-action@v14
with:
name: ${{ env.cachixAccount }}
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: "Nix-shell"
run: nix-shell --pure --command 'echo "Evaluated, loaded and entered $IN_NIX_SHELL Nix shell env."'
- name: "Local Hoogle DB for the project development and tooling"
run: nix-shell --pure --command 'hoogle True'