-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a mostly self-contained development environment automatically sets up tooling like Cargo and Bazel via nix. This makes it easy for nix users to contribute to our project and enables future work on reproducible release binaries and containers.
- Loading branch information
1 parent
659d571
commit cdc5878
Showing
8 changed files
with
1,500 additions
and
64 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake --impure |
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,57 @@ | ||
--- | ||
name: Nix | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
nix-bazel: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.5.3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: Mount Nix cache | ||
uses: actions/cache@v3.3.2 | ||
with: | ||
key: ${{ runner.os }}-nix | ||
path: ~/nix | ||
- name: Mount bazel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: ${{ runner.os }}-bazel-nix | ||
- name: Invoke bazel build in Nix shell | ||
run: > | ||
nix --store ~/nix develop --impure --command | ||
bash -c "bazel test ..." | ||
nix-cargo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.5.3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: Mount Nix cache | ||
uses: actions/cache@v3.3.2 | ||
with: | ||
key: ${{ runner.os }}-nix | ||
path: ~/nix | ||
- name: Invoke bazel build in Nix shell | ||
run: > | ||
nix --store ~/nix develop --impure --command | ||
bash -c "cargo test --all" |
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 |
---|---|---|
|
@@ -6,3 +6,5 @@ target/ | |
terraform.tfstate* | ||
.update_scheduler_ips.zip | ||
__pycache__ | ||
.devenv/ | ||
.direnv/ |
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
Oops, something went wrong.