Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Nix functionality #1238

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,43 @@ jobs:
sile-${{ env.VERSION }}.pdf
sile-${{ env.VERSION }}.zip
sile-${{ env.VERSION }}.tar.xz

nix-flake:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Nix
uses: cachix/install-nix-action@v14
# https://github.com/cachix/install-nix-action/#usage-with-flakes
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes

- name: Print nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'

- name: Print whether nixpkgs' stdenv is darwin
run: nix-instantiate --eval -E '(import <nixpkgs> {}).stdenv.isDarwin'

- name: Evaluate nixpkgs' sile.meta
run: nix eval --json nixpkgs#sile.meta

- name: Evaluate nixpkgs' sile.meta
run: nix eval --json .#sile.meta

- name: Check nix build
run: |
nix build
- name: Check nix flake
run: |
nix flake check
- name: Check nix shell
run: |
nix shell -c true