Skip to content

Commit

Permalink
Merge pull request haskell-nix#9 from Anton-Latukha/2020-07-07-solidi…
Browse files Browse the repository at this point in the history
…fy-work

Solidify work
  • Loading branch information
Anton-Latukha authored Jul 7, 2020
2 parents 7b51ea7 + 44cfe89 commit 1692d7f
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 50 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/Nixpkgs-GHCJS.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: "Nixpkgs, GHCJS, Linux"

on:
# On Git changes in PR
pull_request:
# On Git changes of the master
push:
branches:
- master
schedule:
# Every day at 03:45
# Every day at 05:45
- cron: "45 05 * * *"

env:
useRev: "true"
rev: "nixos-unstable"
linkWithGold: "true"
compiler: "ghcjs"
ghcjsTmpLogFile: "/tmp/ghcjsTmpLogFile.log"
ghcjsLogTailLength: "10000"

jobs:
build10:
name: GHCJS
name: Build
runs-on: ubuntu-latest
continue-on-error: true
steps:
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/Nixpkgs-Linux-additional.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: "Nixpkgs, Linux, additional"


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 06 * * *"


env:
###
### NOTE: This configuration uses `build.sh` interface, which uses `default.nix` interface, which exposes the Nixpkgs Haskell Lib interface.
###
### 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
###
useRev: "true"
rev: "nixos-unstable"
linkWithGold: "true"


jobs:

build40:
name: "Nixpkgs-unstable channel, default GHC (8.8.3)"
runs-on: ubuntu-latest
continue-on-error: true
env:
rev: "nixpkgs-unstable"
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v10
- name: Determined nix-build
run: ./build.sh

build50:
name: "NixOS-unstable channel, GHC 8.6.5"
runs-on: ubuntu-latest
continue-on-error: true
env:
compiler: "ghc865"
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v10
- name: Determined nix-build
run: ./build.sh

build60:
name: "NixOS-unstable channel, GHC 8.4.4"
runs-on: ubuntu-latest
continue-on-error: true
env:
compiler: "ghc844"
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v10
- name: Determined nix-build
run: ./build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: "Nixpkgs, GHC, Linux"
name: "Nixpkgs, Linux, main"

# When to trigger builds
on:
# On Git changes in PR
pull_request:
Expand All @@ -10,6 +12,7 @@ on:
# Every day at 03:45
- cron: "45 03 * * *"


env:
###
### NOTE: This configuration uses `build.sh` interface, which uses `default.nix` interface, which exposes the Nixpkgs Haskell Lib interface.
Expand Down Expand Up @@ -49,15 +52,13 @@ env:
generateOptparseApplicativeCompletions: "false"
executableNamesToShellComplete: '[ "replaceWithExecutableName" ]'


jobs:

# Basic example
# NOTE: Basic example
build10:
name: "Nixpkgs-unstable channel, default GHC (8.8.3)"
name: "NixOS-unstable channel, Strict build, default GHC (8.8.3)"
runs-on: ubuntu-latest
continue-on-error: true
env:
rev: "nixpkgs-unstable"
steps:
- name: Git checkout
uses: actions/checkout@v2
Expand All @@ -66,12 +67,10 @@ jobs:
- name: Determined nix-build
run: ./build.sh


# Example of customization using Nixpkgs Haskell Lib API
# NOTE: Example of customization using Nixpkgs Haskell Lib API
build20:
name: "Release-quality test, SDist, Optimization, Benchmark, Haddock, GHC 8.10.1, Nix shell"
runs-on: ubuntu-latest
continue-on-error: true
env:
compiler: "ghc8101"
buildFromSdist: "true"
Expand All @@ -89,27 +88,11 @@ jobs:
uses: cachix/install-nix-action@v10
- name: Determined nix-build
run: ./build.sh
- name: Test Nix-shell
run: nix-shell --command 'echo Succesfully evaluated, loaded and entered $IN_NIX_SHELL Nix shell env.'

# Other samples of tests used in the project
# NOTE: Build on latest stable NixOS release
build30:
name: "NixOS-unstable channel, Strict build, default GHC (8.8.3)"
runs-on: ubuntu-latest
continue-on-error: true
env:
buildStrictly: "true"
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v10
- name: Determined nix-build
run: ./build.sh
build40:
name: "NixOS 20.03 stable channel, default GHC (8.8.3)"