-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b59fda1
commit 25d52b7
Showing
4 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
templates/zome/web-app/.github/workflows/build-and-cache.yaml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: "Build and cache nix packages" | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
testbuild: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- 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 | ||
|
||
- name: Install and test | ||
run: | | ||
nix develop --command bash -c "pnpm i && pnpm t && pnpm -F @holochain-open-dev/{{kebab_case app_name}} build" | ||
|
||
- name: Build zomes | ||
env: | ||
CACHIX_AUTH_TOKEN: "${{ secrets.CACHIX_TOKEN_HOLOCHAIN_OPEN_DEV }}" | ||
run: | | ||
nix build -L .#{{snake_case app_name}}_integrity.meta.debug | ||
cachix push holochain-open-dev $(nix path-info .#{{snake_case app_name}}_integrity.meta.debug) | ||
cachix pin holochain-open-dev {{snake_case app_name}}_integrity_debug $(nix path-info .#{{snake_case app_name}}_integrity.meta.debug) | ||
|
||
nix build -L .#{{snake_case app_name}}_integrity | ||
cachix push holochain-open-dev $(nix path-info .#{{snake_case app_name}}_integrity) | ||
cachix pin holochain-open-dev {{snake_case app_name}}_integrity $(nix path-info .#{{snake_case app_name}}_integrity) | ||
|
||
nix build -L .#{{snake_case app_name}}.meta.debug | ||
cachix push holochain-open-dev $(nix path-info .#{{snake_case app_name}}.meta.debug) | ||
cachix pin holochain-open-dev {{snake_case app_name}}_debug $(nix path-info .#{{snake_case app_name}}.meta.debug) | ||
|
||
nix build -L .#{{snake_case app_name}} | ||
cachix push holochain-open-dev $(nix path-info .#{{snake_case app_name}}) | ||
cachix pin holochain-open-dev {{snake_case app_name}}$(nix path-info .#{{snake_case app_name}}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters