Skip to content

Fixed go nix

Fixed go nix #276

name: "cache-devshells"
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ main, main-0.3, main-0.4 ]
pull_request:
branches: [ main, main-0.3, main-0.4 ]
jobs:
cache-devshells:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Extend space
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/actions/extend-space
- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- uses: cachix/cachix-action@v15
with:
name: darksoil-studio
- name: Cache holochainTauriDev
env:
CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix watch-exec darksoil-studio -- nix flake check --accept-flake-config -L
nix develop --no-update-lock-file --accept-flake-config --profile holochainTauriDev -c true .#holochainTauriDev
cachix push darksoil-studio holochainTauriDev
nix develop --no-update-lock-file --accept-flake-config --profile holochainTauriAndroidDev -c true .#holochainTauriAndroidDev
cachix push darksoil-studio holochainTauriAndroidDev
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file -L --accept-flake-config .#holochainTauriRust
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#holochainTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file -L --accept-flake-config .#androidTauriRust
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#androidTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')
- name: Pin holochainTauriDev
if: github.event_name != 'pull_request' && github.ref_name == 'main'
env:
CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix pin darksoil-studio holochainTauriRust $(nix path-info --json --accept-flake-config --no-warn-dirty .#holochainTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')
cachix pin darksoil-studio androidTauriRust $(nix path-info --json --accept-flake-config --no-warn-dirty .#androidTauriRust | nix run nixpkgs#jq -- -r 'keys[0]')