-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from MoonVision/nix-cache
Build for more systems and push results to cache
- Loading branch information
Showing
5 changed files
with
100 additions
and
56 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,13 +1,38 @@ | ||
name: "Build legacy Nix package on Ubuntu" | ||
name: "Build Nix packages for various platforms" | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
system: x86_64-linux | ||
- os: macos-latest | ||
system: x86_64-darwin | ||
- os: macos-latest | ||
system: aarch64-darwin | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: cachix/install-nix-action@v12 | ||
- uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v27 | ||
with: | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
extra-platforms = x86_64-linux x86_64-darwin aarch64-darwin | ||
accept-flake-config = true | ||
- name: Install Rosetta | ||
if: ${{ contains(matrix.system, 'x86_64-darwin') }} | ||
run: sudo softwareupdate --install-rosetta --agree-to-license | ||
- name: Install attic | ||
run: | | ||
nix run nixpkgs#attic-client login internal "https://attic.internal.moonvision.io" "${{ secrets.ATTIC_SECRET_KEY }}" | ||
nix run nixpkgs#attic-client use moonvision-foss | ||
- name: Building package | ||
run: nix-build . -A defaultPackage.x86_64-linux | ||
run: nix build .#packages.${{ matrix.system }}.default | ||
- name: Push result to cache | ||
run: nix run nixpkgs#attic-client push moonvision-foss result |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
(import ( | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; | ||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; } | ||
) { | ||
src = ./.; | ||
}).defaultNix | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; | ||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; | ||
} | ||
) { | ||
src = ./.; | ||
}) | ||
.defaultNix |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
(import ( | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; | ||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; } | ||
) { | ||
src = ./.; | ||
}).shellNix | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; | ||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; | ||
} | ||
) { | ||
src = ./.; | ||
}) | ||
.shellNix |