Compare commits
No commits in common. "aa8b8674c6f78d7149ec6eeeb687f6fa721b38c1" and "833a22887016c4f3465b10bcfe2729bc653e9741" have entirely different histories.
aa8b8674c6
...
833a228870
2 changed files with 35 additions and 68 deletions
102
.github/workflows/build-and-cache.yml
vendored
102
.github/workflows/build-and-cache.yml
vendored
|
@ -3,6 +3,28 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
jobs:
|
jobs:
|
||||||
|
build-packages:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
package:
|
||||||
|
- github:cything/nixpkgs#hello
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- macos-latest
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
with:
|
||||||
|
logger: pretty
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- name: Setup Attic cache
|
||||||
|
uses: ryanccn/attic-action@v0
|
||||||
|
with:
|
||||||
|
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||||
|
cache: ${{ vars.ATTIC_CACHE }}
|
||||||
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
- run: nix build -L '${{ matrix.package }}'
|
||||||
build-machines:
|
build-machines:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -12,7 +34,7 @@ jobs:
|
||||||
- titan
|
- titan
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
|
# - macos-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
|
@ -28,48 +50,21 @@ jobs:
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
build-mount-path-ownership: 'root:root'
|
build-mount-path-ownership: 'root:root'
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: nixbuild/nix-quick-install-action@master
|
|
||||||
|
|
||||||
- name: Sync repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
logger: pretty
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
- uses: cachix/cachix-action@v14
|
|
||||||
with:
|
|
||||||
name: cything
|
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
||||||
useDaemon: false
|
|
||||||
installCommand: nix profile install nixpkgs#cachix
|
|
||||||
|
|
||||||
- name: Setup Attic cache
|
- name: Setup Attic cache
|
||||||
uses: ryanccn/attic-action@v0
|
uses: ryanccn/attic-action@v0
|
||||||
with:
|
with:
|
||||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||||
cache: ${{ vars.ATTIC_CACHE }}
|
cache: ${{ vars.ATTIC_CACHE }}
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
- name: Sync repository
|
||||||
- name: Restore and cache Nix store
|
uses: actions/checkout@v4
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
|
||||||
with:
|
with:
|
||||||
# restore and save a cache using this key
|
persist-credentials: false
|
||||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }}
|
|
||||||
# if there's no cache hit, restore a cache by this prefix
|
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
||||||
# do purge caches
|
|
||||||
purge: true
|
|
||||||
# purge all versions of the cache
|
|
||||||
purge-prefixes: nix-${{ runner.os }}-
|
|
||||||
# created more than this number of seconds ago relative to the start of the `Post Restore` phase
|
|
||||||
purge-last-accessed: 86400
|
|
||||||
# except the version with the `primary-key`, if it exists
|
|
||||||
purge-primary-key: never
|
|
||||||
# always save the cache
|
|
||||||
save-always: true
|
|
||||||
|
|
||||||
- run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
- run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -79,7 +74,6 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
# - macos-latest
|
# - macos-latest
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
|
@ -95,44 +89,18 @@ jobs:
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
build-mount-path-ownership: 'root:root'
|
build-mount-path-ownership: 'root:root'
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: nixbuild/nix-quick-install-action@master
|
|
||||||
|
|
||||||
- name: Sync repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
logger: pretty
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
- uses: cachix/cachix-action@v14
|
|
||||||
with:
|
|
||||||
name: cything
|
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
||||||
useDaemon: false
|
|
||||||
installCommand: nix profile install nixpkgs#cachix
|
|
||||||
|
|
||||||
- name: Setup Attic cache
|
- name: Setup Attic cache
|
||||||
uses: ryanccn/attic-action@v0
|
uses: ryanccn/attic-action@v0
|
||||||
with:
|
with:
|
||||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||||
cache: ${{ vars.ATTIC_CACHE }}
|
cache: ${{ vars.ATTIC_CACHE }}
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
- name: Sync repository
|
||||||
- name: Restore and cache Nix store
|
uses: actions/checkout@v4
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
|
||||||
with:
|
with:
|
||||||
# restore and save a cache using this key
|
persist-credentials: false
|
||||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }}
|
|
||||||
# if there's no cache hit, restore a cache by this prefix
|
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
||||||
# do purge caches
|
|
||||||
purge: true
|
|
||||||
# purge all versions of the cache
|
|
||||||
purge-prefixes: nix-${{ runner.os }}-
|
|
||||||
# created more than this number of seconds ago relative to the start of the `Post Restore` phase
|
|
||||||
purge-last-accessed: 86400
|
|
||||||
# except the version with the `primary-key`, if it exists
|
|
||||||
purge-primary-key: never
|
|
||||||
# always save the cache
|
|
||||||
save-always: true
|
|
||||||
|
|
||||||
- run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage
|
- run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
};
|
};
|
||||||
actions.ENABLED = false;
|
actions.ENABLED = false;
|
||||||
repository.ENABLE_PUSH_CREATE_USER = true;
|
repository.ENABLE_PUSH_CREATE_USER = true;
|
||||||
indexer.REPO_INDEXER_ENABLED = true;
|
|
||||||
};
|
};
|
||||||
database = {
|
database = {
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
|
|
Loading…
Add table
Reference in a new issue