-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI just builds the artifacts
- Loading branch information
Showing
2 changed files
with
67 additions
and
2 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,35 @@ | ||
name: nix-build | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-push-oci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: cachix/install-nix-action@v25 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
- run: | | ||
nix build \ | ||
-L \ | ||
-o ./imgTarball \ | ||
'.#ociImgBase' | ||
- run: | | ||
nix build \ | ||
-L \ | ||
-o ./imgTarball \ | ||
'.#ociImgIqlQuery' | ||
- if: github.ref == 'refs/heads/main' | ||
run: | | ||
docker load -i ./imgTarball | ||
docker push --all-tags probcomp/inferenceql.query |
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,2 +1,32 @@ | ||
# nix | ||
Nix flakes, modules, and reused utility code across the InferenceQL ecosystem | ||
# InferenceQL/nix | ||
|
||
This repo holds Nix flake, modules, packages, and reusable utility Nix language code for use across the InferenceQL ecosystem. | ||
|
||
## Usage | ||
|
||
### Build an artifact | ||
|
||
Currently, you can build a package directly like so: | ||
|
||
```bash | ||
nix build github.com:InferenceQL/nix#ociImgBase | ||
``` | ||
|
||
### Import utility code | ||
|
||
To access the `lib` code exported by this flake, declare this repo as a flake input: | ||
|
||
```nix | ||
{ | ||
inputs = { | ||
nixpkgs.url = ... | ||
iqlnix.url = "github" | ||
}; | ||
outputs = inputs@{ nixpkgs, iqlnix , ... }: let | ||
# call some function | ||
toolbox = iqlnix.lib.basicTools "aarch64-darwin"; | ||
in { | ||
... | ||
}; | ||
}; | ||
``` |