Skip to content

Commit

Permalink
Merge branch 'master' into angerman/android-static
Browse files Browse the repository at this point in the history
  • Loading branch information
angerman authored Nov 29, 2022
2 parents ddc654e + 506208f commit 488dc4d
Show file tree
Hide file tree
Showing 1,442 changed files with 215,002 additions and 18,388 deletions.
142 changes: 135 additions & 7 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,117 @@
steps:
- label: 'Run tests with ghc8107'
command: "./test/tests.sh ghc8107"
- label: 'Run tests with ghc8107: Running the nix-build tests...'
command: "./test/tests.sh ghc8107 nix-build"
agents:
system: x86_64-linux

- label: 'Check that jobset will evaluate in Hydra'
- label: 'Run tests with ghc8107: Running the unit tests...'
command: "./test/tests.sh ghc8107 unit-tests"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking that a nix-shell works for runghc...'
command: "./test/tests.sh ghc8107 runghc"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking that a nix-shell works for cabal...'
command: "./test/tests.sh ghc8107 cabal"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking that a nix-shell works for cabal (doExactConfig component)...'
command: "./test/tests.sh ghc8107 cabal-doExactConfig"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks...'
command: "./test/tests.sh ghc8107 tests-benchmarks"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking that a nix-shell works for a multi-target project...'
command: "./test/tests.sh ghc8107 multi-target"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking shellFor works for a cabal project, multiple packages...'
command: "./test/tests.sh ghc8107 shellFor-single-package"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking shellFor works for a cabal project, single package...y'
command: "./test/tests.sh ghc8107 shellFor-multiple-package"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking shellFor works for a cabal project, single package...'
command: "./test/tests.sh ghc8107 shellFor-hoogle"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking shellFor does not depend on given packages...y'
command: "./test/tests.sh ghc8107 shellFor-not-depends"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking the maintainer scripts...y'
command: "./test/tests.sh ghc8107 maintainer-scripts"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking that plan construction works with extra Hackages...'
command: "./test/tests.sh ghc8107 plan-extra-hackages"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: Checking that package with extra Hackages can be build...'
command: "./test/tests.sh ghc8107 build-extra-hackages"
agents:
system: x86_64-linux

- label: 'Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ...'
command: "./test/tests.sh ghc8107 hix"
agents:
system: x86_64-linux

- label: 'Test examples in documentation ...'
command: "./test/tests.sh ghc8107 docs"
agents:
system: x86_64-linux

- label: 'Check that jobset will evaluate in Hydra at ifdLevel 0 and 1'
command:
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
- ./check-hydra.sh --arg ifdLevel 0
- ./check-hydra.sh --arg ifdLevel 1
agents:
system: x86_64-linux

- label: 'Check that jobset will evaluate in Hydra at ifdLevel 2'
command:
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
- ./check-hydra.sh --arg ifdLevel 2
agents:
system: x86_64-linux

- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 8.10'
command:
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 6 x == \"ghc810\"'"
agents:
system: x86_64-linux

- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 9.2'
command:
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
- ./check-hydra.sh 0
- ./check-hydra.sh 1
- ./check-hydra.sh 2
- ./check-hydra.sh 3
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 5 x == \"ghc92\"'"
agents:
system: x86_64-linux

- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and not (ghc 8.10 or ghc 9.2)'
command:
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: !(__substring 0 6 x == \"ghc810\" || __substring 0 5 x == \"ghc92\")'"
agents:
system: x86_64-linux

Expand All @@ -33,8 +134,35 @@ steps:
command:
- nix-build build.nix -A maintainer-scripts.check-materialization-concurrency -o check-materialization-concurrency.sh
- ./check-materialization-concurrency.sh
retry:
automatic:
- exit_status: "*"
limit: 10

- label: 'Make sure non store paths like can be used as src'
command:
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8107 -o check-path-support.sh
- ./check-path-support.sh

- label: 'Check that the haskell.nix roots do not require IFDs'
command:
- nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false
agents:
system: x86_64-linux

- label: 'Check that evaluation of hydra jobs works without using remote builders'
command:
- nix-instantiate release.nix -A x86_64-darwin.required-unstable-ghc8107-native --show-trace --builders ''
agents:
system: x86_64-linux

- label: 'Check hix -- run github:haskell/cabal/3.8#cabal-install:exe:cabal -- --version'
command:
- "HIX_DIR=$(mktemp -d) nix run .#hix --accept-flake-config -- run github:haskell/cabal/3.8#cabal-install:exe:cabal --accept-flake-config --override-input haskellNix . -- --version"
agents:
system: x86_64-linux

- label: 'nix-tools build'
command: cd ./nix-tools && .buildkite/nix-tools-build.sh
agents:
system: x86_64-linux
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

This template is a guide only, feel free add or omit sections as appropriate.

**Describe the bug**

A clear and concise description of what the bug is, including:

* Build system (eg. `x86_64-linux` or `aarch64-darwin`).
* GHC version.
* Haskell.nix version (or commit) used.

**Steps To Reproduce**

Steps for reproducing (try to minimise the size of the code base if possible).

Bonus points if it is in a PR to add a test case.

**Expected behavior**

A clear and concise description of what you expected to happen.

**Additional context**

Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

This template is a guide only, feel free add or omit sections as appropriate.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
19 changes: 19 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 60
# Issues with these labels will never be considered stale
exemptLabels:
- "help wanted"
- pinned
- preserved
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
16 changes: 16 additions & 0 deletions .github/workflows/autotag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
push:
branches:
- master

jobs:
tag:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 12
steps:
- uses: phish108/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
51 changes: 51 additions & 0 deletions .github/workflows/windows-secp256k1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Test secp256k1 on windows"
on: workflow_dispatch
jobs:
tests:
runs-on: windows-latest

defaults:
run:
shell: bash

steps:

- uses: haskell/actions/setup@v1
id: setup-haskell
with:
ghc-version: 8.10.7
cabal-version: 3.6.2.0

- name: Install pkgconfiglite
run: choco install -y pkgconfiglite

- name: Install libsecp256k1
run: |
curl -Ls \
--connect-timeout 5 \
--max-time 10 \
--retry 5 \
--retry-delay 0 \
--retry-max-time 40 \
https://hydra.iohk.io/job/Cardano/haskell-nix/windows-secp256k1/latest/download/1 -o secp256k1.zip
mkdir secp256k1
cd secp256k1
unzip ../secp256k1.zip
cd ..
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH;$(readlink -f secp256k1/lib/pkgconfig | sed 's|^/d|D:|g' | tr / '\\')"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
export SECP256K1_PATH="$(readlink -f secp256k1/bin | sed 's|^/d|D:|g' | tr / '\\')"
echo "SECP256K1_PATH=$SECP256K1_PATH"
echo "$SECP256K1_PATH" >> $GITHUB_PATH
- name: Cabal update
run: cabal update

- name: Build and run haskell-secp256k1 tests
run: |
cabal unpack secp256k1-haskell
cd secp256k1-haskell-*
cabal build --enable-tests
cabal test
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# The output of "mkdocs build"
/site/
docs/reference/modules.md
# The output of "mdbook build"
/book/
/docs/reference/modules.md
/docs/**/index.html

# Nix build results
result*
/nt

# https://github.com/nix-community/nix-direnv
.direnv

# Created by https://www.gitignore.io/api/haskell,emacs,vim

### Emacs ###
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ its dependencies into Nix code.
## Documentation

- [Introduction](https://input-output-hk.github.io/haskell.nix/index.html)
- [Getting Started](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started.html)
- [Troubleshooting](https://input-output-hk.github.io/haskell.nix/troubleshooting.html)
- [Getting Started](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started)
- [Troubleshooting](https://input-output-hk.github.io/haskell.nix/troubleshooting)
- Explore the documentation from there to find further topics.

## Help! Something isn't working

The #1 problem that people have when using `haskell.nix` is that they find themselves building GHC.
This should not happen, but you *must* follow the `haskell.nix` setup instructions properly to avoid it.
If you find this happening to you, please check that you have followed the
[getting started instructions](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started.html#setting-up-the-binary-cache) and
consult the corresponding [troubleshooting section](https://input-output-hk.github.io/haskell.nix/troubleshooting.html#why-am-i-building-ghc).
[getting started instructions](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started#setting-up-the-binary-cache) and
consult the corresponding [troubleshooting section](https://input-output-hk.github.io/haskell.nix/troubleshooting#why-am-i-building-ghc).

The troubleshooting documentation also contains some help for other common issues.
Please give it a read before asking on IRC or opening an issue.
Expand Down
5 changes: 5 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[book]
language = "en"
multilingual = false
src = "docs"
title = "Alternative Haskell Infrastructure for Nixpkgs"
Loading

0 comments on commit 488dc4d

Please sign in to comment.