Skip to content

Commit

Permalink
add nix build and package workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
keinsell committed Jan 27, 2025
1 parent f8db3c8 commit 64604db
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,31 @@ jobs:
target/${{ matrix.target }}/release/neuronek-cli
target/${{ matrix.target }}/release/neuronek-cli.exe
nix_build:
name: "Nix Build"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4

# Install Nix
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable

# Build with Nix
- name: Build with Nix
run: nix build

# Optional: Run tests
- name: Run Nix tests
run: nix flake check

# Optional: Save build result as artifact
- name: Upload build result
uses: actions/upload-artifact@v3
with:
name: nix-build-result
path: ./result

# Disabled until automatic versioning will be configured
# cargo_release:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,25 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive

nix_package:
needs: [plan]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4

# Install Nix
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable

# Build package
- name: Build Nix package
run: nix build .#packages.x86_64-linux.default

# Upload package
- name: Upload Nix package
uses: actions/upload-artifact@v3
with:
name: nix-package
path: ./result

0 comments on commit 64604db

Please sign in to comment.