Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Apr 4, 2024
1 parent 61675f7 commit caf27a2
Show file tree
Hide file tree
Showing 13 changed files with 1,421 additions and 286 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake .
47 changes: 26 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ name: CI
# events but only for the main branch
on:
push:
branches: [ main ]
branches: [ main, develop ]
pull_request:
branches: [ main ]
branches: [ main, develop ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -23,27 +23,32 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- uses: cachix/install-nix-action@v12
- name: Install nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: https://releases.nixos.org/nix/nix-2.12.0/install
extra_nix_config: |
experimental-features = flakes nix-command
- name: cachix
run: |
nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use holochain-ci
- uses: cachix/cachix-action@v10
with:
name: holochain-ci

- name: build-holochain
run: |
cd $GITHUB_WORKSPACE
nix-shell . --run "npm install"
nix-shell . --run "npm run build:happ"
- name: test-holochain
- uses: cachix/cachix-action@v10
with:
name: holochain-open-dev

- name: Install and test
run: |
cd $GITHUB_WORKSPACE
nix-shell . --run "npm test"
- name: build-ui
nix develop --command bash -c "npm i && npm t"
- name: Build UI
run: |
cd $GITHUB_WORKSPACE
nix-shell . --run "cd ui && npm run lint && npm run build"
nix develop --command bash -c "npm run build -w ui"
update-nix-cache:
strategy:
matrix:
os: [ ubuntu-latest, ]
needs: build-and-test
if: github.ref == 'refs/heads/master'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ dist/
*.happ
*.webhapp
storybook-static/
.direnv
result*
58 changes: 30 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ opt-level = "z"

[workspace]
members = ["dnas/*/zomes/integrity/*", "dnas/*/zomes/coordinator/*"]
resolver = "2"

[workspace.dependencies]
hdi = "0.4.0-beta-dev.20"
hdk = "0.3.0-beta-dev.24"
holochain = "0.3.0-beta-dev.29"
hdi = "0.4.0-beta-dev.28"
hdk = "0.3.0-beta-dev.32"
holochain = "0.3.0-beta-dev.38"

serde = "1.0.193"

Expand Down
16 changes: 16 additions & 0 deletions dnas/file_storage_provider/zomes/coordinator/file_storage/zome.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ inputs, rootPath, ... }:

{
perSystem =
{ inputs'
, ...
}: {
packages.file_storage_integrity = inputs.hcUtils.outputs.lib.rustZome {
workspacePath = rootPath;
holochain = inputs'.holochain;
crateCargoToml = ./Cargo.toml;
};
};
}


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct FileMetadata {
}

#[cfg(feature = "externs")]
#[hdk_entry_defs]
#[hdk_entry_types]
#[unit_enum(UnitEntryTypes)]
pub enum EntryTypes {
FileMetadata(FileMetadata),
Expand Down
21 changes: 21 additions & 0 deletions dnas/file_storage_provider/zomes/integrity/file_storage/zome.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ inputs, rootPath, ... }:

{
perSystem =
{ inputs'
, config
, pkgs
, system
, lib
, options
, ...
}: {
packages.file_storage = inputs.hcUtils.outputs.lib.rustZome {
workspacePath = rootPath;
holochain = inputs'.holochain;
crateCargoToml = ./Cargo.toml;
};
};
}


Loading

0 comments on commit caf27a2

Please sign in to comment.