Skip to content

Commit

Permalink
chore: nix check @ ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanlakhani committed Jul 5, 2023
1 parent e19134f commit fe42afe
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 6 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 📦 Nix Build

on:
push:
branches: [ main ]

pull_request:
branches: [ '**' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run-checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4

- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5

- name: Nix Build
run: |
nix develop --show-trace -c irust --version
nix develop --show-trace -c rustc --version
29 changes: 23 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# we leverage unstable due to wasm-tools/wasm updates
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";

flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};

rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -15,6 +21,7 @@
outputs = {
self,
nixpkgs,
flake-compat,
flake-utils,
rust-overlay,
} @ inputs:
Expand Down Expand Up @@ -193,6 +200,7 @@
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Foundation
];
NIX_PATH = "nixpkgs=" + pkgs.path;
RUST_BACKTRACE = 1;

shellHook = ''
Expand Down

0 comments on commit fe42afe

Please sign in to comment.