Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #226 from holochain/pr/update-main
Browse files Browse the repository at this point in the history
Merge develop changes to master
  • Loading branch information
steveej committed Sep 29, 2021
2 parents a115ca5 + 7551c62 commit 9ca6e65
Show file tree
Hide file tree
Showing 27 changed files with 491 additions and 313 deletions.
115 changes: 39 additions & 76 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,61 @@ commands:
no_output_timeout: 30m
command: ./docker/build << parameters.box >> $CIRCLE_BRANCH
- run: ./docker/push << parameters.box >> $CIRCLE_BRANCH
nix-prepare-test-push:
steps:
- checkout
- run:
name: prepare nix
command: |
. $HOME/.nix-profile/etc/profile.d/nix.sh
./ci/setup-hydra-cache.sh
./ci/cachix.sh setup
- run:
name: tests
command: |
. $HOME/.nix-profile/etc/profile.d/nix.sh
nix-shell --run echo
nix-shell --run hn-test
# TODO: decide whether or not we want to keep this
# HN_VERBOSE=true $(nix-build . --no-link -A pkgs.holonix)/bin/holonix --run hn-test
- run:
name: push to cachix
command: |
. $HOME/.nix-profile/etc/profile.d/nix.sh
./ci/cachix.sh push
jobs:
build:
docker:
- image: holochain/holonix:latest
- image: nixos/nix:latest
environment:
CACHIX_NAME: holochain-ci
steps:
- checkout

- run:
name: Set up Holo's Hydra cache
command: ./ci/setup-hydra-cache.sh

# warm nix
- run: nix-shell --run echo

# run env tests
- run: ./test/environment.sh

# run shell tests
- run: nix-shell --run hn-test
- nix-prepare-test-push

debian:
docker:
- image: holochain/holonix:debian
environment:
CACHIX_NAME: holochain-ci
steps:
- checkout
- run:
command: |
./ci/setup-hydra-cache.sh
. /home/docker/.nix-profile/etc/profile.d/nix.sh
nix-shell --run echo
nix-shell --run hn-test
HN_VERBOSE=true $(nix-build . --no-link -A pkgs.holonix)/bin/holonix --run hn-test
- nix-prepare-test-push

ubuntu:
docker:
- image: holochain/holonix:ubuntu
environment:
CACHIX_NAME: holochain-ci
steps:
- checkout
- run:
name: Set up Holo's Hydra cache
command: ./ci/setup-hydra-cache.sh
- run:
command: |
. /home/docker/.nix-profile/etc/profile.d/nix.sh
nix-shell --run echo
nix-shell --run hn-test
HN_VERBOSE=true $(nix-build . --no-link -A pkgs.holonix)/bin/holonix --run hn-test
- nix-prepare-test-push

# THIS IS SECURITY SENSITVE
# READ THESE
# https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/
# https://discuss.circleci.com/t/adding-ssh-keys-fails/7747/24
deploy-github-pages:
docker:
- image: holochain/holonix:latest
- image: nixos/nix:latest
steps:
- add_ssh_keys:
fingerprints:
Expand All @@ -78,6 +77,9 @@ jobs:
- run:
name: Set up Holo's Hydra cache
command: ./ci/setup-hydra-cache.sh
- run:
name: Set up Cachix
command: ./ci/cachix.sh setup
- run:
name: Deploy github pages
command: |
Expand All @@ -90,31 +92,17 @@ jobs:
xcode: "12.0.0"
environment:
NIXPKGS_ALLOW_UNFREE: 1
CACHIX_NAME: holochain-ci
steps:
- checkout
- run:
name: Set up Holo's Hydra cache
command: ./ci/setup-hydra-cache.sh
- run:
name: Standard tests
no_output_timeout: 30m
name: install nix
command: |
# fix for "too many open files" that breaks tokio and lmdb
ulimit -n 10240
# catalina nixos install
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
. /Users/distiller/.nix-profile/etc/profile.d/nix.sh
# do tests
nix-shell --run echo
nix-shell --run hn-test
HN_VERBOSE=true $(nix-build . --no-link -A pkgs.holonix)/bin/holonix --run hn-test
docker-build-latest:
resource_class: large
machine: true
steps:
- build-docker:
box: latest
- nix-prepare-test-push

docker-build-ubuntu:
resource_class: large
Expand All @@ -130,13 +118,6 @@ jobs:
- build-docker:
box: debian

docker-build-minimal:
resource_class: large
machine: true
steps:
- build-docker:
box: minimal

workflows:
version: 2
tests:
Expand All @@ -145,15 +126,6 @@ workflows:
- debian
- ubuntu
- mac
- docker-build-latest:
filters:
branches:
only:
- love
- master
- develop
requires:
- build
- docker-build-ubuntu:
filters:
branches:
Expand All @@ -172,15 +144,6 @@ workflows:
- develop
requires:
- build
- docker-build-minimal:
filters:
branches:
only:
- love
- master
- develop
requires:
- build
- deploy-github-pages:
filters:
branches:
Expand Down
61 changes: 1 addition & 60 deletions CHANGELOG-UNRELEASED.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,5 @@
# Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
l
{{ version-heading }}

### Added
* Convenient script for running the holonix RSM alpha shell. The short-term command will look like this:

`$(nix-build https://nightly.holochain.love --no-link -A pkgs.holonix)/bin/holonix`
* `hn-introspect` script to list which holochain packages were pulled in for the nix-shell

#### RSM binaries for Linux
* holochain: 0.0.1
* dna-util: 0.0.1 lair-keystore
* lair-keystore: 0.0.1-alpha.10
* kitsune-p2p-proxy: 0.0.1

Binaries are available for Darwin and Linux on `x86_64-linux` and `arm64`.

#### Configurable holochain/holo-nixpkgs versions
* Add a section for holo-nixpkgs to config.nix
* Introduce arguments for choosing the included holochain binaries:
* holochainVersionId: can be one of "hpos", "main", "develop", or "custom" as of now.
* holochainVersion: if `holochainVersionId` is "custom", this specifies a set with holochain source information. Example:
```nix
version = "2021-02-05";
rev = "fd8049a48ac12ef3e190b48a79ffe8d8b5948caa";
sha256 = "065kkmmr8b5ngjqpr7amd7l4dcakj2njx168qvr5z47mmqs9xbgw";
cargoSha256 = "1ix8ihlizjsmx8xaaxknbl0wkyck3kc98spipx5alav8ln4wf46s";
```

Altogether the invocation could look like:
```console
nix-shell . --argstr holochainVersionId "custom" --arg holochainVersion '{
version = "custom";
rev = "fd8049a48ac12ef3e190b48a79ffe8d8b5948caa";
sha256 = "065kkmmr8b5ngjqpr7amd7l4dcakj2njx168qvr5z47mmqs9xbgw";
cargoSha256 = "1ix8ihlizjsmx8xaaxknbl0wkyck3kc98spipx5alav8ln4wf46s";
}'
```
* holochainOtherDepsNames: list of package names to include in the shell. Names are keys to `holo-nixpkgs`. Example that is also the default: `[ "lair-keystore" ]`



### Changed
* perf: 4.19 -> 5.4
* Removed the `HC_TARGET_PREFIX` env var in favor of the `NIX_ENV_PREFIX` env var

### Deprecated

### Removed
* cli (hc)
* n3c
* wasm tools
* rust nightly
* sim2h_server
* newrelic tooling
* saml2aws tool and AWS specific CI jobs
* trycp_server

### Fixed

### Security
{{ version-heading }}
60 changes: 50 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.0.86] - 2021-09-29

### Added

* `hn-introspect` script to list which holochain packages were pulled in for the nix-shell

#### RSM binaries for Linux
* holochain: 0.0.107
* hc: 0.0.8
* lair-keystore: 0.0.4
* kitsune-p2p-proxy: 0.0.6

Binaries are available for Darwin and Linux on `x86_64-linux`.

#### Configurable holochain/holochain-nixpkgs versions
* Add a section for holochain-nixpkgs to config.nix
* Introduce arguments for choosing the included holochain binaries:

* holochainVersionId: can be one of "main", "develop", or "custom" as of now.
* holochainVersion: if `holochainVersionId` is "custom", this specifies a set with holochain source information.
* include: a set that controls which components to include in the shell
* rustVersion: allows overriding the nix-shell's rust version. examples:
* using a specific nightly version: '{ track = "nightly"; version = "2021-07-01"; }'
* using a specific stable version: '{ track = "stable"; version = "1.53.0"; }'

Please see the files in _examples/_ for more usage examples.

### Changed
* perf: 4.19 -> 5.4
* perf: 5.4 -> 5.10
* rust: 1.48 -> 1.54
* clippy: 0.0.212 -> 0.1.5*
* Removed the `HC_TARGET_PREFIX` env var in favor of the `NIX_ENV_PREFIX` env var

### Deprecated

### Removed
* n3c
* wasm tools
* rust nightly
* sim2h_server
* newrelic tooling
* saml2aws tool and AWS specific CI jobs
* trycp_server

### Fixed

### Security

## [0.0.85] - 2020-10-02

### Added
Expand Down Expand Up @@ -1435,13 +1485,3 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- ability to pass config into root default.nix from consumers
- hn-release-changelog command

### Changed

### Deprecated

### Removed

### Fixed

### Security
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Holonix

Read all about it at https://docs.holochain.love
Read all about it at https://developer.holochain.org/docs/install/
24 changes: 24 additions & 0 deletions ci/cachix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash -p cachix -I nixpkgs="channel:nixos-21.05"

# nix-shell -i bash -p "((import ./config.nix).holochain-nixpkgs.importFn {}).pkgs.cachix"

set -euo pipefail

export PATHS_PREBUILD_FILE="${HOME}/.store-path-pre-build"
export NIX_PATH=nixpkgs=$(nix eval --raw '((import ./config.nix).holochain-nixpkgs.pathFn {})')

case ${1} in
setup)
if [[ -n ${CACHIX_AUTH_TOKEN:-} ]]; then
echo Using CACHIX_AUTH_TOKEN
cachix --verbose authtoken ${CACHIX_AUTH_TOKEN}
fi
cachix --verbose use -m user-nixconf ${CACHIX_NAME:?}
nix path-info --all > "${PATHS_PREBUILD_FILE}"
;;

push)
comm -13 <(sort "${PATHS_PREBUILD_FILE}" | grep -v '\.drv$') <(nix path-info --all | grep -v '\.drv$' | sort) | cachix --verbose push ${CACHIX_NAME:?}
;;
esac
2 changes: 1 addition & 1 deletion ci/setup-hydra-cache.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -xe
mkdir -p ~/.config/nix/
cat > ~/.config/nix/nix.conf << 'EOF'
Expand Down
Loading

0 comments on commit 9ca6e65

Please sign in to comment.