mirror of
https://github.com/polarity-lang/polarity.git
synced 2025-07-07 21:15:04 +00:00
Fix nix build and evaluate nix on all branches (#463)
* Evaluate nix on all branches * Fix nix build
This commit is contained in:
parent
2fcf3e4cec
commit
b8d17e4bd6
2 changed files with 15 additions and 5 deletions
19
.github/workflows/nix.yml
vendored
19
.github/workflows/nix.yml
vendored
|
@ -1,9 +1,12 @@
|
|||
name: Check nix code
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# We run this pipeline on all branches, but perform the time-intesive steps only on main
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
branches: [ '**' ]
|
||||
pull_request:
|
||||
branches: [ '**' ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -25,12 +28,20 @@ jobs:
|
|||
with:
|
||||
name: polarity
|
||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||
|
||||
# Step that runs on all branches
|
||||
- name: Evaluate nix code
|
||||
run: nix -Lv flake check
|
||||
|
||||
# Time-intensive steps only run on the main branch
|
||||
- name: Build and run polarity using nix
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: nix -Lv run .# -- --help
|
||||
|
||||
- name: Build and run a static polarity exe
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
if: ${{ github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' }}
|
||||
run: nix -Lv run .#polarity-static -- --help
|
||||
|
||||
- name: Drop into nix devshell and run tests
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: nix develop -Lv -c bash -c "make test"
|
||||
|
|
|
@ -7,7 +7,6 @@ rustPlatform.buildRustPackage rec {
|
|||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
outputHashes = {
|
||||
"codespan-0.11.1" = "sha256-0cUndjWQ44X5zXVfg7YX/asBByWq/hFV1n9tHPBTcfY=";
|
||||
"tower-lsp-0.20.0" = "sha256-f3S2CyFFX6yylaxMoXhB1/bfizVsLfNldLM+dXl5Y8k=";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue