diff --git a/.github/workflows/build-scaffold-holochain-runtime.yaml b/.github/workflows/build-scaffold-holochain-runtime.yaml new file mode 100644 index 00000000..cf6501e4 --- /dev/null +++ b/.github/workflows/build-scaffold-holochain-runtime.yaml @@ -0,0 +1,56 @@ +name: "build-scaffold-holochain-runtime" +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + build-scaffold-holochain-runtime: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Extend space + uses: ./.github/actions/extend-space + + - name: Install nix + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - uses: cachix/cachix-action@v14 + with: + name: holochain-ci + + - uses: cachix/cachix-action@v14 + with: + name: holochain-open-dev + + - uses: cachix/cachix-action@v14 + with: + name: darksoil-studio + + - name: Build scaffold-holochain-runtime + run: | + nix build -L .#scaffold-holochain-runtime + + - name: Test scaffold-holochain-runtime + run: | + sh ./crates/scaffold-holochain-runtime/run_test.sh + + - name: Cache scaffold-holochain-runtime + if: github.event_name != 'pull_request' && github.ref_name == 'main' + env: + CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}" + run: | + cachix push darksoil-studio $(nix path-info .#scaffold-holochain-runtime) + cachix pin darksoil-studio scaffold-holochain-runtime $(nix path-info .#scaffold-holochain-runtime) + diff --git a/.github/workflows/build-scaffold-tauri-app.yaml b/.github/workflows/build-scaffold-tauri-app.yaml index a807ef06..97d4a613 100644 --- a/.github/workflows/build-scaffold-tauri-app.yaml +++ b/.github/workflows/build-scaffold-tauri-app.yaml @@ -42,6 +42,10 @@ jobs: run: | nix build -L .#scaffold-tauri-app + - name: Test scaffold-tauri-app + run: | + sh ./crates/scaffold-tauri-app/run_test.sh + - name: Cache scaffold-tauri-app if: github.event_name != 'pull_request' && github.ref_name == 'main' env: diff --git a/Cargo.lock b/Cargo.lock index 84addf41..591ffffd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7322,7 +7322,7 @@ dependencies = [ ] [[package]] -name = "scaffold_holochain_runtime" +name = "scaffold-holochain-runtime" version = "0.1.0" dependencies = [ "anyhow", @@ -7341,7 +7341,7 @@ dependencies = [ ] [[package]] -name = "scaffold_tauri_app" +name = "scaffold-tauri-app" version = "0.1.0" dependencies = [ "anyhow", diff --git a/crates/scaffold_holochain_runtime/Cargo.toml b/crates/scaffold-holochain-runtime/Cargo.toml similarity index 95% rename from crates/scaffold_holochain_runtime/Cargo.toml rename to crates/scaffold-holochain-runtime/Cargo.toml index e283a218..3e656f1b 100644 --- a/crates/scaffold_holochain_runtime/Cargo.toml +++ b/crates/scaffold-holochain-runtime/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "scaffold_holochain_runtime" +name = "scaffold-holochain-runtime" version = "0.1.0" edition = "2021" diff --git a/crates/scaffold_holochain_runtime/default.nix b/crates/scaffold-holochain-runtime/default.nix similarity index 100% rename from crates/scaffold_holochain_runtime/default.nix rename to crates/scaffold-holochain-runtime/default.nix diff --git a/crates/scaffold_holochain_runtime/run_test.sh b/crates/scaffold-holochain-runtime/run_test.sh similarity index 100% rename from crates/scaffold_holochain_runtime/run_test.sh rename to crates/scaffold-holochain-runtime/run_test.sh diff --git a/crates/scaffold_holochain_runtime/src/bin/main.rs b/crates/scaffold-holochain-runtime/src/bin/main.rs similarity index 100% rename from crates/scaffold_holochain_runtime/src/bin/main.rs rename to crates/scaffold-holochain-runtime/src/bin/main.rs diff --git a/crates/scaffold_holochain_runtime/src/lib.rs b/crates/scaffold-holochain-runtime/src/lib.rs similarity index 100% rename from crates/scaffold_holochain_runtime/src/lib.rs rename to crates/scaffold-holochain-runtime/src/lib.rs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/README.md.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/README.md.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/README.md.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/README.md.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/flake.nix.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/flake.nix.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/flake.nix.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/flake.nix.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/index.html.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/index.html.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/index.html.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/index.html.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/package.json.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/package.json.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/package.json.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/package.json.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/Cargo.toml.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/Cargo.toml.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/Cargo.toml.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/Cargo.toml.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/build.rs.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/build.rs.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/build.rs.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/build.rs.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/capabilities/main.json.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/capabilities/main.json.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/capabilities/main.json.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/capabilities/main.json.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/src/lib.rs.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/src/lib.rs.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/src/lib.rs.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/src/lib.rs.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/src/main.rs.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/src/main.rs.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/src/main.rs.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/src/main.rs.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/tauri.conf.json.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/tauri.conf.json.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src-tauri/tauri.conf.json.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src-tauri/tauri.conf.json.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src/main.ts.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src/main.ts.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src/main.ts.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src/main.ts.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/src/styles.css.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/src/styles.css.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/src/styles.css.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/src/styles.css.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/tsconfig.json.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/tsconfig.json.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/tsconfig.json.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/tsconfig.json.hbs diff --git a/crates/scaffold_holochain_runtime/templates/holochain-runtime/vite.config.ts.hbs b/crates/scaffold-holochain-runtime/templates/holochain-runtime/vite.config.ts.hbs similarity index 100% rename from crates/scaffold_holochain_runtime/templates/holochain-runtime/vite.config.ts.hbs rename to crates/scaffold-holochain-runtime/templates/holochain-runtime/vite.config.ts.hbs diff --git a/crates/scaffold_tauri_app/Cargo.toml b/crates/scaffold-tauri-app/Cargo.toml similarity index 97% rename from crates/scaffold_tauri_app/Cargo.toml rename to crates/scaffold-tauri-app/Cargo.toml index d4bf9627..e375ad21 100644 --- a/crates/scaffold_tauri_app/Cargo.toml +++ b/crates/scaffold-tauri-app/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "scaffold_tauri_app" +name = "scaffold-tauri-app" version = "0.1.0" edition = "2021" diff --git a/crates/scaffold_tauri_app/default.nix b/crates/scaffold-tauri-app/default.nix similarity index 100% rename from crates/scaffold_tauri_app/default.nix rename to crates/scaffold-tauri-app/default.nix diff --git a/crates/scaffold_tauri_app/fixture/flake.nix b/crates/scaffold-tauri-app/fixture/flake.nix similarity index 100% rename from crates/scaffold_tauri_app/fixture/flake.nix rename to crates/scaffold-tauri-app/fixture/flake.nix diff --git a/crates/scaffold_tauri_app/fixture/package.json b/crates/scaffold-tauri-app/fixture/package.json similarity index 100% rename from crates/scaffold_tauri_app/fixture/package.json rename to crates/scaffold-tauri-app/fixture/package.json diff --git a/crates/scaffold_tauri_app/fixture/workdir/web-happ.yaml b/crates/scaffold-tauri-app/fixture/workdir/web-happ.yaml similarity index 100% rename from crates/scaffold_tauri_app/fixture/workdir/web-happ.yaml rename to crates/scaffold-tauri-app/fixture/workdir/web-happ.yaml diff --git a/crates/scaffold_tauri_app/run_test.sh b/crates/scaffold-tauri-app/run_test.sh similarity index 82% rename from crates/scaffold_tauri_app/run_test.sh rename to crates/scaffold-tauri-app/run_test.sh index c44ed6d3..4ec4cd09 100644 --- a/crates/scaffold_tauri_app/run_test.sh +++ b/crates/scaffold-tauri-app/run_test.sh @@ -11,7 +11,7 @@ nix flake update nix develop --command bash -c \"npm i\" " -nix run .#scaffold-tauri-app -- forum-scaffold-tauri-app --path /tmp/forum/scaffold-tauri-app +nix run .#scaffold-tauri-app -- forum-scaffold-tauri-app --path /tmp/forum-scaffold-tauri-app cd /tmp/forum-scaffold-tauri-app diff --git a/crates/scaffold_tauri_app/src/bin/main.rs b/crates/scaffold-tauri-app/src/bin/main.rs similarity index 100% rename from crates/scaffold_tauri_app/src/bin/main.rs rename to crates/scaffold-tauri-app/src/bin/main.rs diff --git a/crates/scaffold_tauri_app/src/lib.rs b/crates/scaffold-tauri-app/src/lib.rs similarity index 100% rename from crates/scaffold_tauri_app/src/lib.rs rename to crates/scaffold-tauri-app/src/lib.rs diff --git a/crates/scaffold_tauri_app/templates/executable-happ/src-tauri/Cargo.toml.hbs b/crates/scaffold-tauri-app/templates/executable-happ/src-tauri/Cargo.toml.hbs similarity index 100% rename from crates/scaffold_tauri_app/templates/executable-happ/src-tauri/Cargo.toml.hbs rename to crates/scaffold-tauri-app/templates/executable-happ/src-tauri/Cargo.toml.hbs diff --git a/crates/scaffold_tauri_app/templates/executable-happ/src-tauri/build.rs.hbs b/crates/scaffold-tauri-app/templates/executable-happ/src-tauri/build.rs.hbs similarity index 100% rename from crates/scaffold_tauri_app/templates/executable-happ/src-tauri/build.rs.hbs rename to crates/scaffold-tauri-app/templates/executable-happ/src-tauri/build.rs.hbs diff --git a/crates/scaffold_tauri_app/templates/executable-happ/src-tauri/capabilities/main.json.hbs b/crates/scaffold-tauri-app/templates/executable-happ/src-tauri/capabilities/main.json.hbs similarity index 100% rename from crates/scaffold_tauri_app/templates/executable-happ/src-tauri/capabilities/main.json.hbs rename to crates/scaffold-tauri-app/templates/executable-happ/src-tauri/capabilities/main.json.hbs diff --git a/crates/scaffold_tauri_app/templates/executable-happ/src-tauri/src/lib.rs.hbs b/crates/scaffold-tauri-app/templates/executable-happ/src-tauri/src/lib.rs.hbs similarity index 100% rename from crates/scaffold_tauri_app/templates/executable-happ/src-tauri/src/lib.rs.hbs rename to crates/scaffold-tauri-app/templates/executable-happ/src-tauri/src/lib.rs.hbs diff --git a/crates/scaffold_tauri_app/templates/executable-happ/src-tauri/src/main.rs.hbs b/crates/scaffold-tauri-app/templates/executable-happ/src-tauri/src/main.rs.hbs similarity index 100% rename from crates/scaffold_tauri_app/templates/executable-happ/src-tauri/src/main.rs.hbs rename to crates/scaffold-tauri-app/templates/executable-happ/src-tauri/src/main.rs.hbs diff --git a/crates/scaffold_tauri_app/templates/executable-happ/src-tauri/tauri.conf.json.hbs b/crates/scaffold-tauri-app/templates/executable-happ/src-tauri/tauri.conf.json.hbs similarity index 100% rename from crates/scaffold_tauri_app/templates/executable-happ/src-tauri/tauri.conf.json.hbs rename to crates/scaffold-tauri-app/templates/executable-happ/src-tauri/tauri.conf.json.hbs diff --git a/flake.nix b/flake.nix index fc0f1438..06a89abc 100644 --- a/flake.nix +++ b/flake.nix @@ -72,7 +72,10 @@ }; }; - imports = [ ./crates/scaffold_tauri_app/default.nix ]; + imports = [ + ./crates/scaffold-tauri-app/default.nix + ./crates/scaffold-holochain-runtime/default.nix + ]; systems = builtins.attrNames inputs.holochain.devShells; perSystem = { inputs', config, pkgs, system, lib, ... }: rec {