Merge request #766 CI: GitHub: add Nixpkgs integration test
This is a tiny project that I want eventually to move into the group. Details: https://github.com/Anton-Latukha/test-haskell-nixpkgs-integration-action Implementation gist: https://github.com/Anton-Latukha/test-haskell-nixpkgs-integration-action/blob/main/run-action.sh This test is to run before release - to know if the project works clean in Nixpkgs, or needs overrides there.
This commit is contained in:
commit
fae8c24e8f
|
@ -12,7 +12,7 @@ on:
|
|||
jobs:
|
||||
|
||||
build10:
|
||||
name: GHC
|
||||
name: "GHC"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -21,7 +21,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Cache of ~/.cabal/packages, ~/.cabal/store and dist-newstyle
|
||||
- name: "Cache of ~/.cabal/packages, ~/.cabal/store and dist-newstyle"
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
|
@ -32,10 +32,10 @@ jobs:
|
|||
- uses: actions/setup-haskell@v1
|
||||
with:
|
||||
ghc-version: ${{ matrix.ghc }}
|
||||
- name: Install additional system packages
|
||||
- name: "Install additional system packages"
|
||||
run: sudo apt install libsodium-dev
|
||||
# 2020-08-01: NOTE: Nix instantiate still needed for HNix tests
|
||||
- name: Install Nix
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v12
|
||||
- run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic
|
||||
- run: cabal v2-build
|
||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Install doctoc
|
||||
- name: "Install doctoc"
|
||||
run: |
|
||||
sudo npm install -g doctoc
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -22,10 +22,10 @@ jobs:
|
|||
# 2020-09-29: Official doc:
|
||||
# "In non-push events, such as pull_request, make sure to specify the ref to checkout:'
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Generate the idenpotent TOC
|
||||
- name: "Generate the idenpotent TOC"
|
||||
run: |
|
||||
doctoc --github --notitle README.md
|
||||
- name: Commit and push changes
|
||||
- name: "Commit and push changes"
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_author: "Anton Latukha <anton@latukha.com>"
|
||||
|
|
|
@ -8,7 +8,7 @@ on:
|
|||
jobs:
|
||||
|
||||
build10:
|
||||
name: GHC
|
||||
name: "GHC"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -29,10 +29,10 @@ jobs:
|
|||
- uses: actions/setup-haskell@v1
|
||||
with:
|
||||
ghc-version: ${{ matrix.ghc }}
|
||||
- name: Install additional system packages
|
||||
- name: "Install additional system packages"
|
||||
run: sudo apt install libsodium-dev
|
||||
# 2020-08-01: NOTE: Nix instantiate still needed for HNix tests
|
||||
- name: Install Nix
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v12
|
||||
- run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic
|
||||
- run: cabal v2-build
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
name: "Direct import & build inside Nixpkgs"
|
||||
|
||||
on:
|
||||
release:
|
||||
# created: a draft is saved, or a release or pre-release is published without previously being saved as a draft
|
||||
types: [ created ]
|
||||
|
||||
jobs:
|
||||
|
||||
build10:
|
||||
name: "Clean integration test"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Git checkout"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Local cache"
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
/nix/store
|
||||
key: ${{ runner.os }}-Nixpkgs-integration-test
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: "nixpkgs=channel:nixos-unstable"
|
||||
- name: "Run Nixpkgs integration test"
|
||||
uses: Anton-Latukha/test-haskell-nixpkgs-integration-action@v1
|
|
@ -24,18 +24,18 @@ jobs:
|
|||
runs-on: macos-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Git checkout
|
||||
- name: "Git checkout"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Nix
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Install Cachix
|
||||
- name: "Install Cachix"
|
||||
uses: cachix/cachix-action@v7
|
||||
with:
|
||||
name: ${{ env.cachixAccount }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- name: Determined Nix-build
|
||||
- name: "Determined Nix-build"
|
||||
run: ./build.sh
|
||||
|
|
|
@ -62,20 +62,20 @@ jobs:
|
|||
# 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
|
||||
- name: "Git checkout"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Nix
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Install Cachix
|
||||
- name: "Install Cachix"
|
||||
uses: cachix/cachix-action@v7
|
||||
with:
|
||||
name: ${{ env.cachixAccount }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- name: Determined Nix-build
|
||||
- name: "Determined Nix-build"
|
||||
env:
|
||||
compiler: "default"
|
||||
buildStrictly: "true"
|
||||
|
@ -87,20 +87,20 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Git checkout
|
||||
- name: "Git checkout"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Nix
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Install Cachix
|
||||
- name: "Install Cachix"
|
||||
uses: cachix/cachix-action@v7
|
||||
with:
|
||||
name: ${{ env.cachixAccount }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- name: Determined Nix-build
|
||||
- name: "Determined Nix-build"
|
||||
env:
|
||||
compiler: "ghc8101"
|
||||
buildFromSdist: "true"
|
||||
|
@ -119,22 +119,22 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Git checkout
|
||||
- name: "Git checkout"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Nix
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Install Cachix
|
||||
- name: "Install Cachix"
|
||||
uses: cachix/cachix-action@v7
|
||||
with:
|
||||
name: ${{ env.cachixAccount }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- name: Nix-shell
|
||||
- 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
|
||||
- name: "Local Hoogle DB for the project development and tooling"
|
||||
run: nix-shell --pure --command 'hoogle True'
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue