Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed May 29, 2023
1 parent a6283f6 commit c250b3c
Show file tree
Hide file tree
Showing 5 changed files with 807 additions and 4,298 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/ci.yaml
Expand Up @@ -22,11 +22,10 @@ jobs:
fetch-depth: 0

- name: Prepare nix
uses: cachix/install-nix-action@v17
uses: cachix/install-nix-action@v21
with:
extra_nix_config: |
trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.nixos.org https://hydra.iohk.io https://iohk.cachix.org
accept-nix-config = true
- name: Github cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v2.1.5
Expand All @@ -40,22 +39,22 @@ jobs:
restore-keys: |
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
- name: Prepare nix-shell
run: |
nix-build --arg withoutDevTools true shell.nix
- name: Prepare nix shell
run:
nix develop --build

- name: Build
run: |
nix-shell --arg withoutDevTools true --run 'cabal update'
nix-shell --arg withoutDevTools true --run 'cabal build all --ghc-options=-Werror'
nix develop --command cabal update
nix develop --command cabal build all --ghc-options=-Werror
- name: Test
run: |
nix-shell --arg withoutDevTools true --run 'cabal test all --test-options "--xml=test-results.xml"'
run:
nix develop --command cabal test all --test-options "--xml=test-results.xml"

- name: Formatting
run: |
nix-shell --arg withoutDevTools false --run './fmt.sh check'
run:
nix develop --command ./fmt.sh check

- name: Upload build & test artifacts
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -88,11 +87,10 @@ jobs:
repository: input-output-hk/quickcheck-dynamic

- name: Prepare nix
uses: cachix/install-nix-action@v17
uses: cachix/install-nix-action@v21
with:
extra_nix_config: |
trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.nixos.org https://cache.iog.io https://iohk.cachix.org
extra_nix_config:
accepct-flake-config = true

- name: Cachix cache of nix derivations
uses: cachix/cachix-action@v10
Expand All @@ -112,7 +110,7 @@ jobs:
- name: Documentation (Haddock)
run: |
nix-shell --arg withoutDevTools true --run '.github/workflows/ci-haddock.sh'
nix develop --command .github/workflows/ci-haddock.sh
- name: Upload build & test artifacts
uses: actions/upload-artifact@v2
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yaml
Expand Up @@ -18,11 +18,10 @@ jobs:
fetch-depth: 0

- name: Prepare nix
uses: cachix/install-nix-action@v17
uses: cachix/install-nix-action@v21
with:
extra_nix_config: |
trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.nixos.org https://cache.iog.io https://iohk.cachix.org
accept-flake-config = true
- name: Github cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v2.1.5
Expand All @@ -34,17 +33,18 @@ jobs:
key: |
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
- name: Prepare nix-shell
run: |
nix-build --arg withoutDevTools true shell.nix
- name: Prepare nix shell
run:
nix develop --build

- name: Cabal check
run: |
nix-shell --arg withoutDevTools true --run 'cd quickcheck-dynamic && cabal check'
cd quickcheck-dynamic
nix develop --command cabal check
- name: Package
run: |
nix-shell --arg withoutDevTools true --run 'cabal sdist quickcheck-dynamic'
run:
nix develop --command cabal sdist quickcheck-dynamic

- name: Get the version
id: get_version
Expand Down

0 comments on commit c250b3c

Please sign in to comment.