-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added formal spec to Nix shell and CI (#13)
* Added agda and dependencies to Nix developement shell. * Added Nix derivation for Leios spec. * Added typechecking of Leios spec to CI. * Updated logbook. * Added caching of nix store, fixes #14. * Separated nix caches.
- Loading branch information
Showing
9 changed files
with
298 additions
and
64 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 |
---|---|---|
|
@@ -13,12 +13,52 @@ on: | |
- main | ||
jobs: | ||
|
||
typecheck: | ||
name: Typecheck specification | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: 💾 Cache Nix store | ||
uses: actions/[email protected] | ||
id: nix-cache | ||
with: | ||
path: /tmp/nixcache | ||
key: ${{ runner.os }}-nix-typecheck-${{ hashFiles('flake.lock') }} | ||
restore-keys: ${{ runner.os }}-nix-typecheck- | ||
- name: 🛠️ Install Nix | ||
uses: cachix/install-nix-action@v21 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
install_url: https://releases.nixos.org/nix/nix-2.10.3/install | ||
extra_nix_config: | | ||
allowed-uris = ${{ env.ALLOWED_URIS }} | ||
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} | ||
substituters = ${{ env.SUBSTITUTERS }} | ||
experimental-features = nix-command flakes | ||
- name: 💾➤ Import Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit == 'true'" | ||
run: "nix-store --import < /tmp/nixcache" | ||
- name: 🏗️ Build specification | ||
run: | | ||
nix build --show-trace --accept-flake-config .#leiosSpec | ||
- name: ➤💾 Export Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit != 'true'" | ||
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache" | ||
|
||
compile: | ||
name: Build libraries | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: 💾 Cache Nix store | ||
uses: actions/[email protected] | ||
id: nix-cache | ||
with: | ||
path: /tmp/nixcache | ||
key: ${{ runner.os }}-nix-compile-${{ hashFiles('flake.lock') }} | ||
restore-keys: ${{ runner.os }}-nix-compile- | ||
- name: 🛠️ Install Nix | ||
uses: cachix/install-nix-action@v21 | ||
with: | ||
|
@@ -29,12 +69,18 @@ jobs: | |
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} | ||
substituters = ${{ env.SUBSTITUTERS }} | ||
experimental-features = nix-command flakes | ||
- name: 💾➤ Import Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit == 'true'" | ||
run: "nix-store --import < /tmp/nixcache" | ||
- name: 🏗️ Build `exe:leios` | ||
run: | | ||
nix build --show-trace --accept-flake-config .#leios | ||
- name: 🏗️ Build `exe:ouroboros-net-vis` | ||
run: | | ||
nix build --show-trace --accept-flake-config .#ouroboros-net-vis | ||
- name: ➤💾 Export Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit != 'true'" | ||
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache" | ||
|
||
tests: | ||
if: true | ||
|
@@ -43,6 +89,13 @@ jobs: | |
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: 💾 Cache Nix store | ||
uses: actions/[email protected] | ||
id: nix-cache | ||
with: | ||
path: /tmp/nixcache | ||
key: ${{ runner.os }}-nix-tests-${{ hashFiles('flake.lock') }} | ||
restore-keys: ${{ runner.os }}-nix-tests- | ||
- name: 🛠️ Install Nix | ||
uses: cachix/install-nix-action@v21 | ||
with: | ||
|
@@ -53,9 +106,15 @@ jobs: | |
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} | ||
substituters = ${{ env.SUBSTITUTERS }} | ||
experimental-features = nix-command flakes | ||
- name: 💾➤ Import Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit == 'true'" | ||
run: "nix-store --import < /tmp/nixcache" | ||
- name: 🔬 Test with `leios-sim-test` | ||
run: | | ||
nix run --accept-flake-config .#leios-sim-test | ||
- name: ➤💾 Export Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit != 'true'" | ||
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache" | ||
|
||
build-docusaurus: | ||
runs-on: ubuntu-22.04 | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,3 +1,5 @@ | ||
{-# OPTIONS --allow-unsolved-metas #-} | ||
|
||
module Leios.SimpleSpec where | ||
|
||
open import Ledger.Prelude | ||
|
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
Oops, something went wrong.